A warning is printed if the 64-bit NT build of Python is used.
git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@1010
12e2690d-a6be-4b82-a7b7-
67c4a43b65c8
"""Open the serial port"""
# Make timeout None to wait forever, 0 for non-blocking mode.
+ if os.name=='nt' and sys.version.find('64 bit')!=-1:
+ print "WARNING: PySerial requires a 32-bit Python build in Windows.";
+
if port is None and os.environ.get("GOODFET")!=None:
glob_list = glob.glob(os.environ.get("GOODFET"));
if len(glob_list) > 0:
if self.smartrfpath==None:
self.smartrfpath=os.environ.get("SMARTRF");
if self.smartrfpath==None and os.name=='nt':
- self.smartrfpath="c:/Program Files (x86)/Texas Instruments/SmartRF Tools/SmartRF Studio 7";
- if not os.path.exists(self.smartrfpath):
- self.smartrfpath="c:/Program Files/Texas Instruments/SmartRF Tools/SmartRF Studio 7";
+ pf=os.environ['PROGRAMFILES'];
+ self.smartrfpath="%s\\\\Texas Instruments\\\\SmartRF Tools\\\\SmartRF Studio 7" % pf;
if self.smartrfpath==None:
self.smartrfpath="/opt/smartrf7";