Pydev在Eclipse中默认工作目录 [英] Pydev in Eclipse default working directory

查看:305
本文介绍了Pydev在Eclipse中默认工作目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的项目的默认工作目录是什么?我的工作区下有几个项目,以及几个运行配置。我使用os.getcwd(),该目录转到其他项目的文件夹,删除所有运行配置后,该目录转到eclipse的安装文件夹。如何使默认工作目录进入我的项目文件夹或\src文件夹?



编辑:



在我的PYTHONPATH中,将用于运行:

  C:\Program Files\eclipse\dropins\ plugins\org.python.pydev_1.5.4.2010011921\PySrc\pydev_sitecustomize; 
C:\(MyProjectDirecotry)\\src;
C:\Python26;
C:\Python26\DLLs;
C:\Python26\lib;
C:\Python26\lib\lib-tk;
C:\Python26\lib\plat-win;
C:\Python26\lib\site-packages

也许有code> C:\Program Files\eclipse\dropins\plugins\org.python.pydev_1.5.4.2010011921\PySrc\pydev_sitecustomize; 在第一行导致问题。为什么会这样呢?如何将其恢复为默认值?谢谢。

解决方案

打开运行对话框...->选择运行配置 - >参数选项卡 - >工作目录: p>

我的设置为$ {workspace_loc}:test / src / for在我的工作空间中创建的项目名称测试


What is the default working directory for my project? I have several projects under my workspace, and a couple of run configurations. I use os.getcwd() and the directory goes to other project's folder, after deleting all run configurations, the directory goes to eclipse's install folder. How to make the default working directory goes to my project folder or the \src folder?

EDIT:

In my PYTHONPATH that will be used in the run:

C:\Program Files\eclipse\dropins\plugins\org.python.pydev_1.5.4.2010011921\PySrc\pydev_sitecustomize;
C:\(MyProjectDirecotry)\\src;
C:\Python26;
C:\Python26\DLLs;
C:\Python26\lib;
C:\Python26\lib\lib-tk;
C:\Python26\lib\plat-win;
C:\Python26\lib\site-packages

maybe there's C:\Program Files\eclipse\dropins\plugins\org.python.pydev_1.5.4.2010011921\PySrc\pydev_sitecustomize; in the first line causing the issue. Why is this happened? How to revert it back to default? Thanks.

解决方案

Open Run Dialog...-> Select your run configuration->Arguments Tab->Working directory:

mine is set to ${workspace_loc}:test/src/ for a project name test i created in my workspace

这篇关于Pydev在Eclipse中默认工作目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆