Pievsky relative way

I installed eclipse with the pydev plugin. I need to run my existing project on eclipse. But there are relative file paths inside my code. I expect eclipse to add relative paths to the project's default directory. Instead, it adds the relative path to the directory where Eclipse is installed. I could not find a way to solve the problem.

Thanks in advance.

+4
source share
3 answers

I finally found out how to do this, and I am writing an answer to other people with the same problem. It can be found in the "Launch Configurations" or "Debug Configurations" section. Select "Python Run" and your launch configuration on the left, and then on the "Arguments" tab on the right, set the "working directory" as "different", specifying the "path" where you want to run your code. Thanks for your interest, Wayne btw.

+5
source

Take a look at the project settings, I have never used Pydev with Eclipse, but you should be able to set where the project is running, or paths for links.

Of course, there may be a better solution, but hopefully some help!

0
source

Another way to do this is to go to the “Environment” tab from “Run Configuration”. Add a new variable named "PATH" by specifying the desired directory in the "Value" field.

0
source

Source: https://habr.com/ru/post/1315182/


All Articles