New Session

Start a new Python session.

Provide a path to a .py file on disk. Variables and functions declared in this module will be available from LabVIEW. You may launch as many Python sessions as you want. Each will run in a separate process and is isolated from the others.

This VI returns a session identifier. Pass the identifier to other Toolkit VI's like Pack, Call or Get Value to interact with your Python module. When finished, remember to call Close Session with this identifier to close the session and shut down Python.

This VI will launch the default version of Python installed on your computer (See Picking the default Python installation). To use a specific version of Python, wire an absolute path to Optional Path to Python.exe.

By default, the Python console will not be displayed. You can change this by wiring a value to the Console Visibility terminal.

../_images/New.png
int32_out Session ID out
New session identifier.
path_in Path to Python Module (.py file)
Absolute path to your Python module (.py) file on disk.
path_in Optional Path to Python.exe
Python interpreter to use. If not supplied, uses whichever interpreter is configured as the default.
enum_in Console Visibility
  • Show Console: console pops up and remains
  • Show Console While Running: console disappears once Python exits
  • Hide Console: (default)
error_in error_out Error In/Out
Terminals for standard error functionality.