[python-win32] running a python script on WinXP by icon double-clicking.
Vineet Deodhar
d_vineet at yahoo.com
Wed Aug 4 10:02:32 CEST 2010
Hi Kevin,
I checked "Opens with" option for .py and .pyw files.
Associations are correct.
This problem happens for any python script file, not just this-one.
Do I really need to remove & reinstall py26, or can there any other option !
---Vineet.
--- On Wed, 4/8/10, Kevin Horn <kevin.horn at gmail.com> wrote:
From: Kevin Horn <kevin.horn at gmail.com>
Subject: Re: [python-win32] running a python script on WinXP by icon double-clicking.
To: "Vineet Deodhar" <d_vineet at yahoo.com>
Date: Wednesday, 4 August, 2010, 12:11
First check that .py or .pyw files are associated with the proper executables.
from an explorer window, choose Tools -> Folder Options
then click on the file types tab
find the PY and PYW entries in the list, and make sure their "Opens with" entries are correct
PY -> python.exe
PY -> pythonw.exe
If those are correct, and you still have problems, then perhaps your python installation is messed up somehow,
or there's something really strange about your script.
Hope this helps,
Kevin Horn
On Wed, Aug 4, 2010 at 1:30 AM, Vineet Deodhar <d_vineet at yahoo.com> 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).
Any idea
how should I run this with double-click on icon!
Thanks,
Vineet.
_______________________________________________
python-win32 mailing list
python-win32 at python.org
http://mail.python.org/mailman/listinfo/python-win32
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20100804/7cfb3942/attachment.html>
More information about the python-win32
mailing list