How do I define a Python library in IDEA 10

In IDEA 10.0.1 with the Python plugin (2.6.5), there is no way to define a Python library as such (there is no "Python" library type, only "Java" and "JavaScript").
Using the "Java" library type, using "Attach Classes" to include the top directory of the module hierarchy, does not work.
How do I do this? (Or is it possible at all?)
Adding the library directory as a source root only works if the library has source (.py) files. If it's all .pyc it does not seem to work. In any case these are libraries and not part of the project source under development, so I would really prefer to have them as "Project Libraries".

1 comment
Comment actions Permalink

Hello Kevin,

Note that the Python plugin doesn't include any parser for .pyc files. The
only thing it can do is build skeletons (reconstruct the declarations) from
them. It's strongly recommended to use source code if you can.

For a directory with .py files, everything should work if you specify it
as a classes root of a regular Java library.

In IDEA 10.0.1 with the Python plugin (2.6.5), there is no way to
define a Python library as such (there is no "Python" library type,
only "Java" and "JavaScript").

Using the "Java" library type, using "Attach Classes" to include the
top directory of the module hierarchy, does not work.

How do I do this? (Or is it possible at all?)

Adding the library directory as a source root only works if the
library has source (.py) files. If it's all .pyc it does not seem to
work. In any case these are libraries and not part of the project
source under development, so I would really prefer to have them as
"Project Libraries".


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Please sign in to leave a comment.