[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ✘"Can't find packet library")
From: |
Gary E. Miller |
Subject: |
Re: ✘"Can't find packet library") |
Date: |
Mon, 27 Jul 2020 16:25:50 -0700 |
Yo James!
The code to look in the "ancestors" does not do what you think it does:
# Look for Library in ancestors
cwd = os.path.abspath(__file__)
cwd_part = cwd.split(os.sep)[:-1]
print("%s" % cwd_part)
for index in range(len(cwd_part), 0, -1):
packet_path = os.sep.join(cwd_part[:index] + ['gps', 'packet.py.in'])
if os.path.exists(packet_path) and os.path.isfile(packet_path):
packet_paths.append(os.sep.join(
cwd_part[:index]) + os.sep + packet_name)
Run in /usr/local/src/GPS/gpsd/gpsd it prints:
SNARD ['', 'usr', 'local', 'lib64', 'python2.7', 'site-packages', 'gps']
It should be looking in /usr/local/src/GPS/gpsd/gpsd. So never woekd.
RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
gem@rellim.com Tel:+1 541 382 8588
Veritas liberabit vos. -- Quid est veritas?
"If you can't measure it, you can't improve it." - Lord Kelvin
pgpcaElUu6ZQ4.pgp
Description: OpenPGP digital signature
- ✘"Can't find packet library"), Gary E. Miller, 2020/07/26
- Re: ✘"Can't find packet library"), Bernd Zeimetz, 2020/07/28
- Re: ✘"Can't find packet library"), Bernd Zeimetz, 2020/07/28
- Re: ✘"Can't find packet library"), Gary E. Miller, 2020/07/28
- Re: ✘"Can't find packet library"), Gary E. Miller, 2020/07/28
- Re: ✘"Can't find packet library"), Bernd Zeimetz, 2020/07/28
- Re: ✘"Can't find packet library"), Gary E. Miller, 2020/07/28
- Re: ✘"Can't find packet library"), Gary E. Miller, 2020/07/28
- Re: ✘"Can't find packet library"), Fred Wright, 2020/07/29
- Re: ✘"Can't find packet library"), Gary E. Miller, 2020/07/29
- Re: ✘"Can't find packet library"), Fred Wright, 2020/07/29