[IronPython] compiled "builtin" modules (os, sys, etc)
curt at hagenlocher.org
Thu Nov 13 17:18:15 CET 2008
"threading" is also a .py-based library file. To get these you either need
to get IronPython via the MSI file (for 2.0RC1) or you need to download
CPython and use its libraries. Information on the latter is in the
IronPython tutorial that's in the "tutorial" directory of the distribution.
If you're not sure whether or not a module is builtin or an external file,
you can check its "__file__" attribute:
>>> import clr
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute '__file__'
On Thu, Nov 13, 2008 at 5:05 PM, Severin <seob at gmx.ch> wrote:
> I have similar problems. I import 'treading' for example and running the
> application I get a 'no module named threading' exception.
> On Thu, Nov 13, 2008 at 1:43 PM, Curt Hagenlocher <curt at hagenlocher.org>wrote:
>> "os" is not a builtin module at all -- it's an external .py file that
>> loads the internal "nt" module. I don't know why you'd need to include sys,
>> but I imagine Dino will answer. :)
>> On Thu, Nov 13, 2008 at 10:39 AM, <oren at held.org.il> wrote:
>>> This question is regarding IronPythong *compiled* code (I use pyc.py):
>>> It seems that I have to "compile" even the "builtin" modules such as sys,
>>> os, if my script imports them.
>>> 1. Aren't they supposed to be included in IronPython.dll? Am I doing
>>> something wrong? :)
>>> 2. Do you know of any "make" script that follows all the imported modules
>>> recursively and compiles them as well?
>>> - Oren
>>> Users mailing list
>>> Users at lists.ironpython.com
>> Users mailing list
>> Users at lists.ironpython.com
> Users mailing list
> Users at lists.ironpython.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ironpython-users