Paraneeth How does pyserial work for you? can you provide details? which platform?
I tested on linux machine and confirmed pyserial works. Just curious how can it be done on windows. thanks, On May 6, 8:56 am, frankz <[email protected]> wrote: > How can i fix this? for wintypes, i put the ctypes folder under site- > packages, it doesn't make any change. Same thing after I put wintypes > directly under site-packages. I also restart the web2py. > Is there any generic way to import packages? like pyserial, it has a > package name - pyserial-2.5-rc2, should i copy the whole folder to > site-packages and then add path to pyserial2.5-rc2? > > thanks, > > On May 5, 11:20 pm, Jason Brower <[email protected]> wrote: > > > Sounds like something called wintypes is missing. See if you can install > > that. > > Jason > > > ----- Original message ----- > > > hi all, > > > I want to import pyserial package. however, got an import error. I > > > tried a really simple module and it imports just fine. I am not sure > > > which problem is it. > > > > thanks for help! > > > > Controller > > > ======= > > > > def start(): > > > import sys > > > path = "C:\\Documents and Settings\\frank.zhu\\My Documents\ > > > \Downloads\\web2py\\site-packages\\" > > > if path not in sys.path: > > > sys.path.append(path) > > > # kick off the serial driver > > > import serial > > > # update bus state in the database > > > return dict(session.bus) > > > > Error > > > ==== > > > > Traceback (most recent call last): > > > File "gluon/restricted.py", line 178, in restricted > > > File "C:/Documents and Settings/frank.zhu/My Documents/Downloads/ > > > web2py/applications/dms/controllers/default.py", line 82, in <module> > > > File "gluon/globals.py", line 96, in <lambda> > > > File "C:/Documents and Settings/frank.zhu/My Documents/Downloads/ > > > web2py/applications/dms/controllers/default.py", line 30, in start > > > File "C:\Documents and Settings\frank.zhu\My Documents\Downloads > > > \web2py\site-packages\pyserial-2.5-rc2\serial\__init__.py", line 19, > > > in <module> > > > File "C:\Documents and Settings\frank.zhu\My Documents\Downloads > > > \web2py\site-packages\pyserial-2.5-rc2\serial\serialwin32.py", line > > > 12, in <module> > > > File "C:\Documents and Settings\frank.zhu\My Documents\Downloads > > > \web2py\site-packages\pyserial-2.5-rc2\serial\win32.py", line 2, in > > > <module> > > > ImportError: No module named wintypes

