The Python Shell

class PythonShell

OpenStructure has a powerful Python Shell which has some handy features. It is completely integrated into OpenStructure and allows you enter Python code.

Multi line detection

The Python Shell detects automatically if a code block is complete or not. For example a simple print statement in the command line is a complete code block. Therefore the code will be executed after pressing enter:

../../_images/100210_single_line.png

When a multiline codeblock (like a for loop or an if instruction) is being entered in the command line, the code is not executed until the code block is complete:

../../_images/100210_multi_line.png

When a code block is not complete, pressing enter appends an empty line at the end of the code block. To execute such a code block, you simply have to press enter twice.

Auto completion

After pressing tab in the Python Shell, it returns you possible extensions to your entered text. This feature can be used for completing variable names or functions:

../../_images/100210_auto_completion.png

It is also possible to complete a file system path string. By pressing tab while editing a string, the shell displays all file or folders of the given directory:

../../_images/100210_path_completion.png

Search

Enter search terms or a module, class or function name.

Contents

Documentation is available for the following OpenStructure versions:

(Currently viewing dev) / 2.8 / 2.7 / 2.6 / 2.5 / 2.4 / 2.3.1 / 2.3 / 2.2 / 2.1 / 2.0 / 1.9 / 1.8 / 1.7.1 / 1.7 / 1.6 / 1.5 / 1.4 / 1.3 / 1.2 / 1.11 / 1.10 / 1.1

This documentation is still under heavy development!
If something is missing or if you need the C++ API description in doxygen style, check our old documentation for further information.