args is required for all calls and should be a string, or a sequence of program arguments. Providing a sequence of arguments is generally preferred, as it allows the module to take care of any required escaping and quoting of arguments (e.g. to permit spaces in file names). If passing a single string, either shell must be True (see below) or else the string must simply name the program to be executed without specifying any arguments.
您的示例相当于在shell中键入以下内容:
这显然是错误的。每个列表条目都是传递给可执行文件的一个参数(argv条目),您不需要转义/引用。所以你要使用:
^{pr2}$另请参见the documentation(emphasis mine):
相关问题 更多 >
编程相关推荐