.py question

Colin Watson cjwatson at ubuntu.com
Tue Apr 23 14:53:27 UTC 2019

On Tue, Apr 23, 2019 at 10:37:20AM -0400, Gene Heskett wrote:
> I think the one we're calling, calls others from it. And the instructions 
> say to unpack the zip, but don't say where.

When that happens it usually means that you can make a directory of your
choice and do stuff there, as long as you're consistent in doing
everything relative to that directory.

> On Tuesday 23 April 2019 09:04:16 Colin Watson wrote:
> > Try just running the program without any of that first, though.  If
> > any modules are unavailable then it will tell you.
> the error when I type in an ssh session:
> python3 vna.pyRETURN
> "can't find vna.py"
> So obviously its not in the python3 version of $PATH, and I'm lost.  
> Hence this thread

The Python equivalent of $PATH (sys.path) shouldn't be relevant.  When
you give a file name on the command line like that, it's resolved using
the perfectly normal rules for opening a relative path in any program -
that is, it's resolved relative to the current working directory.

Does "cat vna.py" in the very same context work?

(That said, I would normally expect the following output when the given
file name is missing: "python3: can't open file 'vna.py': [Errno 2] No
such file or directory".  But maybe you're paraphrasing rather than
copying and pasting error messages, or maybe this device has a weird
Python installation.)

Colin Watson                                       [cjwatson at ubuntu.com]

More information about the ubuntu-users mailing list