Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info
The Python action in Continua is a wrapper around the python.exe command line. If you're having trouble using the Python action, please refer to the Command Line Reference.

Python action is used to run python scripts, modules or commands.

...

What To Run

Select what to run. The relevant fields are located in their respective tabs.

  • Script
  • Module
  • Command

Command Line Version

...

If this is ticked and exists, the pip python executable in the virtual environment scripts folder will be used instead.

...

If you create a property collector for this action, make sure you select the Path Finder PlugIn type and give it a name that will match the pattern above in blue. Example names listed here, search the table's Plugin column for "PipPython".

For more in-depth explanations on property collectors see Property Collectors.

...

List of arguments to be passed to the module. One per line.


Commands

Image RemovedImage Added

Commands

Python code to be executed in command. One statement per line or separated by a ';' with significant leading white space as in normal module code. It is suggested that this method is used only when running simple commands. [-c]

...

If this is ticked, the user site-packages directory is not added to the sys.path. This is implied if python is run in isolated mode. [-s]

Division Control Semantics

Control the semantics of division. [-Q]

  • old - division of int/int and long/long return an int or long (default)
  • new - new division semantics, i.e. division of int/int and long/long returns a float
  • warn - old division semantics with a warning for int/int and long/long
  • warnall - old division semantics with a warning for all uses of the division operator

Note that this option is only available in Python version 2.x.

Validation of Hash-Based .pyc Files

Control the validation behavior of hash-based .pyc files. [----check-hash-based-pycs]

  • Default - checked and unchecked hash-based bytecode cache files will be validated according to their default semantics.
  • Always - all hash-based .pyc files, whether checked or unchecked, will be validated against their corresponding source file.
  • Never - hash-based .pyc files will be validated against their corresponding source files.

...

If this is ticked, the first line of the source is skipped. This allows the use of non-UNix Unix forms of #!cmd. This is intended for a DOS specific hack only. [-x]

...

Whether to issue a warning or error when comparing bytes or bytearray with str or bytes with int. [-b | -bb]

Indentation Issues

Select whether to issue a warning or error when a source file mixes tabs and spaces for indentation in a way that makes it depend on the worth of a tab expressed in spaces. [-t | -tt]

Note that this option is only available in Python version 2.x

Warning Control

This option controls how often warnings are output to stderr. Leave blank to default to one warning for each source line where it occurs. [-W]

Multiple options may be given; when a warning matches more than one option, the action for the last matching option is performed. Invalid options are ignored (though, a warning message is printed about invalid options when the first warning is issued).

The simplest form of argument is one of the following action strings:

  • ignore - Ignore all warnings
  • default - Explicitly request the default behaviour (printing each warning once per source line)
  • all - Print a warning each time it occurs (this may generate many messages if a warning is triggered repeatedly for the same source line, such as inside a loop)
  • module - Print each warning only the first time it occurs in each module
  • once - Print each warning only the first time it occurs in the program.
  • error - Raise an exception instead of printing a warning message.

The full form of argument is: action:message:category:module:line

For more information, please refer to the warnings module in the python documentation.

Warn about Python 3.x possible incompatibilities

If this is ticked, a 'DeprecationWarning' is emitted for features that are removed or significantly changed in Python 3 and can’t be detected using static code analysis. [-3]

Note that this option is only available in Python versions 2.6 and 2.7.

Timeout (in seconds) 

How many seconds to wait for the action to finish before timing out. The default is 86400 seconds (24 hours).

...

If this is ticked, any warnings logged will not mark the action with a warning status. [-W]Individual warnings filters are specified as a sequence of fields separated by colons: 'action:message:category:module:line'.


Environment

Environment Variables

...