robotcodedev / robotcode

RobotFramework support for Visual Studio Code
https://robotcode.io
Apache License 2.0
172 stars 14 forks source link

PYTHONPATH #114

Closed damianoneill closed 1 year ago

damianoneill commented 1 year ago

Please describe. A clear and concise description of the problem and the question at hand.

I have a vscode installation where the PYTHONPATH for local modules is set using the .env file.

cat .env
PYTHONPATH=.:./Utilities:./Utilities/Selenium:./Libs/:./Libs/Galileo:./Libs/SeleniumBase%

Is is possible to tell robotcode to use this .env file to get the PYTHONPATH for robotcode?

Thanks, Damian.

Desktop (please complete the following information):

d-biehl commented 1 year ago

At the moment, unfortunately, it is not possible to use an .env file to run robot tests in VSCode with RobotCode. But I think there is also no common way to run robot tests on the console using this .env file, maybe you have one?

For now, you can set the PythonPath in the VSCode Settings for RobotCode. Have a look in the settings of VSCode for the robotcode.robot.pythonPath setting. It corresponds to the command line switch --pythonpath of Robot.

Maybe it would be an idea to add something like this to RobotCode? Would you be interested in creating an enhancement request for it?

d-biehl commented 1 year ago

Is your question answered? Can I close this issue?

damianoneill commented 1 year ago

Thanks @d-biehl yes.