|
Message
From: cvs at opencores.org<cvs@o...>
Date: Mon Feb 26 17:54:55 CET 2007
Subject: [cvs-checkins] MODIFIED: usb_dongle_fpga ...
Date: 00/07/02 26:17:54 Modified: usb_dongle_fpga/sw/Uspp uspp.py Log: Added windows py bindings check with nice info print with link to installer Revision Changes Path 1.2 usb_dongle_fpga/sw/Uspp/uspp.py http://www.opencores.org/cvsweb.shtml/usb_dongle_fpga/sw/Uspp/uspp.py.diff?r1=1.1&r2=1.2 (In the diff below, changes in quantity of whitespace are not shown.) Index: uspp.py =================================================================== RCS file: /cvsroot/nuubik/usb_dongle_fpga/sw/Uspp/uspp.py,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- uspp.py 7 Dec 2006 10:46:48 -0000 1.1 +++ uspp.py 26 Feb 2007 16:54:54 -0000 1.2 @@ -184,10 +184,33 @@ import sys - +drv_ok = 0 if sys.platform=='win32': + print "Windows platform detected:" + #try: + # import notworking_d2xx + # from D2xxPort_win import * + # print "Using D2xx FTDI driver" + # drv_ok = 1 + #except ImportError: + # print "pyUSB for fast COM not found (see http://bleyer.org/pyusb/)" + + if drv_ok == 0: + try: + from win32file import * + from win32event import * from SerialPort_win import * + print "Using VCP FTDI driver" + except ImportError,D2xxPortException: + print "Python for winiows extensions for COM not found" + print "(see https://sourceforge.net/projects/pywin32/)" + print "Could not find any usable support for FTDI chip in python" + print "Try installing python support from one of the links." + sys.exit() + + elif sys.platform=='linux2': + print "Linux platform detected:" from SerialPort_linux import * else: sys.exit('Sorry, no implemented for this platform yet')
|
 |