Python/Shell: Difference between revisions
< Python
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 6: | Line 6: | ||
subprocess.run(['dpkg', '-x', deb_path, ex_path]) | subprocess.run(['dpkg', '-x', deb_path, ex_path]) | ||
</source> | </source> | ||
|- | |||
| Run with shell<br/>(Necessary on Windows) || | |||
<source lang="python3> | |||
args = 'wmic product get name,version'.split(' ') | |||
subprocess.run(args, shell=True) | |||
</source> | |||
|- | |||
| Get stdout || | |||
|} | |} | ||
Revision as of 08:39, 9 May 2019
| TODO | Code |
|---|---|
| Just run |
subprocess.run(['dpkg', '-x', deb_path, ex_path])
|
| Run with shell (Necessary on Windows) |
args = 'wmic product get name,version'.split(' ')
subprocess.run(args, shell=True)
|
| Get stdout |