Calling an exe from Python?

Jorgen Grahn jgrahn-nntq at algonet.se
Mon Oct 17 07:46:10 EDT 2005


On 16 Oct 2005 15:23:08 -0700, SPE - Stani's Python Editor <spe.stani.be at gmail.com> wrote:
> Slightly offtopic, but you can translate any double clicking (*.exe,
> *.pdf, *.html, ...) in the Windows Explorer into:
>
> import os
> os.startfile(fileName)

That would be Windows-specific, though.

But yes, it's that one, or os.system, or one of the os.popen*, or one of the
os.spawn*, or module subprocess mentioned elsewhere in the thread.
-- Depending on exactly what you want to do.

/Jorgen

-- 
  // Jorgen Grahn <jgrahn@       Ph'nglui mglw'nafh Cthulhu
\X/                algonet.se>   R'lyeh wgah'nagl fhtagn!



More information about the Python-list mailing list