Running files with the associated program...

E

E-Lo

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,
 
G

Gabriel Genellina

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

http://docs.python.org/lib/os-process.html#l2h-2760

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.
 
E

E-Lo

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

http://docs.python.org/lib/os-process.html#l2h-2760

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.

thanks, it worked :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top