Quantcast
Channel: ActiveState Community Site - ActivePython discussion
Viewing all articles
Browse latest Browse all 75

Difference in behaviour with/without compiled python files

$
0
0

Just wondering if anyone had my python problem before or knows exactly the root cause:

I'm using ActivateState python v3.3.4.1 on Windows 7, and behaviour differs whether a python file is already compiled or not.

I'm experimenting making a python v3 version of mechanize (converting the v2 of the web scraping library)... still ongoing... did the 2to3 conversions, did some rewrites. Basic code is working. However... I run my small stateless test program once and it works, a side effect is that the python files in the library are compiled. I run the test program again and the program fails... I erase 1 specific compiled python file, rerun the test program and it works again.

The above I can do consistently... First time around the code works, it doesn't work if one library was already compiled, and it works again if I remove the compiled file and run it again.

What could be the cause that activestate python runs differently when the file is not compiled yet, compared to when the file is compiled upfront. I would guess that execution would be the same in either case... either python doesn't find a compiled file, compiles it and uses or it would either use the precompiled file of a previous run.

This is only in ActiveState python, python on Linux doesn't have the problem e.g.

Regards,
Sven


Viewing all articles
Browse latest Browse all 75

Trending Articles