这就是 os.system() 的功能啊,以保证 dir 这些 shell 内置命令能用。
正经使用得用 subprocess 模块。
【 在 javaboy (喝了咖啡就话多-_-;) 的大作中提到: 】
: 比如我在tmux下启动python,在repl里打os.system('python'),再在新的python repl里打('pstree'),结果每次都多一个sh进程(如图)
: init
: ├─tmux: server─┬─bash───mysql
: ...................
--
FROM 121.205.117.*