shadown / python-on-a-chip

Automatically exported from code.google.com/p/python-on-a-chip
Other
0 stars 0 forks source link

Make pyserial module optional for ipm-host #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
From Tyler Wilson:

Since the ipm.py may be used in a desktop-only environment, the
pyserial package is not strictly needed. (In addition, under sygwin,
there is no pyserial package available in the setup, so it must be
installed from source, which is a bit more work than perhaps most want
to deal with). So in the ipm.py, instead of a direct import serial, it
may make sense to do something like:

try:
   import serial
except:
   print("No serial package available. Will default to desktop
mode.")

I tested this locally, and it worked fine for me.

Original issue reported on code.google.com by dwhall...@gmail.com on 16 Apr 2009 at 11:08

GoogleCodeExporter commented 9 years ago
In src/tools/ipm.py, relocated "import serial" into the SerialConnection class' 
constructor and wrapped it with try/except and added a message where to get 
pySerial if 
it wasn't available.

System tests don't apply to src/tools/ipm.py.  Tested ipm.py manually (but not 
on a 
computer without the serial module)

Original comment by dwhall...@gmail.com on 19 Apr 2009 at 1:40

GoogleCodeExporter commented 9 years ago
Mainlined directly, see r343

Original comment by dwhall...@gmail.com on 19 Apr 2009 at 1:42

GoogleCodeExporter commented 9 years ago

Original comment by dwhall...@gmail.com on 19 Apr 2009 at 1:43

GoogleCodeExporter commented 9 years ago
Changed r08 to R08

Original comment by dwhall...@gmail.com on 12 Mar 2010 at 8:22

GoogleCodeExporter commented 9 years ago

Original comment by dwhall...@gmail.com on 13 Mar 2010 at 1:30