On Wed, 3 Jul 2019 08:14:43 -0600
Ken McGuire <address@hidden> wrote:
> > >/> Missing $PYTHONPATH!/
> > No comment? Serious problem.
> Well, I'm probably not qualified to comment on that, first time I've
> run into $PYTHONPATH.
Because you have not installed a lot of packages from source.
Ok... so when some code it built & installed from source, you
may or may not need to set $PYTHONPATH, depending on what other
modules your installed code needs. Or whether your code is used by
other code as a module.
> I run many different linux distros:
Sort of, they are all Ubuntu derived, thus very similar.
And those are all Debian derived, thus very similar.
> All of them install Python2 and Python3 by default, and none set
Yes, $PYTHONPATH is for customer installed softare that is not
from upstream packages. Which, if you compile our sources, is the
> I'm not a
> programmer so for something like $PYTHONPATH to escape my knowledge
> is very likely, especially if what I'm doing in Python works without
> it being set.
$PYTHONPATH is not for programmers, it is for users that install
3rd party source.
Think of $PYTHONPATH just like $PATH, except $PYTHONPATH is for
Python modules and $PATH is for scripts and executables.
To see your default built-in $PYTHONPATH:
Python 2.7.16 (default, Jul 1 2019, 17:28:45)
[GCC 9.1.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
['', '/usr/local/lib64/python2.7/site-packages', '/usr/lib64/python27.zip',
Any module in each of those directories can be directly imported.
Modules installed elsewhere will not be found.
Python 2.7.6 (default, Nov 13 2018, 12:45:42)
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more
>>> import sys
So when I run "scons install" it will create/add to my default
path, or is that an exercise left to the user?
Anything I write/wrote will no doubt need some work ;>)) it is
written in C, just like cgps...
> I developed an application that is based on cgps but drives a 240x240
> tft display with location, sig strength and skyview. I did a version
> for the desktop too using SDL2, if you have any interest is having
> this code for an example for gpsd I'd be glad to contribute it.
Yes, but it would need a bit of work to get done. Like removing your
hard coded paths, ensuring Python 2/3 compatibility, documentation,
Not everyone wants/needs to use X or ncurses (or even SDL).
> Attached is a screenshot of what it looks like. (the 2 images were
> taken at different times and are not intended to show the same data)
Nice. gpsd can use some sample graphical clients.