Setting project environment dynamically.

We have a project structure that works like this:
/project_folder (on pythonpath, not a package)
  /<group> (a package folder)
    /<project> (a package subfolder
      manage.py
      settings.py
      /extra (on pythonpath, not a package)
        <egg or package folder>
        ...
      /<appname>
      etc.

Because all our projects work the same way, it has been easy to automate things like adding the contents of /extra to sys.path, and in Emacs I run scripts that do that before using flymake to provide syntax highlighting.

What are the options for dynamically setting the environment in Pycharm? Because manually setting up the environment for each project seems like a pile of unnecessary work.

I see that Python console/Django console have startup scripts, but they seem to run _after_ the console is launched, so they have limited power in terms of path fixups. Is there any script I could hook in that runs at a lower level?
1 comment
Comment actions Permalink
Well, if you really have many many projects, you could just generate the XML files that PyCharm uses to to store its project information through  small python program. Just take a look at the files that PyCharm created after you set one project up manually.
0

Please sign in to leave a comment.