MCPcopy Create free account
hub / github.com/ipython/ipython / system

Function system

IPython/utils/_process_cli.py:34–45  ·  view source on GitHub ↗

system(cmd) should work in a cli environment on Mac OSX, Linux, and Windows

(cmd)

Source from the content-addressed store, hash-verified

32 raise OSError("command %r not found" % cmd)
33
34def system(cmd):
35 """
36 system(cmd) should work in a cli environment on Mac OSX, Linux,
37 and Windows
38 """
39 psi = System.Diagnostics.ProcessStartInfo(cmd)
40 psi.RedirectStandardOutput = True
41 psi.RedirectStandardError = True
42 psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal
43 psi.UseShellExecute = False
44 # Start up process:
45 reg = System.Diagnostics.Process.Start(psi)
46
47def getoutput(cmd):
48 """

Callers 6

target_updateFunction · 0.90
test_systemMethod · 0.90
test_system_quotesMethod · 0.90
commandMethod · 0.90
page_fileFunction · 0.90
system_pipedMethod · 0.90

Calls

no outgoing calls

Tested by 3

test_systemMethod · 0.72
test_system_quotesMethod · 0.72
commandMethod · 0.72