Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ʹÓÃpython²Ù×÷´®¿Ú

Ò»¡¢
ΪÁËʹÓÃpython²Ù×÷´®¿Ú£¬Ê×ÏÈÐèÒªÏÂÔØÏà¹ØÄ£¿é:
1. pyserial (http://pyserial.wiki.sourceforge.net/pySerial)
2. pywin32 (http://sourceforge.net/projects/pywin32/)
¶þ¡¢
google “python ´®¿Ú ²Ù×÷”¹Ø¼ü×Ö£¬ÕÒµ½Ïà¹Øpython´úÂ룬
ÎÒÊÇ´Óhttp://currentlife.blog.sohu.com/53741351.htmlÒ³ÃæÉÏ¿½±´µÄ´úÂë¡£
Ô۵òο¼È˼ҵĴúÂëÐ޸ġ£
Èý¡¢
·¢ËÍÊý¾Ý¿ÉÓÃchrºÍpack×é×°´¦Àí£¬È磺
snd = ''
snd += chr(97)
data = 0x12345678
snd += pack.('i', data)
snd += chr(0x64)
self.l_serial.write(snd);
#·¢Ë͵ÄÊý¾ÝÊÇ(16½øÖÆ)£º61 78 56 34 12 64
½ÓÊÕµÄÊý¾ÝÓÃordº¯Êý£¬½«×Ö½ÚÄÚÈݱäΪÕûÊý£¬½øÐÐÅжϴ¦Àí¡£
È磺if ord(recv[2])== 0x01:
ÅжÏrecv[2]ÊÇ·ñÊÇ0x01.
×¢Ò⣺²»ÄÜÕâÑù±È½Ï
if recv[2] == 'a':
   pass
Ò²²»ÄÜÕâÑù±È½Ï
if recv[2] == 0x97:
   pass
ÒòΪpythonµÄ×Ö·û´®´æ´¢»úÖÆÎÒ²»Çå³þ£¬ËùÒÔ²»ÖªµÀΪʲôÕâÑù±È½Ï²»¿ÉÒÔ¡£
Ìûµã´úÂ룬ÒÀ¾ÝÇ°ÃæµÄ²Î¿¼´úÂëÐ޸ĵģº
#coding=gb18030
import sys,threading,time;
import serial;
import binascii,encodings;
import re;
import socket;
from struct import *;
class ComThread:
    def __init__(self, Port=0):
        self.l_serial = None;
        self.alive = False;
        self.waitEnd = None;
        self.port = Port;
    def waiting(self):
        if not self.waitEnd is None:
            self.waitEnd.wait();
    def SetStopEvent(self):
        if not self.waitEnd is None:
            self.waitEnd.set();
        self.alive = False;
        self.stop();
    def start(self):
        self.l_serial = serial.Serial();
        self.l_serial.port = self.port;
        self.l_se


Ïà¹ØÎĵµ£º

python ·ÖÐÎ


´úÂëÈçÏ£º
#!/usr/bin/env python
# -*-coding:UTF-8-*-#
from common import *
import Image, ImageFilter, math, sys, os, random
def modifyImageObj(img, matrix) :
    width, height = img.size   
   
    for h in range(0, height) :&n ......

python²ÂÊý×ÖÓÎÏ·

from random import randint              #µ¼ÈëËæ¼´º¯Êý
def guessNum():                          &nbs ......

python ¶ÁдExcelÎļþ

http://sourceforge.net/projects/pyexcelerator/
12ÔÂ2ÈÕ
python ¶ÁдExcelÎļþ£¨×ªÌû limodou£©
http://www.lexicon.net/sjmachin/xlrd.htm
Õâ¸ö°üÊÇÓÃÀ´¶ÁExcelÎļþµÄ
ÔÚ·¢ÏÖ xlrd Ö®ºó²»¾Ã¾Í·¢ÏÖÁË pyExcelerator
£¬ËüÓë xlrd ²»Í¬£¬ËüÖ÷ÒªÊÇÓÃÀ´Ð´ Excel Îļþ£¬µ±È»¶ÁÒ²ÊÇûÓÐÎÊÌâµÄ¡£ÏÂÃæ¾ÍËüµÄʹÓüòµ¥µØ½éÉ ......

ÔÚLinuxϵͳÉÏʵÏÖÓÃPythonÔ¶³Ì·ÃÎÊOracleÊý¾Ý¿â

1¡¢ÏÂÔØoracleÈí¼þ
http://www.oracle.com/technology/software/tech/oci/instantclient/index.html
oracle-instantclient-basic-10.2.0.4-1.i386.rpm
oracle-instantclient-sqlplus-10.2.0.4-1.i386.rpm
oracle-instantclient-devel-10.2.0.4-1.i386.rpm
2¡¢°²×°rpm°ü
rpm -ivh oracle-instantclient-basic-10.2.0.4 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ