I have created a PyDev project for each product I'm working on, using the existing product directory as the project root folder, and did not create a 'src' directory when the project was created.
When I open one of these projects in the PyDev perspective, I simply get a listing of the files. For example, there is no toggle to expand SomeClass.py to show its functions, variables, classes, and class methods.
I tried adding the product root directory as the project source folder in the PYTHONPATH settings for the project, but that had no effect.
As a test, I copied my product directory into another directory, like so:
Then, I created a new PyDev project, rooted at TestFolder, and added MyProduct as the source folder for the project, and the package explorer worked as expected, with 'expandable' py files etc.
Looking through the 'manual 101' online, I saw this bit:
"The first thing to know about Pydev is that to use it to its 'full extent',
you must have your python modules beneath a source folder (the source folders
are the paths that are added to your pythonpath). You can add a new source
folder in the menu: File > new > other > pydev > source folder."
I thought that by adding my project root as the source folder, it would take care of this requirement, but it seems not.
So, it boils down to this: is it an absolute requirement to have your source code in a project subdirectory in order to get the full functionality out of the package explorer? If not, what am I doing wrong?
Thanks,
Sean
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That's a bug in the pydev package explorer (please report it in the bug-tracker).
All the other things should work correctly, but unfortunately it won't treat the project as a source folder correctly in the pydev package explorer... so, the structure won't show correctly there (but you can use it like that, as everything else should work).
Cheers,
Fabio
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm trying to use PyDev to work on some Zope & Plone products.
These products are basically laid out like this:
MyProduct/
Extensions/
skins/
__init__.py
SomeClass.py
config.py
I have created a PyDev project for each product I'm working on, using the existing product directory as the project root folder, and did not create a 'src' directory when the project was created.
When I open one of these projects in the PyDev perspective, I simply get a listing of the files. For example, there is no toggle to expand SomeClass.py to show its functions, variables, classes, and class methods.
I tried adding the product root directory as the project source folder in the PYTHONPATH settings for the project, but that had no effect.
As a test, I copied my product directory into another directory, like so:
TestFolder/
MyProduct/
Extensions/
skins/
__init__.py
SomeClass.py
config.py
Then, I created a new PyDev project, rooted at TestFolder, and added MyProduct as the source folder for the project, and the package explorer worked as expected, with 'expandable' py files etc.
Looking through the 'manual 101' online, I saw this bit:
"The first thing to know about Pydev is that to use it to its 'full extent',
you must have your python modules beneath a source folder (the source folders
are the paths that are added to your pythonpath). You can add a new source
folder in the menu: File > new > other > pydev > source folder."
I thought that by adding my project root as the source folder, it would take care of this requirement, but it seems not.
So, it boils down to this: is it an absolute requirement to have your source code in a project subdirectory in order to get the full functionality out of the package explorer? If not, what am I doing wrong?
Thanks,
Sean
my message lost some whitespace when it was posted, my folder structure is like this:
TestFolder/
--MyProduct/
----Extensions/
----skins/
----__init__.py
----SomeClass.py
----config.py
That's a bug in the pydev package explorer (please report it in the bug-tracker).
All the other things should work correctly, but unfortunately it won't treat the project as a source folder correctly in the pydev package explorer... so, the structure won't show correctly there (but you can use it like that, as everything else should work).
Cheers,
Fabio