
python
文章平均质量分 79
dainiao01
探索
展开
-
python25中文支持
初学python,想尝试在脚本里使用中文,结果文件中只要一出现中文,无论在什么位置,一运行就提示:SyntaxError:No-ASCII character /xd6 in file .... on line ...,but no encoding declared 按常规在网上费了好大劲也没找到能找到对的上号的解决办法 最后还是在 http://www.python原创 2008-04-22 21:32:00 · 779 阅读 · 0 评论 -
串口通讯的python模块——pySerial
pySerialOverview<br />This module encapsulates the access for the serial port. It provides backends for Python running on Windows, Linux, BSD (possibly any POSIX compliant system), Jython and IronPython (.NET and Mono). The module named "serial" au转载 2010-09-15 09:15:00 · 29553 阅读 · 0 评论 -
Python 串口设备应用
1. Python 串口设备应用<br /> <br />简述<br /> 1.1. 线程轮寻<br /> <br /> 风尘无限 <tianyu263@163.com><br /> <br />-- 分享 <br />就是打开串口后,启动一个线程来监听串口数据的进入,有数据时,就做数据的处理(也可以发送一个事件,并携带接收到的数据)。 <br /> 切换行号显示 #coding=gb18030<br /><br />import sys,threading,time;<br />import s转载 2010-09-15 09:38:00 · 2583 阅读 · 0 评论 -
The Python Profilers (python性能优化工具介绍)
The Python ProfilersCopyright © 1994, by InfoSeek Corporation, all rights reserved.Written by James Roskind. [1]Permission to use, copy, modify, and distribute this Python software原创 2008-04-27 18:43:00 · 4431 阅读 · 0 评论 -
python http(通讯一个测试的例子Teraservertest)
#!-*- coding: cp936 -*-"#Teraservertestimport threading, time, socket, random,sysimport base64,zipfilethread_count =500TEST_COUNT = 1SPTIME=0.02ISLOG=0MAX_PAGE = 10000HOST = "192.168.6.12"PORT=5534h={原创 2008-04-27 16:58:00 · 1771 阅读 · 2 评论 -
sysinfo.py (获取系统信息)
# -*- encoding: utf-8 -*-from ctypes import *import os,timeclass MEMORYSTATUS (Structure): _fields_ = [(dwLength, c_ulong),#sizeof(MEMORYSTATUS) (dwMemoryLoad,c_ulong), # perce原创 2008-04-27 16:56:00 · 1770 阅读 · 0 评论 -
ez_setup.py for 0.6c1 (同事李林)
#!python"""Bootstrap setuptools installationIf you want to use setuptools in your packages setup.py, just include thisfile in the same directory with it, and add this to the top of your setup.py::原创 2008-04-27 16:47:00 · 996 阅读 · 0 评论 -
ez_setup.py for 0.6c8 (网上下载)
#!python"""Bootstrap setuptools installationIf you want to use setuptools in your packages setup.py, just include thisfile in the same directory with it, and add this to the top of your setup.py::原创 2008-04-27 16:45:00 · 2134 阅读 · 0 评论 -
手动制作python的exe可执行程序
转载---------------Python没有内建一个编译为exe的功能。给python程序的部署带来不少的麻烦。所以就会出现一些py2exe之类的很不错的工具,用于自动把.py文件编译为.exe文件。最近抽空研究了一下手动实现类似py2exe的功能,希望加强对python的了解。结果还相当不错。把结果记录下来,与大家共享。 1.1. 原理文中所描述的方法,基于p原创 2008-04-22 20:20:00 · 991 阅读 · 0 评论 -
用cx_Freeze把python打包成exe可执行文件
http://python.net/crew/atuining/cx_Freeze/一个支持python 打包的软件,看来还不错!------------------------------------------------------------------------------ http://www.cublog.cn/u/7577/showart_293079.html原创 2008-04-22 20:13:00 · 1554 阅读 · 0 评论 -
python测试茶叶通商户登陆的 源代码
#!-*- coding: cp936 -*-"#Teraservertestimport threading, time, socket, random,sysimport base64,zipfilethread_count =500TEST_COUNT = 1SPTIME=0.02ISLOG=0MAX_PAGE = 10000HOST = "192.168.6.12"PORT=5534h={原创 2008-04-20 16:07:00 · 1549 阅读 · 0 评论 -
文章来自《Python cookbook》.
文章来自《Python cookbook》. 翻译仅仅是为了个人学习,其它商业版权纠纷与此无关! -- 218.25.65.133 [2004-09-30 04:40:07] 目录 描述 问题 Problem 解决 Solution 讨论 Discussion 参考 See Als原创 2008-04-23 10:45:00 · 745 阅读 · 0 评论 -
dir_size.py
# -*- encoding: utf-8 -*-import osfrom os.path import *class DirSizeError(Exception): passdef dir_size(start, follow_links=0, start_depth=0, max_depth=0, skip_errs=0): # Get a list of all names of原创 2008-04-23 09:53:00 · 613 阅读 · 0 评论 -
Python中的easy_install
<br />Python中的easy_install工具很爽,它的作用类似于Php中的pear,或者Ruby中的gem,或者Perl中的cpan。<br /><br />如果想使用easy_install工具,可能需要先安装setuptools,不过更酷的方法是使用ez_setup.py脚本:<br /><br />wget -q http://peak.telecommunity.com/dist/ez_setup.py<br />python ez_setup.py<br /><转载 2010-09-15 09:09:00 · 1241 阅读 · 0 评论