Ask Your Question

What is the right way to set up project python paths for sharing?

asked 2018-01-30 21:34:00 -0600

Philip Bloom's avatar

updated 2019-03-13 08:48:06 -0600

We are starting to refactor a larger python project into subfolders (with for packaging).  From:




What is the best to set at the project level, "Please presume Bigfolder should be scanned for autocomplete information for all files in subfolders"?    I can add a custom python path, but that isn't project relative and is stored in the user file (wpu) rather than the (wpr).  Ideally I want to make it easy for the team to refactor while not losing the excellent source data and autocompletion we presently enjoy or need them to manually add things to the project to get it.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2018-01-31 11:27:00 -0600

One way to do this is to put you main debug file in the same folder as Bigfolder.  This works because the directory that the main debug file is in is prepended to the python path.  You can also move the custom python path setting into the .wpr file by setting the proj.shared-attribute-names list as described in

edit flag offensive delete link more


Thanks, was unaware of shared-attribute-names.   Will try that and it definitely moves us a step forward.  We generally use an initial folder outside as this is a framework that produces a lot of temporary data in the working directory (it's meant for build systems).  We also tend to have a lot of small scripts on the framework in the same project.  Is there a good way to prepend the project path to the python path?  That'd be taking it even better if possible.

Philip Bloom's avatar Philip Bloom  ( 2018-01-31 18:57:00 -0600 )edit

You can use the ${WING:PROJECT_HOME} pseudo environment variables to define your python path.  The project home defaults to the directory of the project file, but can be set to a another directory which is stored as a relative path.

Wingware Support's avatar Wingware Support  ( 2018-02-01 10:53:00 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2018-01-30 21:34:00 -0600

Seen: 701 times

Last updated: Mar 07 '19