Ben Finney <ben+pyt...@benfinney.id.au> writes:

> * Python will automatically add a ‘sys.path’ entry for the directory
>   containing the script named on the command line. So this:
>
>       $ cd ~/Projects/lorem/
>       $ python3 ./setup.py test
>
>   will run the ‘setup.py’ program with ‘sys.path’ already modified to
>   contain the directory ‘/home/YOURUSERNAME/Projects/lorem’. Any
>   packages in that directory are available for absolute import, *during*
>   that test suite run.

This behaviour is detailed further in the documentation
<URL:https://docs.python.org/3/using/cmdline.html#using-on-interface-options>.

-- 
 \      “The way to build large Python applications is to componentize |
  `\             and loosely-couple the hell out of everything.” —Aahz |
_o__)                                                                  |
Ben Finney

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to