Advertisement
Guest User

Running shell command on Windows from Python

a guest
Apr 16th, 2012
691
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.13 KB | None | 0 0
  1. pythoncom.CoInitialize()
  2. shell = win32com.client.Dispatch('WScript.Shell')
  3. shell.Run(command, 1, False)
  4. pythoncom.CoUninitialize()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement