Pages: [1]   Go Down
Author Topic: PySerial  (Read 496 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 25
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi All.
I have been trying to use pyserial.
I have python 2.6.1 and pyserial 2.4
I have reninstalled pyserial and tried diffrent versions but nothing works.
whenever i type in "import serial" this is what happens
Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import serial
  File "C:\Python26\lib\site-packages\serial\__init__.py", line 18, in <module>
    from serialwin32 import *
  File "C:\Python26\lib\site-packages\serial\serialwin32.py", line 9, in <module>
    import win32file  # The base COM port and file IO functions.
ImportError: No module named win32file
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Looks like you just need to install the pywin32 package for python:

http://sourceforge.net/projects/pywin32/

Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 25
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 25
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Now whenever i try to run my script
Code:
import serial
ser = serial.Serial("COM6", 9600)
ser.write('5')
raw_input("Press return to close this window...")
it doesn't write to serial
when i type all that into the shell manualy it works fine.
Any Ideas?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 25
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can someone please help me?
Logged

Pages: [1]   Go Up
Jump to: