随笔分类 -  Python

摘要:WxPython 网址 学习网址 http://wiki.wxpython.org/How%20to%20Learn%20wxPython安装网址 http://wiki.wxpython.org/How%20to%20install%20wxPythonwxPython Ap... 阅读全文
posted @ 2015-06-11 10:19 卡尔西 阅读(7005) 评论(0) 推荐(0)
摘要:@echo off cd C:\test start python test.py start python test2.pyexit 阅读全文
posted @ 2015-04-08 17:41 卡尔西 阅读(162) 评论(0) 推荐(0)
摘要:Beautiful Soup 3.0 中文文档说明: http://www.crummy.com/software/BeautifulSoup/bs3/documentation.zh.htmlBeautiful Soup 4.2.0中文文档 http://www.crummy.co... 阅读全文
posted @ 2015-04-08 10:59 卡尔西 阅读(223) 评论(0) 推荐(0)
摘要:python在安装时,默认的编码是ascii,当程序中出现非ascii编码时,python的处理常常会报这样的错UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0x?? in position 1: ordinal not in... 阅读全文
posted @ 2015-04-07 11:11 卡尔西 阅读(6169) 评论(0) 推荐(1)
摘要:更多详见: http://www.w3cschool.cc/python/python-email.htmlpython中email模块使得处理邮件变得比较简单,今天着重学习了一下发送邮件的具体做法,这里写写自己的的心得,也请高手给些指点。 一、相关模块介绍 发送邮件... 阅读全文
posted @ 2015-04-03 17:22 卡尔西 阅读(318) 评论(1) 推荐(1)
摘要:python unittest要产生一个可看的报告,需要借助一个第三方的包 下载HTMLTestRunner.py 第三方库 ,参考地址: http://tungwaiyip.info/software/HTMLTestRunner.html是个牛人自己写的,真挺不错的,佩服佩服下载... 阅读全文
posted @ 2015-04-03 16:43 卡尔西 阅读(536) 评论(0) 推荐(0)
摘要:https://docs.python.org/2/library/unittest.html# 阅读全文
posted @ 2015-04-03 14:34 卡尔西 阅读(298) 评论(0) 推荐(0)
摘要:Python 第三方包可以使用pip 更容易地安装,和管理pip 的下载地址 https://pypi.python.org/pypi/pip/pip的使用以及相关文档参考 https://pip.pypa.io/en/latest/python第三方包下载路径https://pyp... 阅读全文
posted @ 2015-04-01 15:37 卡尔西 阅读(280) 评论(0) 推荐(0)
摘要:Python 使用 easy_instal安装第三方扩展包更容易easy insatll 下载地址 https://pypi.python.org/pypi/setuptools/windows 下: 找到一个 与你python 版本对于的setuptools 版本。比如 setup... 阅读全文
posted @ 2015-04-01 15:31 卡尔西 阅读(261) 评论(0) 推荐(0)
摘要:模块urllib,urllib2,httplib的区别httplib实现了http和https的客户端协议,但是在python中,模块urllib和urllib2对httplib进行了更上层的封装。介绍下例子中用到的函数: 1、HTTPConnection函数 httplib.HTT... 阅读全文
posted @ 2015-03-31 15:49 卡尔西 阅读(2943) 评论(0) 推荐(0)
摘要:python发送post和get请求get请求:使用get方式时,请求数据直接放在url中。 方法一、import urllibimport urllib2url = "http://192.168.81.16/cgi-bin/python_test/test.py?ServiceC... 阅读全文
posted @ 2015-03-31 15:44 卡尔西 阅读(259) 评论(0) 推荐(0)
摘要:下载后的包,在python IDLE 都可以导入这些模块,但是在Eclipse里面需要我们自己添加路径 需要导入的模块,在那个路径下,就在这里添加路径即可,其他的同理。 阅读全文
posted @ 2015-03-30 10:41 卡尔西 阅读(267) 评论(0) 推荐(0)
摘要:Eclipse的设置window->preferences->general->editors->text editors->spelling->encoding->UTF-8,编辑器的编码格式window->preferences->workspace->text file enc... 阅读全文
posted @ 2015-03-25 09:31 卡尔西 阅读(345) 评论(0) 推荐(0)
摘要:下载安装MySQLdblinux版本http://sourceforge.net/projects/mysql-python/下载,在安装是要先安装setuptools,然后在下载文件目录下,修改mysite.cfg,指定本地mysql的mysql-config文件的路径windows版本网上搜索到... 阅读全文
posted @ 2015-03-24 17:44 卡尔西 阅读(198) 评论(0) 推荐(0)
摘要:Python string replace 方法方法1:>>> a='...fuck...the....world............'>>> b=a.replace('.',' ')>>> print b fuck the world方法2:>>> a='...fuck...the....wo... 阅读全文
posted @ 2015-01-21 16:54 卡尔西 阅读(408) 评论(0) 推荐(0)
摘要:Python IDLE 快捷键编辑状态时:Ctrl + [ 、Ctrl + ] 缩进代码Alt+3 Alt+4 注释、取消注释代码行Alt+5 Alt+6 切换缩进方式 空格TabAlt+/ 单词完成,只要文中出现过,就可以帮你自动补齐。多按几次可以循环选择Alt+M 打开模块代码,先选中模块,然后... 阅读全文
posted @ 2015-01-15 19:16 卡尔西 阅读(346) 评论(0) 推荐(0)

AmazingCounters.com