ChinaUnix.net
相关文章推荐:

python 调用 注册的系统ID

python subprocess 如何调用系统命令,带管道符的 “ps -ef |grep httpd”

by venux - Python - 2013-07-16 15:39:38 阅读(1236) 回复(2)

相关讨论

1.os.system() 例如:os.system('ls') #如果再命令行下执行,结果直接打印出来 里面的参数即为DOS命令。这样的话是不能将得到的东西显示出来的。 但是如果是执行一些其他的操作DOS操作的话应该可以实现的哦@ 可以执行操作。 2.为了能够得到返回的结果集可以这样来处理的: os.popen() popen(command [, mode='r' [, bufsize]]) -> pipe >>>tmp = os.popen('ls *.py').readlines() >>>tmp 这样的话就可以将返回的值打印出来并...

by hkebao - Python文档中心 - 2009-01-20 22:45:27 阅读(6213) 回复(0)

请问可以执行批处理吗?只调用一次getstatusoutput,执行多条命令?

by tony124cft - Python - 2009-09-11 10:17:52 阅读(4560) 回复(5)

想用python处理当前目录下的所有txt文件。思路是用subprocess.Popen:[code]output = subprocess.Popen(['ls', '*.txt'],stdout=subprocess.PIPE) output = output.communicate()[0][/code]问题出在对'*.txt'的识别上: ls: *.txt: No such file or directory 如果没有'*',比如命令是['ls','-l'] , 就没有问题。试着['ls','\*.txt']也不行。有什么建议吗? 谢谢! 另,perl 下面用 @output = `ls *.txt`就搞定了, python有没...

by sulicon - Python - 2011-08-04 08:07:41 阅读(5681) 回复(4)

请问python里可以调用操作系统命令吗? 比如在linux下使用 ls wc -l

by hxl - Python - 2010-07-28 11:26:49 阅读(2535) 回复(3)

如题,一个应用程序,他的参数就是带""的,而且还不止一个参数,该如何调用这个程序呢?

by NetDC - Python - 2006-12-19 13:01:39 阅读(2585) 回复(6)

在open server与unixware中系统注册后怎样看系统的system id. 最好是命令行的。

by cqcw - 其他UNIX - 2004-11-17 16:48:06 阅读(1139) 回复(2)

怎样修改 SCO UnixWare 7.1.3 系统里的注册用户的id 号 如: root 的 Uid 为 0 怎样修改 SCO UnixWare 7.1.3 系统里的普通用户的id 号为 0

by wangxch - 其他UNIX - 2006-04-23 00:42:23 阅读(966) 回复(1)

如题,我不想在程序中使用ps等命令,有什么方法吗??????

by dysnake - C/C++ - 2003-12-26 09:39:50 阅读(1214) 回复(4)

报错: Server Error in '/hpcp' Application. -------------------------------------------------------------------------------- Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: ...

by 暴走猫 - HP-UX - 2004-09-08 10:31:17 阅读(859) 回复(4)

请问各位,在python怎么调用ping的输出? 我想在python调用ping,然后对PING的结果做处理.谢谢各位!(提问前已经搜索过相应的问题,但没有得到答案,故请各位达人帮忙)

by tianyaamy - Python - 2006-11-26 22:58:21 阅读(2502) 回复(1)