52.1 redentABQ module

The Python module redentABQ is a wrapper around the Python redent module. The module makes the indentation in a Python text file consistent.

The module can be run as a script from a command prompt using the following statement:

abaqus Python -m redentABQ [options] pathToFile

where the following options are available to customize the redentABQ process:

For more information on running the abaqus Python execution procedure, see Python execution, Section 3.2.10 of the Abaqus Analysis User's Guide.

Access
import redentABQ


52.1.1 indentFile(...)

This method outputs the indented file to the terminal window or backs up the specified file and replaces it.

Required argument

path

A String specifying the file to be processed.

Optional arguments

indent

A String specifying the amount of indentation to be used. The default value is four spaces of indentation. Custom indentation strings must be flanked by quotation marks (" ").

backup

A Boolean specifying whether to back up the file specified in the path argument if changes are made. The default value is False.

runTest

A Boolean specifying whether to test the newly indented file to ensure that it is semantically the same after any changes. The default value is False.

Return value

A Boolean. True, if the indentation is successful; otherwise, False.

Exceptions

None.