Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #86274
| References | <mcg4e1$mcq$1@speranza.aioe.org> <54EBA649.8030401@stoneleaf.us> |
|---|---|
| From | Ian Kelly <ian.g.kelly@gmail.com> |
| Date | 2015-02-23 15:29 -0700 |
| Subject | Re: new.py and having '.' in PYTHONPATH |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.19106.1424730589.18130.python-list@python.org> (permalink) |
On Mon, Feb 23, 2015 at 3:14 PM, Ethan Furman <ethan@stoneleaf.us> wrote: > On 02/23/2015 01:00 PM, Tobiah wrote: > >> Anyway, it raises the question as to whether having '.' in the >> PYTHONPATH is at all a sane thing to do. > > The current directory is added to sys.path /only/ for the interactive interpreter. When executing a file, the directory containing the file is added to sys.path instead, which amounts to the same thing if the file that you're executing is in your current working directory.
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
new.py and having '.' in PYTHONPATH Tobiah <toby@tobiah.org> - 2015-02-23 13:00 -0800 Re: new.py and having '.' in PYTHONPATH sohcahtoa82@gmail.com - 2015-02-23 14:07 -0800 Re: new.py and having '.' in PYTHONPATH Ethan Furman <ethan@stoneleaf.us> - 2015-02-23 14:14 -0800 Re: new.py and having '.' in PYTHONPATH Ian Kelly <ian.g.kelly@gmail.com> - 2015-02-23 15:29 -0700
csiph-web