From: Alex G. <ale...@ne...> - 2011-07-06 18:55:32
|
06.07.2011 20:37, Quanah Gibson-Mount kirjoitti: > --On Wednesday, July 06, 2011 10:05 AM -0700 Quanah Gibson-Mount > <qu...@zi...> wrote: > >> When I am on their system and import os, there are relatively few >> functions available. Is this a known bug with jython? Are there >> additional pieces that need importing to get jython to work in a KVM VM? This has nothing whatsoever to do with the KVM environment. This is caused by limitations of the Java Virtual Machine, as result of which many low level functions are not available. > On their system, dir(os) *looks* ok: > >>>> import os >>>> dir(os) > ['EX_OK', 'F_OK', 'O_APPEND', 'O_CREAT', 'O_EXCL', 'O_RDONLY', 'O_RDWR', > 'O_SYNC', 'O_TRUNC', 'O_WRONLY', 'R_OK', 'SEEK_CUR', 'SEEK_END', > 'SEEK_SET', 'W_OK', 'X_OK', '__all__', '__doc__', '__file__', '__loader__', > '__name__', '_exists', '_exit', '_get_exports_list', '_get_shell_commands', > '_name', '_native_posix', '_posix_impl', '_wrap_close', 'access', 'altsep', > 'chdir', 'chmod', 'chown', 'close', 'curdir', 'defpath', 'devnull', > 'environ', 'errno', 'error', 'extsep', 'fdatasync', 'fdopen', 'fsync', > 'ftruncate', 'getcwd', 'getcwdu', 'getegid', 'getenv', 'geteuid', 'getgid', > 'getlogin', 'getpgrp', 'getppid', 'getuid', 'isatty', 'kill', 'lchmod', > 'lchown', 'linesep', 'link', 'listdir', 'lseek', 'lstat', 'makedirs', > 'mkdir', 'name', 'open', 'pardir', 'path', 'pathsep', 'popen', 'popen2', > 'popen3', 'popen4', 'putenv', 'read', 'readlink', 'remove', 'removedirs', > 'rename', 'renames', 'rmdir', 'sep', 'setpgrp', 'setsid', 'stat', > 'stat_result', 'strerror', 'symlink', 'sys', 'system', 'unlink', > 'unsetenv', 'urandom', 'utime', 'wait', 'waitpid', 'walk', 'write'] >>>> os.getpid() > Traceback (most recent call last): > File "<stdin>", line 1, in<module> > AttributeError: 'module' object has no attribute 'getpid' > > --Quanah > > -- > > Quanah Gibson-Mount > Sr. Member of Technical Staff > Zimbra, Inc > A Division of VMware, Inc. > -------------------- > Zimbra :: the leader in open source messaging and collaboration > > ------------------------------------------------------------------------------ > All of the data generated in your IT infrastructure is seriously valuable. > Why? It contains a definitive record of application performance, security > threats, fraudulent activity, and more. Splunk takes this data and makes > sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2d-c2 > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users |