Running shell command on Windows from Python

a guest Apr 16th, 2012 498 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. pythoncom.CoInitialize()
  2. shell = win32com.client.Dispatch('WScript.Shell')
  3. shell.Run(command, 1, False)
  4. pythoncom.CoUninitialize()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand