Opening a file with Python

Kevin Riggle vj$ri^gg#guess#l55e at mt$*guess#&cn1e#t.!
Mon Jul 23 17:47:26 CEST 2001


You have to associate the file-type with the program.

Open up My Computer, click View...Folder Options, select the File Types tab,
and click on New Type.

Fill in the description and extension you want to use, then click on the New
button beneath the Actions: list box.

Fill in the Action Name (probably Open), and set 'Application used to
perform action:' to

"c:\Program Files\MyPyProg\mypyprog.exe %1" if using py2exe,

or "c:\Program Files\WinPy\winpy.exe c:\Program Files\MyPyProg\mypyprog.py
%1",

in both examples *including* the double-quotes.

(I haven't actually used Python on Windows, so if the WinPy path is a little
off please forgive me.)

Hope this helps...  Kevin


"Janos Blazi" <jblazi at hotmail.com> wrote in message
news:3b5be641_3 at news.newsgroups.com...
> I'd like to write a Python program that starts when the user double clicks
> on a file name (in Win2K). I should be able to read the name of the file.
> What have I to do?
> This question has probably been asked many times, sorry.
>
> Janos Blazi
>
>
>
>
> -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
> http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
> -----==  Over 80,000 Newsgroups - 16 Different Servers! =-----





More information about the Python-list mailing list