发布时间:2014-02-22 22:06:25
1.in 和 not in区别点击(此处)折叠或打开[root@oracle11g home]# ipython/usr/lib/python2.6/site-packages/IPython/Magic.py:38: DeprecationWarning: the sets module is deprecated from sets import SetPython 2.6.6 (r266:84292, M.........【阅读全文】
发布时间:2014-02-19 15:02:56
将tar xzvf ipython-0.9.1.tar.gz源码放到/home下[root@oracle11g home]# tar xzvf ipython-0.9.1.tar.gz[root@oracle11g home]# cd ipython-0.9.1[root@oracle11g ipython-0.9.1]# python setup.py install[root@oracle11g ipython-0.9.1]# which ipython/usr/bin/ipython[root@oracle11g ipython-0.9.1]# ipython/.........【阅读全文】
发布时间:2014-02-19 00:11:28
[root@oracle11g home]# cat pysysinfo_func_2.py点击(此处)折叠或打开#!/usr/bin/env python#A System Information Gathering Scriptimport subprocess#Command 1def uname_func(): &nbs.........【阅读全文】
发布时间:2014-02-19 00:04:07
这个很简单,只需要>>> import pysysinfoGathering system information with uname command:Linux oracle11g 2.6.32-279.el6.x86_64 #1 SMP Wed Jun 13 18:24:36 EDT 2012 x86_64 x86_64 x86_64 GNU/LinuxGathering diskspace information df command:文件系统 容量 已用 可用 .........【阅读全文】
发布时间:2014-02-18 23:56:24
[root@oracle11g home]# cat pysysinfo_func.py #!/usr/bin/env python#A System Information Gathering Scriptimport subprocess#Command 1def uname_func():uname = "uname"uname_arg = "-a"print "Gathering system information with %s command:\n" %unamesubprocess.call([uname,uname_arg])#Com.........【阅读全文】