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 or list A command to be executed in the system shell. Returns ------- int : child process' exit
(cmd: str)
| 114 | |
| 115 | |
| 116 | def system(cmd: str) -> Optional[int]: |
| 117 | """Win32 version of os.system() that works with network shares. |
| 118 | |
| 119 | Note that this implementation returns None, as meant for use in IPython. |
| 120 | |
| 121 | Parameters |
| 122 | ---------- |
| 123 | cmd : str or list |
| 124 | A command to be executed in the system shell. |
| 125 | |
| 126 | Returns |
| 127 | ------- |
| 128 | int : child process' exit code. |
| 129 | """ |
| 130 | # The controller provides interactivity with both |
| 131 | # stdin and stdout |
| 132 | # import _process_win32_controller |
| 133 | # _process_win32_controller.system(cmd) |
| 134 | |
| 135 | with AvoidUNCPath() as path: |
| 136 | if path is not None: |
| 137 | cmd = '"pushd %s &&"%s' % (path, cmd) |
| 138 | res = process_handler(cmd, _system_body) |
| 139 | return res |
| 140 | |
| 141 | |
| 142 | def getoutput(cmd: str) -> str: |
nothing calls this directly
no test coverage detected
searching dependent graphs…