Using Python Libraries in Compiled IronPython
I have a python scrip开发者_如何学Pythont which works well when it isn't compiled but when I compile it using pyc it is unable to access the standard python libraries (sys and os in this case). Is there a way of compiling them into the project?
First of all, is this script pure python, or does it have any IronPython in it as well? If it doesn't have anything that strictly requires it to be IronPython, then you can just treat it as a python script and compile it with py2exe.
That should solve your problems because the above method has worked for me every single time in the past
精彩评论