Python: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
Generic things: | Generic things: | ||
The Python style guide is described in [[https://www.python.org/dev/peps/pep-0008/ PEP 8]] | |||
==Modules== | |||
To add the location of your own modules to the python search path put it in the PYTHONPATH variable. | |||
;import sys | ;import sys | ||
| Line 8: | Line 13: | ||
;import getopt | ;import getopt | ||
:Module to parse the | :Module to parse the commandline arguments (sys.argv). Default available | ||
Revision as of 15:02, 20 May 2018
Generic things:
The Python style guide is described in [PEP 8]
Modules
To add the location of your own modules to the python search path put it in the PYTHONPATH variable.
- import sys
- Number of system variables
- sys.argv
- List of everything on the commandline. sys.argv[0] is the program itself.
- import getopt
- Module to parse the commandline arguments (sys.argv). Default available