Python#
The Python module allows you to load your Python source code (Python 2 or Python 3) directly into Lattix. There are two options for loading your Python project into Lattix.
The first option (Python (Understand)) uses the output of SciTools Understand. You will input either a .und file (Understand 6 and above) or a .udb file (Understand 4 and 5) into Lattix. This works for both Python 2 and Python 3, but you will need to have SciTools Understand installed on your machine. Python (Understand) has the following:
Dependencies: Include, Data, Class Method, Declaration
Atom Kinds: Abstract Class, Class, Data, Member, Header File, Method, Source File
The second option (Python) can take one of four different data sources:
Python 3 Files with this option you can add individual Python files to a directory containing all of your Python files. This option uses Pydeps to parse the dependency information in the Python source files. Pydeps is an open-source tool that creates dependency information from Python 3 files. To use this option, you will need to install the Pydeps executable on your machine and configure Lattix to find the Pydeps executable. View Python options to learn how to configure Lattix to use Pydeps.
Pydeps JSON File (only for Python 3) with this option you can import the Pydeps JSON file directly into Lattix. Pydeps must be installed first. Pydeps is an open-source tool that creates dependency information from Python 3 files.
Python 2 snakefood ldi file and Python 2 snakefood ldi.xml file for these two options you will use a combination of snakewood which is an open-source dependency parser and Python Analyzer. First, you will run snakewood over your Python codebase then you will take the output of snakewood and input that into Lattix’s Python Analyzer. This will generate a LDI file which can be loaded into Lattix. You will need to have snakewood installed first. You can find more information on the Python Analyzer here
Options#
Lattix command line#
lattix.plugin.python.PYDEPS_CMD=/usr/local/bin/pydeps
Command line support#
ldcupdate project.ldz -module:python py:python-code-directory