[Tutor] Importing serial module

Hans Dushanthakumar Hans.Dushanthakumar at navman.com
Mon Aug 22 07:14:10 CEST 2005


Hi Folks
   Another newbie here :) Heres a couple of questions:

1) I downloaded the python serial port module (pyserial-2.2.win32.exe)
from http://sourceforge.net/project/showfiles.php?group_id=46487
And installed it on my Win XP PC.
   However, when I try to import the module, I get the foll: error

>>> import serial
Traceback (most recent call last):
  File "<pyshell#61>", line 1, in ?
    import serial
  File "C:\Python\Lib\site-packages\serial\__init__.py", line 13, in ?
    from serialwin32 import *
  File "C:\Python\Lib\site-packages\serial\serialwin32.py", line 9, in ?
    import win32file  # The base COM port and file IO functions.
ImportError: No module named win32file
>>> 

   Is there something else that I need to specify?

2) I want to send data (ascii text) to a serial port, but at the same
time want to keep monitoring incoming data in that same serial port.
Whats the best approach to do this? Multithreading? Or is there a more
straightforward/easier approach?

Cheers
Hans


More information about the Tutor mailing list