DrPython and py2exe

mk mrkafk at gmail.com
Fri Jan 23 13:55:46 CET 2009


Hello,

I'm trying to get DrPython to edit .py file on double-click on Windows.

Sure, I can use trivial .bat file to open DrPython with file as 
argument. But the irritating thing is that DOS window stays open until 
particular instance of DrPython isn't closed.

py2exe to rescue. I have modified DrPython's setup.py:


setup(name='drpython.exe',
     version=MY_VER,
     description=description[0],
     long_description=description[1],
     classifiers = filter(None, classifiers.split('\n')),
     author=AUTHOR,
     author_email=AUTHOR_EMAIL,
     url=URL,
     platforms = "any",
     license = 'GPL',
     packages=[ MY_NAME ],
     package_dir={ MY_NAME : '.' },
     package_data={ MY_NAME : DATA },
     scripts=['postinst.py'],
     windows=['drpython.py'],
)

py2exe builds application, but when I start it, I get this in the log file:

Traceback (most recent call last):
   File "drpython.py", line 46, in <module>
   File "wxversion.pyc", line 152, in select
wxversion.VersionError: Requested version of wxPython not found

I'm guessing this is because py2exe doesn't package wxPython together 
with the app.

Since this topic is interesting for me anyway (i.e. how to transform 
wxPython app using py2exe into Windows executable), would someone please 
reply on how to do it?

Thanks,
mk





More information about the Python-list mailing list