Go Down

Topic: PySerial (Read 997 times) previous topic - next topic


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


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




Now whenever i try to run my script
Code: [Select]

import serial
ser = serial.Serial("COM6", 9600)
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?


Can someone please help me?

Go Up