Home
Categories
Dictionary
Glossary
Download
Project Details
Changes Log
What Links Here
FAQ
License

Generating a Python library



In order for the Python modules to work properly, you must copy two additional Python scripts which will be used as a library in the same directory as the script itself. There are two ways of communicating with the framework:

Overview

The two supporting scripts do not depend on the content of the Python script and can be retrieved in the Browser by performing the command Tools => Generate Python Library.
generatepythonlib
Note that the two generated scripts must be compatible with the version of the Java to Python communication. You should regenerate these two scripts if this version has changed for your framework release.

You don't need to open a configuration to generate the Python library. The Python scripts generated for the library are generic and don't depend on the configuration.

Python scripts using UDP or TCP sockets


For Python scripts using UDP communications:
  • The pythonModule.py script
  • The pythonUtils.py script
These modules are only valid for a both a Python 2 or a Python 3 environment.

To generate this version of the libraries, keep the "Http Libraries" checkbox unchecked:
generatepythonlib2

Python scripts using http requests

For Python scripts using http requests:
  • The pythonHttpModule.py script
  • The pythonHttpUtils.py script
These modules are only valid for a Python 3 environment.

To generate this version of the libraries, check the "Http Libraries" checkbox:
generatepythonlib3

See also


Categories: browser

Copyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence