Python reference plug-in in Netbeans

I work with Netbeans to develop Python, I have a number of projects (which have several modules). Basically I want to know how to import one of these modules into a new project? I tried editing the python path in netbeans, but to no avail. Here is my setup:

Netbeans projects
==================
Projecta
   Modulea
       ClassA.py (Assume a class called TestClass exists in this file)
   Moduleb
       ...
Projectb
   ...
Projectc
   ...

Now what I want to do is a “new project”, this is the following:

from ProjectA.ModuleA.ClassA import TestClass

Do i need to add src folders for each of the projects in pythonpath? I tried this, but still I get "No Module named ..."

+3
1

, Netbeans Python.

, Python (.py) . .

, :

Netbeans projects
=================
PackageA
   __init__.py (This file is crucial for Python to recognise the folder as a package.)
   ClassA.py (Assume a class called TestClass exists in this file)
   ...
PackageB
   ...
PackageC
   ...

ProjectC ( )

from PackageA.ClassA import TestClass

, , Python .py. src, . =]

:

Python

+2

Source: https://habr.com/ru/post/1733158/


All Articles