Calls to external program from Python
Python, often used to glue together different components of an application, provides various mechanisms to call external programs. By supporting these calls the analyzer can provide the linkage between different technology layers.
Supported API methods
|callLink||Python callable artifact|
Python Call to Java Program, Python Call to Generic Program
Technologies currently handled by the Python analyzer
The Python analyzer currently supports calls to the following technologies
- Java: classes and .jar
The Java technology is specific and has its own object because links are made using the fullname of the class, package and class name.
Furthermore, the link is not made to the class object but directly to its main method. Indeed, Java program can only be called if they contain a main method.
CAST Enlighten screenshots
When a call to an external program is analyzed by the Python analyzer, the following transactions can be found at the end of analysis:
Example of call to an external program
CAST Enlighten screenshot of call to an external program
Python code can also call a different Python program via the python (or jython) executable. Then the analyzer will create, as shown before, "Python Call to Generic Program" objects and they will be linked to the corresponding "Python Main" objects during application level analysis via web service linker extension. For example launch.py will invoke the run.py script in the code below
where the target code contains a code block in the top-level script environment (signaled by the "if __name__ ..." structure).
so as a results we would have