My small test program below in code section. It's just opening google with mechanize v3 and then "dumping forms". The compiled file in question I erase is mechanize\_form.py
But in general... what could be the cause that 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.
It's very strange, but it is consistent... no precompiled python _form.py file everything works, _form.py is already precompiled it fails. I'm using activestate python v126.96.36.199 on Windows 7 for the moment.
- Code: Select all
br = mechanize.Browser()
# Browser options
# Follows refresh 0 but not hangs on refresh > 0
# Want debugging messages?
# User-Agent (this is cheating, ok?)
br.addheaders = [('User-agent', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:188.8.131.52) Gecko/2008071615 Fedora/3.0.1-1.fc9 Firefox/3.0.1')]
r = br.open('http://google.com')
#html = r.read()
for f in br.forms():