PythonStartupCode

Revision as of 16:03, 20 August 2025 by Lchrisman (talk | contribs) (Created page with "category:Python integration ''new to Analytica 7.0'' == SysVar PythonStartupCode == Python code that is executed when the python environment is loaded. When you nee...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

new to Analytica 7.0

SysVar PythonStartupCode

Python code that is executed when the python environment is loaded.

When you need to use specific Python libraries in your model, you can add the imports here. This also helps to document which Python libraries your model uses, since it is the natural place to look for this information. For this reason, it is a best practice to import the libraries your model uses here. Note however that a model or an Analytica library may import a library from within a variable or Callable and not list it here, so the absence of an import in PythonStartupCode doesn't not mean a library is not used.

When you change your startup code after a python environment is already running, the startup code is immediately re-run.

How to edit

To edit this system variable, make sure you aren't editing an attribute, and then navigate to its Object window from the Definition menu as:

Definition / Application integration / Python / Model Environment
Python menu.png


See also

Comments


You are not allowed to post comments.