system(cmd) should work in a cli environment on Mac OSX, Linux, and Windows
(cmd)
| 23 | |
| 24 | |
| 25 | def system(cmd): |
| 26 | """ |
| 27 | system(cmd) should work in a cli environment on Mac OSX, Linux, |
| 28 | and Windows |
| 29 | """ |
| 30 | psi = System.Diagnostics.ProcessStartInfo(cmd) |
| 31 | psi.RedirectStandardOutput = True |
| 32 | psi.RedirectStandardError = True |
| 33 | psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal |
| 34 | psi.UseShellExecute = False |
| 35 | # Start up process: |
| 36 | reg = System.Diagnostics.Process.Start(psi) |
| 37 | |
| 38 | |
| 39 | def getoutput(cmd): |
no outgoing calls
searching dependent graphs…