Message165141
I'm running ver 2.7 and added the serial library from source forge. here is the error I get:
Traceback (most recent call last):
File "C:\Python27\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 326, in RunScript
exec codeObject in __main__.__dict__
File "C:\Documents and Settings\Administrator\My Documents\WTF.py", line 3, in <module>
import serial
ImportError: No module named serial
here is my code:
# Echo client program
import socket
import serial
HOST = '216.240.155.229' # The remote host
PORT = 9090 # The same port as used by the server
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))
ser = serial.Serial('USB0', timeout=3)
x = 0
#while x < 5:
while True:
msg = ser.readline()
s.send(msg)
x += 1
s.close() |
|
Date |
User |
Action |
Args |
2012-07-10 02:09:51 | JuliusMiller | set | recipients:
+ JuliusMiller |
2012-07-10 02:09:51 | JuliusMiller | set | messageid: <1341886191.07.0.139059548156.issue15312@psf.upfronthosting.co.za> |
2012-07-10 02:09:50 | JuliusMiller | link | issue15312 messages |
2012-07-10 02:09:49 | JuliusMiller | create | |
|