'PyCharm how to handle multiple projects

I'm not sure how to handle multiple projects which are dependent on each other in PyCharm.

For better reusability of my code I split a large PyCharm project into a few smaller ones with the structure shown below. In the tags folder I keep "released" copies of my trunk folder, which could be used by other projects.

Project 1                  Project 2
 |- branches                |- branches
 |- tags                    |- tags
    |- ver_01               |- trunk
       - project1_file.py
 |- trunk

Question 1

What is the best way to use methods from Project 1/tags/ver_01 in Project 2 in PyCharm?

In Project 2 I added ver_01 as source (in File-Settings...-Project: Project2-Project Structure). Is there a more pythonic/reasonable/safe way to do this?

Question 2

When I link ver_01 as source the following does not work:

from project1_file import class1.method1 as m

What I have to do is:

from project1_file import class1
m = class1().method1

Why is that? Am I doing something wrong here?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source