The Python Oracle

How can I use a Python script in the command line without cd-ing to its directory? Is it the PYTHONPATH?

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Track title: CC H Dvoks String Quartet No 12 Ame

--

Chapters
00:00 Question
00:59 Accepted answer (Score 199)
02:56 Answer 2 (Score 60)
03:21 Answer 3 (Score 39)
04:03 Answer 4 (Score 5)
04:33 Thank you

--

Full question
https://stackoverflow.com/questions/1991...

Accepted answer links:
http://docs.python.org/2/using/cmdline.h...
[shebang]: http://en.wikipedia.org/wiki/Shebang_%28...

Answer 3 links:
https://the-hitchhikers-guide-to-packagi.../
http://docs.python.org/3/tutorial/module...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #unix

#avk47