Operating systems, development tools, and professional services
for connected embedded systems
for connected embedded systems
![]() |
![]() |
![]() |
![]() |
python
Object-oriented programming and scripting language
Syntax:
python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Runs on:
Neutrino
Options:
- -c cmd
- Pass the cmd string as the program to run. This option terminates the option list.
- -d
- Display debugging output from the parser. You can also enable this by setting PYTHONDEBUG to a nonzero value.
- -E
- Ignore Python's environment variables (such as PYTHONPATH).
- -h
- Print a help message, and then exit.
- -i
- Inspect interactively after running the script, and force prompts, even if stdin doesn't appear to be a terminal. You can also enable this by setting PYTHONINSPECT to a nonzero value.
- -m mod
- Run the specified library module as a script. This option terminates the option list.
- -O
- Optimize the generated byte code (a tad). You can also enable this by setting PYTHONOPTIMIZE to a nonzero value.
- -OO
- Remove doc-strings in addition to performing the -O optimizations.
- -Q arg
- Control the behavior of the division (/) operator, where
arg is one of the following:
- old -- use floor division for integral arguments, and true division for floating-point or complex arguments.
- warn -- generate a warning if / (instead of //) is used for integer division.
- warnall -- generate a warning whenever / is used.
- new -- always perform true division.
The default is old.

This option will be removed in version 3.0 of Python, and the / operator will always perform true division. For more information, see http://www.python.org/dev/peps/pep-0238/. - -S
- Don't imply import site on initialization.
- -t
- Issue warnings about inconsistent tab usage.
- -tt
- Issue errors about inconsistent tab usage.
- -u
- Use unbuffered binary for stdout and stderr. See the Python documentation for details on internal buffering related to this option. You can also enable this by setting PYTHONUNBUFFERED to a nonzero value.
- -v
- Be verbose (trace import statements). You can also enable this by setting PYTHONVERBOSE to a nonzero value.
- -V
- Print the Python version number, and then exit.
- -W arg
- Warning control; arg is action:message:category:module:lineno.
- -x
- Skip the first line of source, allowing the use of non-Unix forms of #!cmd.
- file
- Read the program from this script file.
- -
- Read the program from stdin (the default; Python uses interactive mode if run on a tty).
- arg ...
- Arguments to pass to the program in sys.argv[1:].
Description:
Python is a high-level, object-oriented programming language that supports powerful programming constructs, can be integrated with other languages such as C and C++, and is extendible through the addition of libraries and modules. You can use Python for programs and sophisticated scripts.
![]() |
We don't support Python on Linux or Windows. If you need Python on these hosts, you should download it from http:www.python.org. |
Environment variables:
- PYTHONCASEOK
- Ignore case in import statements (Windows).
- PYTHONDEBUG
- Display debugging output from the parser.
- PYTHONHOME
- An alternate prefix directory (or prefix:exec_prefix). The default module search path uses prefix/pythonX.X.
- PYTHONINSPECT
- Inspect interactively after running the script, and force prompts, even if stdin doesn't appear to be a terminal.
- PYTHONOPTIMIZE
- Optimize the generated byte code (a tad).
- PYTHONPATH
- A colon-separated list of directories prefixed to the default module search path. The result is stored in sys.path.
- PYTHONSTARTUP
- The file to execute on interactive startup (no default).
- PYTHONUNBUFFERED
- Use unbuffered binary for stdout and stderr. See the Python documentation for details on internal buffering.
- PYTHONVERBOSE
- Be verbose (trace import statements).
See also:
Writing Shell Scripts chapter of the Neutrino User's Guide
![]() |
![]() |
![]() |
![]() |

![[Previous]](../prev.gif)
![[Contents]](../contents.gif)
![[Index]](../keyword_index.gif)
![[Next]](../next.gif)