"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:

>>> threading.__file__
'c:\\Python25\\lib\\threading.py'
>>> import clr
>>> clr.__file__
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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]>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, <[EMAIL PROTECTED]> wrote:
>>
>>> Hi,
>>>
>>> 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?
>>>
>>> Thanks!
>>>
>>>  - Oren
>>>
>>> _______________________________________________
>>> Users mailing list
>>> [email protected]
>>> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>>>
>>
>>
>> _______________________________________________
>> Users mailing list
>> [email protected]
>> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>>
>>
>
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to