开发者

Pydev relative project path

I installed eclipse with pydev plugin. I need to run my existing project on eclipse. But there are relative paths to the files in开发者_StackOverflow中文版side my code. I expect from eclipse to append relative paths to the project's default directory. Instead, it appends the relative path to the directory where Eclipse is installed. I could not find a way to solve the problem.

Thanks in advance.


I finally found out how to do it and I am writing the answer for other people with the same problem. You can find it in Run Configurations or Debug Configurations. Choose "Python Run" and your run configuration from the left and then in the "Arguments" tab in the right side, set your "working directory" as "other" with giving "the path" on which you want to run your code. Thanks for your interest, Wayne btw.


Take a look in the project settings, I've never used Pydev with Eclipse, but you should be able to set where the project is executed at, or paths for references.

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


Another way to do it is to go to the 'Environment' tab from the "Run Configuration". Add a new variable with name, "PATH", specifying your desired directory in the "Value" box.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜