ChinaUnix.net
相关文章推荐:

python for windows

dears, 在windows下有没有像pexpect 模块一样可以实现自动交互的功能。 pexpect在Windows下不能使用,依赖pyt model。

by caoliang3621 - Python - 2012-07-13 09:22:21 阅读(1712) 回复(1)

相关讨论

import fnmatch, os, sys, win32com.client wordapp = win32com.client.gencache.EnsureDispatch("Word.Application") try: for path,dirs,files in os.walk(sys.argv[1]): for filename in files: if not fnmatch.fnmatch(filename,'*.doc'):continue doc= os.path.abspath(os.path.join(path,filename)) print "processing %s" %doc wordapp.Documents.Open(doc) ...

by qingfa - Python文档中心 - 2006-12-16 18:17:07 阅读(1361) 回复(0)

[code]#!/usr/bin/python # -*- coding: utf-8 -*- import psutil from pprint import pprint def main(): pl=psutil.get_pid_list() r=[] for pid in pl: try: p=psutil.Process(pid) r.append((pid,p.name,int(p.get_cpu_percent()))) except: pass pprint(r) if __name__ == '__main__': main()[/code]获取到的结果一个天一个地

by mitmax - Python - 2013-07-04 15:49:47 阅读(1292) 回复(0)

按照以下教程编写服务: http://www.cnblogs.com/eineseite/archive/2009/07/02/1515388.html 但是手工启动服务时提示:错误1053, 搜了很多帖子,未果,请高手帮忙,什么问题?

by howema001 - Python - 2012-02-29 13:51:50 阅读(3687) 回复(7)

转自python-on-windows/" target="_blank">http://www.fuyun.org/2009/12/install-mysql-for-python-on-windows/

It took me quite a while to figure out how to build and install python/files/mysql-python/" target="_blank">MySQL for python (MySQLdb) o...

by frymgump - MySQL - 2011-12-19 13:55:13 阅读(856) 回复(0)

windows环境下建立一个python的模块。 使用vc6和python2.3 步骤: 1. 在vc6中建立一个dll的project。 假定module的名字是mytest.那么dll名字就是mytest.dll。 这个是必须的。 2. 用c写要实现的部分。步骤如下: #include 这个是必须的,python的类型都在这里定义(类似写window程序一定要包含windows.h一样)。所以,在vc里一定要设置好include的路径。这个文件在 python23\include\下面。 3. 写要实现的函数。比如要实现两个c的...

by linxh - Python文档中心 - 2006-10-22 08:50:09 阅读(1827) 回复(0)

HTTPS in the newer versions of python (2.x and later) is considerably[相当地] easier now. Now it's simply a matter of doing the following: import httplib HOSTNAME = 'login.yahoo.com' conn = httplib.HTTPSConnection(HOSTNAME) conn.putrequest('GET', '/') conn.endheaders() response = conn.getresponse() print response.read() For information on how to get SSL working on windows,check out Simon Willis...

by linxh - Python文档中心 - 2011-12-06 14:27:13 阅读(10317) 回复(2)

本帖最后由 wilask 于 2013-10-25 09:19 编辑 使用[code]locale.getdefaultlocale()[/code],获取到的是区域语言; 但windows分别有系统语言和区域语言; 求助大侠如何有什么办法获取系统语言呢?

by wilask - Python - 2013-10-28 17:33:01 阅读(4418) 回复(9)

转:Ethan Woo 的博客 Quixote python Web框架安装 for windows 在http://quixote.ca/下可以找到最新的Quixote下载,本人安装的2.6的版本。 在安装Quixote之前,一定记得安装python,最好也是2.6版本的,虽说python的要求是2.4以上,但是我觉得还是比较新且稳定的版本比较好·~·安装完python之后,记得修改环境变量! 接下来开始安装,因为下载的release版本的扩展名是.tar.gz,这本应该是在Linux下安装的,...

pythonQuixote

by 中关村村草 - Python - 2011-02-12 15:40:22 阅读(2458) 回复(2)

我用的python2.5为什么没有wun32.client这个东西,是不是编译器自己没有带呢,那么哪里可以下呢,谢谢了

by 546651533 - Python - 2012-07-20 10:11:09 阅读(1392) 回复(1)

一段有趣的python程序,运行如下图: #!/usr/bin/python import sys,os hist=[] def actually_write(): global hist sys.stdout.write("\x1b[%sm"%(";".join(hist))) def o(msg): global hist msg="%02i"%msg hist.append(msg) actually_write() def undo(): global hist hist.pop() actually_write() def reset(): global hist hist=[] sys.stdout.write("\x1bc\x1b[!p\x1...

by lvDbing - Python文档中心 - 2008-09-17 21:39:22 阅读(1828) 回复(0)