I just managed to get py2exe work on a Windows Virtual Machine but stumbled on another problem which I didn't have right after I installed GTK, Pango, Gobject etc. on that machine: When I launch a Python Script the window appears but it immediately stops responding. This happens too if I open a python interpreter and type:
import gtk
w = gtk.Window()
w.show()
I'm not allowed to post any images yet, but here's the link to a screenshot: http://i.stack.imgur.com/3RJ0n.png
This is a problem for me, as if I create an executable with py2exe I ge开发者_如何转开发t the same result when I execute the program.
Thank you for your help and for your time spent to help me! :)
Solved! It seems installing ActivePython the installing GTK runtime, PyCairo, PyObject, PyGtk as administrator with compatibility mode for Windows Xp Service Pack 2 solved the problem. Thank you adw for your help and suggestions!
You need to run a main loop so GTK can process events, draw in the window, etc.
Add this to your program:
gtk.main()
See also: http://live.gnome.org/PyGTK/QuickStart
Solved! It seems installing ActivePython the installing GTK runtime, PyCairo, PyObject, PyGtk as administrator with compatibility mode for Windows Xp Service Pack 2 solved the problem. Thank you adw for your help and suggestions!
精彩评论