
python
iamsile
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
wxPython控件学习
wx.BoxSizer: 1.构造函数 boxSizer = wx.BoxSizer(integer orient) orient可以是wx.VERTICAL or wx.HORIZONTAL 2.向sizer里面增加一个控件。box.Add(wx.Window window, integer proportion=0, integer flag = 0, integer border = 0)原创 2013-12-09 23:13:04 · 2666 阅读 · 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 · 759 阅读 · 0 评论 -
PycURL 网络编程
简单的PycURL例子 import pycurl import 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 · 831 阅读 · 0 评论 -
pycurl post json data to php
利用pycurl把write到的data post给web,在网上找了很多,没有一个合适的,于是了解原理后自己手写了一个 import os import json import pycurl import StringIO ss=StringIO.StringIO() s=StringIO.StringIO() url = "xxxxxxxxx" #需要抓取原创 2013-12-12 19:19:28 · 1908 阅读 · 0 评论 -
wxpython编写的简单划线工具
import wx class 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 · 1662 阅读 · 0 评论 -
安装第三方库出现 Python version 2.7 required, which was not found in the registry
import sys from _winreg import * # tweak as necessary version = sys.version[:3] installpath = sys.prefix regpath = "SOFTWARE\\Python\\Pythoncore\\%s\\" % (version) installkey = "Inst原创 2013-12-05 23:41:29 · 754 阅读 · 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 · 1208 阅读 · 0 评论 -
python读取utf-8文件
在mac下python读取utf-8编码的txt文件,如果文件里有中文,直接输出的话会显示成乱码,也无法直接转成utf-8,所以必须想将其转成gbk,然后在转成utf-8 # -*- coding: utf-8 -*- import os filename = open(".txt") while True: s = filename.readline() if s原创 2013-12-13 20:18:25 · 4075 阅读 · 0 评论