[IronPython] cant import os

E. Antero Tammi e.antero.tammi at gmail.com
Tue Dec 28 22:23:46 CET 2010


Hello,

I'm new to this list, but figured out that this would be most suitable place
to ask following question.

Shortly, I just installed latest (2.7) IronPython and it seems to be a very
cool implementation indeed, but encountered soon an odd problem:
In console I can just
    » import os
without any problems, howewer on VisualStudio 2010 Shell I'll get error when
I'm trying the same:
    » import os
will yield to error like:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ImportError: No module named os
However if I'll do first on the VisualStudio interactive shell:
    » import sys
    » sys.path.append(r'C:\Program Files (X86)\IronPython 2.7\Lib')
and then
    » import os
everything is just fine (like in the console mode).

So I think my question is actually twofold:
- is the above behavior intended?
- is it possible to add some initialization code to VS when it's launching
the shell?


Regards,
eat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20101228/316a7371/attachment.html>


More information about the Ironpython-users mailing list