[IronPython] atexit module doesn't work

henry show henryshow at gmail.com
Mon Mar 13 09:42:53 CET 2006


i am new to ironpython, so my question might be silly:
why i can not even import os and atexit?

IronPython 1.0.2258 (Beta) on .NET 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
>>> import sys,atexit
Traceback (most recent call last):
  File , line 0, in input##74
ImportError: No module named atexit
>>> import os
Traceback (most recent call last):
  File , line 0, in input##75
ImportError: No module named os
>>>


2006/3/12, Sanghyeon Seo <sanxiyn at gmail.com>:
>
> IronPython 1.0.2258 (Beta) on .NET 2.0.50727.42
> Copyright (c) Microsoft Corporation. All rights reserved.
> >>> import sys, atexit
> >>> def bye():
> ...     print 'Bye!'
> ...
> >>> atexit.register(bye)
> >>> sys.exit()
>
> This should print 'Bye!' at exit.
>
> Seo Sanghyeon
> _______________________________________________
> users mailing list
> users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20060313/07bf9fcb/attachment.html>


More information about the Ironpython-users mailing list