From 24af045d93c9c835757e96147a37db9383f7b6c4 Mon Sep 17 00:00:00 2001 From: travisutk Date: Sun, 24 Apr 2011 17:01:20 +0000 Subject: [PATCH] Better locating of SmartRF Studio 7. 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 --- client/GoodFET.py | 3 +++ client/GoodFETCC.py | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/client/GoodFET.py b/client/GoodFET.py index 0d32cca..de3ce7d 100755 --- a/client/GoodFET.py +++ b/client/GoodFET.py @@ -76,6 +76,9 @@ class GoodFET: """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: diff --git a/client/GoodFETCC.py b/client/GoodFETCC.py index 165aa73..2427e03 100644 --- a/client/GoodFETCC.py +++ b/client/GoodFETCC.py @@ -24,9 +24,8 @@ class GoodFETCC(GoodFET): 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"; -- 2.20.1