Message7247

Author lsgroup
Recipients lsgroup
Date 2012-06-19.01:58:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1340071117.96.0.0939761337736.issue1930@psf.upfronthosting.co.za>
In-reply-to
Content
import traceback results in 
ImportError: no os specific module found
when embedded interpreter is run from java.

Looks like this is because when interpreter is run from inside java, sys.builtin_module_names  does not include 'posix' nor any of the OS names that os.py is looking for in that if else if statement at the beginning of os.py.

When interpreter is run from command line, 'posix' is included in sys.builtin_module_names.



================================
actual stack trace looks like:
================================
Traceback (most recent call last):
  File "<string>", line 2, in <module>
  File "/usr/local/jython2.5.2/Lib/traceback.py", line 3, in <module>
    import linecache
  File "/usr/local/jython2.5.2/Lib/linecache.py", line 9, in <module>
    import os
  File "/usr/local/jython2.5.2/Lib/os.py", line 118, in <module>
    raise ImportError, 'no os specific module found'
================================
History
Date User Action Args
2012-06-19 01:58:38lsgroupsetrecipients: + lsgroup
2012-06-19 01:58:37lsgroupsetmessageid: <1340071117.96.0.0939761337736.issue1930@psf.upfronthosting.co.za>
2012-06-19 01:58:37lsgrouplinkissue1930 messages
2012-06-19 01:58:36lsgroupcreate