git.net

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

Odd delays when cwd is on a network mount


On 12Oct2019 14:04, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
>Cameron Simpson wrote:
>>Python's default sys.path includes the current working directory.
>
>Only in an interactive session, where it usually makes sense.

Personally, I would not consider this:

  % python3 -c 'import sys;print(repr(sys.path))'
  ['', '/Users/cameron/lib/python', '/Users/cameron/rc/python', 
  '/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python37.zip', 
  '/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7', 
  '/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload', 
  '/Users/cameron/var/venv/3.7.1/lib/python3.7/site-packages']

to be interactive. It is at a terminal, but that seems a very low bar.

I see that plain "python filename.py" does not include the current 
directory though.

Cheers,
Cameron Simpson <cs at cskk.id.au>