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