[IronPython] Interesting problems with compiling IP2 programs....
David.Lawler at franke.com
David.Lawler at franke.com
Fri Aug 8 16:57:38 CEST 2008
Unfortunately, now you will be 'punished' for releasing pyc.py. The
following code does some funny things when compiled:
print "1"
import clr
print "2"
import os
print "3"
print os.getcwd()
import sys
print "4"
print sys.version
This works fine if you launch it as a script with IP2. You get:
1
2
3
C:\Documents and Settings\LD003\My Documents\Python
Projects\CompileProblem
4
2.5.0 (IronPython 2.0 Beta (2.0.0.4000) on .NET 2.0.50727.1433)
>Exit code: 0
If you compile it and shove os.py and ntpath.py into the directory it
lives in (along with the required dll's)....
you get:
1
2
and then the program hangs....eats memory....and eventually dies with a
StackOverflowException.
if you comment out import os, print "3", print os.getcwd() you get:
1
2
4
2.5.0 ()
not exactly the same result. For me this is not an urgent fix....for
other folks....you are warned.
Regards,
David
More information about the Ironpython-users
mailing list