In PyCharm, how to import a Python script from one project to another?

Answered

How to import a Python script in one PyCharm project to another PyCharm project

0
3 comments
Avatar
Permanently deleted user

Copy/paste within PyCharm? Filesystem copy, at the OS level?

Not sure there's any functions within PyCharm to facilitate that process for you.

0

One can:

  • add the first project as a content root in Settings | Project ... | Project Structure
  • add the first project to the interpreter paths in Settings | Project ... | Project Interpreter | Gear button | Show All | Show paths for the selected interpreter

A more reliable approach is to distribute the first project as a package with setup.py.

1

from PROGRAM_NAME import *

0

Please sign in to leave a comment.