Search code examples
pycharmpydev

Import project created in PyCharm to Eclipse with PyDev


I have two computers - one running ubuntu and another running windows. Trying to work on the same Django project that I created on my ubuntu using PyCharm. (I absolutely love PyCharm and would prefer to keep using it on my ubuntu box rather than switching to eclipse with pydev).

My question is: Is there some way that I can import the project created in PyCharm into eclipse with PyDev on my windows machine?

I have an idea, but would like some validation on it before I continue to ensure I don't bung things up.

Because both PyCharm and eclipse have their specific project folders/files that have no name conflicts, my plan was the following:

  1. Clone my current PyCharm project to my windows rig
  2. Create a virtualenv on my windows machine which will pertain to the project.
  3. Create a dummy pdev project and create a new interpreter pointing to this venv
  4. Copy my .project and .pydevproject to the directory of my cloned project.
  5. Edit the contents of these files to have the name of the PyCharm project.

Then I could simply push this stuff to my repo and whenever I open the project in PyCharm, it would look for project info in the /.idea/ folder and when I open the project in PyDev for Eclipse, it should look in the .project and .pydevproject folder, correct?

Ideally this solution would mean I wouldn't even have to inform the IDE of a different virtualenv folder each time I loaded, as they would have two separate references to the proper location of the venv.

Anyways, thanks for your time and let me know if this would work, or if there's no harm in giving it a test!


Solution

  • Well, there should be no problem having a project configured in both as you're describing (I've seen many projects configured with both and committing both configurations to the repo in case there are developers in the same project dealing with one or the other IDE).

    I didn't really get why create the dummy pydev project instead of just creating a project pointing directly at that location in the PyDev side (not that your approach wouldn't work, but you can just go through the File > New > PyDev Project wizard and select as the directory the directory with your sources).

    Also see: http://www.pydev.org/faq.html#PyDevFAQ-HowdoIimportexistingprojects%2FsourcesintoPyDev%3F