From: Chris C. <Chr...@in...> - 2011-07-06 19:44:54
|
Quanah Gibson-Mount wrote: > --On Wednesday, July 06, 2011 12:27 PM -0700 Chris Clark > <Chr...@in...> wrote: > >> I've seen similar missing functionality when the JVM was missing it too. >> If you are sure the only difference is the (CPU) VM, then I'd recommend >> debugging the os module (it imports a lot of its "stuff" from other >> modules, posix for instance). But checking the JVM is the low hang fruit > > We ship the JVM as a part of our product, and our command to start > jython (zmpython) instantiates our copy of the JVM. So the JVM is > identical in both environments (Which I also confirmed by checking > what it started up with). > > I tried importing various bits when reading os.py, but I can't see > where exactly it tries to pull in getpid() from, so got somewhat stuck > there. Some of the posix commands are definitely there, but others are > not. :/ It sounds like you have your own JVM, is that correct? I've noticed that Open JDK 1.6 (with Jython) is missing os.getpid() (under esx). I would try the Oracle/Sun one. > java -jar jython252.jar Jython 2.5.2 (Release_2_5_2:7206, Mar 2 2011, 23:12:06) [Java HotSpot(TM) Client VM (Sun Microsystems Inc.)] on java1.5.0_06 Type "help", "copyright", "credits" or "license" for more information. >>> import posix >>> posix.getpid() 20154 NOTE this demo is from a Solaris box (as my linux box with Jython 2.5.2 is virtual and only has openjdk). Chris |