Re: Odd delays when cwd is on a network mount

2019-10-14 Thread Cameron Simpson
On 14Oct2019 10:06, Tobiah wrote: On 10/11/19 6:04 PM, Gregory Ewing wrote: Cameron Simpson wrote: Python's default sys.path includes the current working directory. Only in an interactive session, where it usually makes sense. I was only using the REPL for demonstration. The same delay ha

Re: Odd delays when cwd is on a network mount

2019-10-14 Thread Skip Montanaro
> > The module file > is on the local drive. I only have to have a CWD on the mounted > drive to experience the 25 second delay. > Coming late to the party, but it sounds like the directory is further down sys.path than your current working directory (and possibly other network-mounted directorie

Re: Odd delays when cwd is on a network mount

2019-10-14 Thread Tobiah
On 10/11/19 6:04 PM, Gregory Ewing wrote: Cameron Simpson wrote: Python's default sys.path includes the current working directory. Only in an interactive session, where it usually makes sense. I was only using the REPL for demonstration. The same delay happens when I import a module in a s

Re: Odd delays when cwd is on a network mount

2019-10-11 Thread Cameron Simpson
On 12Oct2019 14:04, Greg Ewing 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

Re: Odd delays when cwd is on a network mount

2019-10-11 Thread Eryk Sun
On 10/11/19, Cameron Simpson wrote: > > Python's default sys.path includes the current working directory. > (Worse: at the front!) Python normally sets the script directory at the front of sys.path to allow a script to override site paths and the standard library. If you're running the REPL, ther

Re: Odd delays when cwd is on a network mount

2019-10-11 Thread Gregory Ewing
Cameron Simpson wrote: Python's default sys.path includes the current working directory. Only in an interactive session, where it usually makes sense. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Odd delays when cwd is on a network mount

2019-10-11 Thread Cameron Simpson
On 11Oct2019 11:06, Tobiah wrote: On 10/11/19 10:56 AM, Tobiah wrote: I have a directory mounted with sshfs over a 5mb connection. It's quite usable under most circumstances. When I run python from a directory under that mount, imports from local directories are quite slow: $ python2.7 impor

Re: Odd delays when cwd is on a network mount

2019-10-11 Thread Tobiah
On 10/11/19 10:56 AM, Tobiah wrote: I have a directory mounted with sshfs over a 5mb connection. It's quite usable under most circumstances. When I run python from a directory under that mount, imports from local directories are quite slow: $ python2.7 import my_module ## takes 25 seconds to

Odd delays when cwd is on a network mount

2019-10-11 Thread Tobiah
I have a directory mounted with sshfs over a 5mb connection. It's quite usable under most circumstances. When I run python from a directory under that mount, imports from local directories are quite slow: $ python2.7 import my_module ## takes 25 seconds to complete my_module.__file__ /local/d