python popen涉及到的序列化函数,pythonpopen,shlex.split(
python popen涉及到的序列化函数,pythonpopen,shlex.split(
shlex.split()
可以被用于序列化复杂的命令参数
import shlex, subprocesscommand_line = raw_input()/bin/cat -input test.txt -output "diege.txt" -cmd "echo '$MONEY'" args = shlex.split(command_line)print args['/bin/cat', '-input', 'test.txt', '-output', 'diege.txt', '-cmd', "echo '$MONEY'"]p=subprocess.Popen(args)
详细描述:http://blog.csdn.net/g457499940/article/details/17068277
相关内容
- Demonstrates class attributes and static methods,,class MyClas
- system os path使用,ospath,'''This prog
- 重写内置的__str__方法,重写内置__str_,class Employ
- Add a member variable to a class on the fly,membervariable,class C2
- python socket发送接收示例,pythonsocket,import socke
- List system variable keys and set a system parameter key,variablepa
- Class constructor parameter: dictionary,,class Bunch(
- python空构造函数,python构造函数,class C(obje
- Python使用子进程代替多线程,python进程多线程,import o
- python的 __getitem__方法示例,python__getitem_,class steppe
评论关闭