![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
iamsile
这个作者很懒,什么都没留下…
展开
-
wxPython控件学习
wx.BoxSizer:1.构造函数 boxSizer = wx.BoxSizer(integer orient) orient可以是wx.VERTICAL or wx.HORIZONTAL2.向sizer里面增加一个控件。box.Add(wx.Window window, integer proportion=0, integer flag = 0, integer border = 0)原创 2013-12-09 23:13:04 · 2559 阅读 · 0 评论 -
wxPython控件学习续
wxTextEntryDialog(wxWindow* parent, const wxString& message, const wxString& caption = "Please enter text", constwxString& defaultValue = "", long style = wxOK | wxCANCEL | wxCENTRE, const wxPoint原创 2013-12-10 21:25:12 · 720 阅读 · 0 评论 -
PycURL 网络编程
简单的PycURL例子import pycurlimport StringIO url = "http://www.google.com/"crl = pycurl.Curl()crl.setopt(pycurl.VERBOSE,1)crl.setopt(pycurl.FOLLOWLOCATION, 1)crl.setopt(pycurl.MAXREDIRS, 5)crl.转载 2013-12-11 20:42:00 · 780 阅读 · 0 评论 -
pycurl post json data to php
利用pycurl把write到的data post给web,在网上找了很多,没有一个合适的,于是了解原理后自己手写了一个import osimport jsonimport pycurlimport StringIOss=StringIO.StringIO()s=StringIO.StringIO()url = "xxxxxxxxx" #需要抓取原创 2013-12-12 19:19:28 · 1848 阅读 · 0 评论 -
wxpython编写的简单划线工具
import wxclass SketchWindow(wx.Window): def __init__(self, parent, ID): wx.Window.__init__(self, parent, ID) self.SetBackgroundColour("White") self.color = "Black原创 2013-12-05 23:35:29 · 1579 阅读 · 0 评论 -
安装第三方库出现 Python version 2.7 required, which was not found in the registry
import sys from _winreg import * # tweak as necessaryversion = sys.version[:3]installpath = sys.prefix regpath = "SOFTWARE\\Python\\Pythoncore\\%s\\" % (version)installkey = "Inst原创 2013-12-05 23:41:29 · 713 阅读 · 0 评论 -
pycurl字符编码方面的一些问题
python真的是一门很神奇的语言假设str1是utf-8的编码,str2是unicode的编码str = str1 + str2后,打印str的type,显示的是str但是在c.setopt(pycurl.URL,str)时则会报错,原因是str2并不是str,必须要进行转码.....原创 2013-12-12 22:09:57 · 1151 阅读 · 0 评论 -
python读取utf-8文件
在mac下python读取utf-8编码的txt文件,如果文件里有中文,直接输出的话会显示成乱码,也无法直接转成utf-8,所以必须想将其转成gbk,然后在转成utf-8# -*- coding: utf-8 -*-import osfilename = open(".txt")while True:s = filename.readline()if s原创 2013-12-13 20:18:25 · 3972 阅读 · 0 评论