running exe file

Eric_Dexter at msn.com Eric_Dexter at msn.com
Fri Aug 22 05:13:14 EDT 2008


On Aug 22, 12:12 am, Saurabh Sharma <srsse... at gmail.com> wrote:
> How can I run .exe file from my python script?

import os

os.startfile('file.exe')

The downside is that it doesn't work on the mac..  but it does work on
stuff like

os.startfile('notepad.txt')

I have been waiting for a good hacker to write a version to check what
op system you have and
then execute... I have more examples in my dex tracker package (use
google)



More information about the Python-list mailing list