Skip to content

robot.pythonpathsetter

Modifies sys.path if Robot Framework's entry points are run as scripts.

When, for example, robot/run.py or robot/libdoc.py is executed as a script, the robot directory is in sys.path but its parent directory is not. Importing this module adds the parent directory to sys.path to make it possible to import the robot module. The robot directory itself is removed to prevent importing internal modules directly.

Does nothing if the robot module is already imported.