gpsd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-users] using the python gps module without scons install


From: Gary E. Miller
Subject: Re: [gpsd-users] using the python gps module without scons install
Date: Thu, 7 Mar 2019 14:19:05 -0800

Yo shouldbe!

On Thu, 7 Mar 2019 22:09:00 +0000
shouldbe q931 <address@hidden> wrote:

> > That should help you adjust your PYTHONPATH. :)
> >  
> 
> I looked at the above for over half a dozen times before I realised
> that there was no error when the command was run in gpsd/ rather than
> gpsd/gps/

Sorry, I thought the clockmaker script was clear on that.  Please submit
a patch to the doc if you have a way to make that clearer.

Try not to confuse how you install and use gpsd with clockmaker, versus
the normal install and useage.

> If I can ask a followup question, I had taken
> https://docs.python.org/2/tutorial/modules.html#the-module-search-path
> where it says "When a module named spam is imported, the interpreter
> first searches for a built-in module with that name. If not found, it
> then searches for a file named spam.py in a list of directories given
> by the variable sys.path"


Yup.  And PYTHONPATH gets folded into sys.path.  So the way a user
adjusts sys.patch is with PYTHONPATH.

> is waf/python also searching for a matching
> directory name, or is there something else in the gpsd directory that
> it is using ?

Lost me.  There is no waf/python.

When you run a python program in the location that clockmaker tells you to,
then the gps is in that directory (.), which is in sys.path.

Easy to see you sys.path:

    $ python
    Python 2.7.15 (default, Sep 12 2018, 11:58:35) 
    [GCC 8.2.0] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import sys
    >>> sys.path
    [...]


RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        address@hidden  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can’t measure it, you can’t improve it." - Lord Kelvin

Attachment: pgpYopThfAvYF.pgp
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]