robotology / gym-ignition-models

Collection of robot models compatible with gym-ignition
https://github.com/robotology/gym-ignition
GNU Lesser General Public License v3.0
24 stars 7 forks source link

Automatically set environment variables when used from Python #26

Closed diegoferigo closed 4 years ago

diegoferigo commented 4 years ago

This PR simplifies downstream usage by automatically exporting the required environment variables during the Python package import process. It removes the need to remembering doing it when used downstream.

Furthermore, since the package init is executed only once even if the package is imported multiple times, there's no possibility to see the same content appended multiple times in the exported env variables as it would happen calling manually multiple times setup_environment.