On 08/04/2010 08:30 AM, Vineet Deodhar wrote: > I have created a py2.6 script for a simple GUI with Tkinter. > Saved it with .py extension and also as .pyw extension. > > filename is entry.py > [CODE] > from Tkinter import * > from quitter import Quitter > > def fetch(): > print('Input => "%s"' % ent.get()) > > root = Tk() > ent = Entry(root) > ent.show='@' > ent.insert(0, 'Type words here') > ent.pack(side=TOP, fill=X) > > ent.focus() > ent.bind('<Return>', (lambda event: fetch())) > btn = Button(root, text='Fetch', command=fetch) > btn.pack(side=LEFT) > Quitter(root).pack(side=RIGHT) > root.mainloop() > [/CODE] > > 1) When run from command prompt as --- > D:\py>python entry.py > it runs nicely. > > 2) If I double-click on either entry.py or entry.pyw file, > nothing happens (no DOS console window to show any error also). > Do you have any other python script that works by clicking on it?
I assume, that you r windows file types are not registered correctly. Do you have multiple version of python installed? try following twwo commands to see whether windows was made aware of the python file types assoc .py assoc .pyw you should have received as answers .py=Python.File and .pyw=Python.NoConFile respectively if you don't see this just type: assoc .py=Python.File and assoc pyw=Python.NoConFile type also the command ftype Python.File you should see something like Python.NoConFile="C:\Python26\pythonw.exe" "%1" %* (depending where your py.exe is installed) perhaps this entry is wrong and points still to an executable that doesn't exist anymmore just type ftype Python.NoConFile="C:\Python26\pythonw.exe" "%1" %* (or with thy path to python.exe adapted) to fix it. then try the same with ftype Python.NoConFile > > > > _______________________________________________ > python-win32 mailing list > python-win32@python.org > http://mail.python.org/mailman/listinfo/python-win32 _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32