随笔分类 - Python
摘要:永久链接:http://michaelzqm.iteye.com/blog/1841966预览文章: python环境搭建2013-04-04博客分类:综合一. window环境安装1. 安装python 2.7.3 (win7 64)下载python-2.7.3.amd64.msi2. 安装easy_install3. 安装其他功能包如:easy_install MySQL-pythoneasy_install -U DBUtils问题解决:.没有gcc编译环境unable to find vcvarsall.bat解决方法:安装编译环境(一个老外的帖子)1) First ofall dow
阅读全文
摘要:查看系统当前python版本2: [root@wangyuelou ~]# python Python 2.4.3 (#1, May 5 2011, 16:39:10) [GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >;>> [root@wangyuelou ~]#下载新版本的python[root@wa
阅读全文
摘要:Unofficial Windows Binaries for Python Extension Packages by Christoph Gohlke, Laboratory for Fluorescence Dynamics, University of California, Irvine. This page provides 32- and 64-bit Windows binaries of many scientific open-source extension packages for the official CPython distribution of th...
阅读全文
摘要:批量kill python 进程killall -15 python && sleep 2 && ps axu|grep python批量启动服务/etc/init.d/battery start ; /etc/init.d/runopt start ; /etc/init.d/proclib start; /etc/init.d/softmgr start; /etc/init.d/softmgr_v2 start;
阅读全文
摘要:第1章客户/服务器网络介绍1.一个gopher的客户端。2.socket的makefile。3.一个简单的服务器,socket.setsockopt() socket.bind(host,port), socket.listen(1), socket.accept()第2章网络客户端1.使用socket对象# -*- coding: cp936 -*-import socket#创建socket对象s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)#连接s.connect(('www.cainiao8.com',80))#
阅读全文
摘要:1.获取web页面读取一个页面:import urllib2req = urllib2.Request('http://www.python.org')page = urllib2.urlopen(req)for line in page:sys.stdout.write(line)如果Request的网址没带协议的话会报错。可以使用info()方法获得网页的headers:import urllib2req = urllib2.Request('http://www.python.org/')page = urllib2.urlopen(req)info =
阅读全文
摘要:# -*- coding: UTF-8 -*-import poplibimport smtplibimport sysimport emailclass popBasic: def __init__(self): """ popBasic初始化 """ self.isLogin = False #self.destDir = destDir def login(self, popHost, popUser, popPassword, smtpHost, smtpUser, smtpPasswor...
阅读全文

浙公网安备 33010602011771号