[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Running files with the associated program...

E-Lo

2/6/2008 12:35:00 AM

Hello all,

How can I start a file (on Windows) with the associated program,

Like if I want to open a bmp file, I want to to be shown in the
program that all bmp files are associated with.

I need a python code to do this.

Thanks,
2 Answers

Gabriel Genellina

2/6/2008 4:10:00 AM

0

En Tue, 05 Feb 2008 22:34:59 -0200, E-Lo <BeshrKayali@gmail.com> escribió:

> How can I start a file (on Windows) with the associated program,

http://docs.python.org/lib/os-process.htm...

startfile(path[, operation])
Start a file with its associated application.
When operation is not specified or 'open', this acts like double-clicking
the file in Windows Explorer, or giving the file name as an argument to
the start command from the interactive command shell: the file is opened
with whatever application (if any) its extension is associated.

--
Gabriel Genellina

E-Lo

2/6/2008 10:52:00 AM

0

On Feb 6, 6:09 am, "Gabriel Genellina" <gagsl-...@yahoo.com.ar> wrote:
> En Tue, 05 Feb 2008 22:34:59 -0200, E-Lo <BeshrKay...@gmail.com> escribió:
>
> > How can I start a file (on Windows) with the associated program,
>
> http://docs.python.org/lib/os-process.htm...
>
> startfile(path[, operation])
> Start a file with its associated application.
> When operation is not specified or 'open', this acts like double-clicking
> the file in Windows Explorer, or giving the file name as an argument to
> the start command from the interactive command shell: the file is opened
> with whatever application (if any) its extension is associated.
>
> --
> Gabriel Genellina

thanks, it worked :)