MCPcopy Index your code
hub / github.com/ipython/ipython / system

Function system

IPython/utils/_process_win32_controller.py:547–567  ·  view source on GitHub ↗

Win32 version of os.system() that works with network shares. Note that this implementation returns None, as meant for use in IPython. Parameters ---------- cmd : str A command to be executed in the system shell. Returns ------- None : we explicitly do NOT retur

(cmd: str)

Source from the content-addressed store, hash-verified

545
546
547def system(cmd: str) -> None:
548 """Win32 version of os.system() that works with network shares.
549
550 Note that this implementation returns None, as meant for use in IPython.
551
552 Parameters
553 ----------
554 cmd : str
555 A command to be executed in the system shell.
556
557 Returns
558 -------
559 None : we explicitly do NOT return the subprocess status code, as this
560 utility is meant to be used extensively in IPython, where any return value
561 would trigger : func:`sys.displayhook` calls.
562 """
563 with AvoidUNCPath() as path:
564 if path is not None:
565 cmd = '"pushd %s &&"%s' % (path, cmd)
566 with Win32ShellCommandController(cmd) as scc:
567 scc.run()
568
569
570if __name__ == "__main__":

Callers 1

Calls 3

AvoidUNCPathClass · 0.70
runMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…