[wingide-users] Pythonpath and executable in wpu not wpr

Michael Foord fuzzyman at voidspace.org.uk
Fri Dec 24 08:10:34 MST 2010

On 21/10/2010 15:31, Wing IDE Support wrote:
> On 10/21/10 7:15 AM, Michael Foord wrote:
>> *However*, both the Python executable and the custom PYTHONPATH settings
>> are stored as absolute locations in the .wpu file. This means when I
>> create a new branch I have to reconfigure.
> Are you sure they're absolute?  They should be stored as the strings 
> you enter.  You can look at the .wpr/.wpu file (they're text) to 
> verify this.  Wing will complain if you have a python path with 
> relative directories because they cause problems for the debugger when 
> the script being debugged changes the directory.  A better approach 
> may be to use an environment variable or the ${WING:PROJECT_DIR} 
> pseudo environment variable.

Ok, so the wing project file is stored in the "tools" subdirectory of 
the project. (Wing still doesn't really like not having the project file 
in the root directory. I have to expand '..' to use the project browser.)

So I tried to add a custom Python Path to the project of 
"${WING:PROJECT_DIR}/../src". This seems to work ok - but again was 
saved in the wpu and not the wpr. When I reopen the project browser it 
has split this path on the ':' and appears as two entries in the Python 

For the initial directory (also saved in the wpu) I used 

> You can move individual setting into the .wpr file by setting 
> proj.shared-attribute-names in the .wpr file w/ a text editor.
> This would get you the same as the default:
> proj.shared-attribute-names=['proj.shared-attribute-names', 
> 'proj.directory-list', 'proj.file-list', 'proj.file-type', 
> 'proj.main-file', 'testing.test-file-list', 
> 'testing.auto-test-file-specs', 'testing.test-framework']

So I copied the above and added 'proj.initial-dir', and 'proj.pypath'. I 
then copied those values from the wpu into the wpr.

That seemed to work fine. Thanks very much for the help.

All the best,

Michael Foord
> This would add in proj.pyexec:
> proj.shared-attribute-names=['proj.shared-attribute-names', 
> 'proj.directory-list', 'proj.file-list', 'proj.file-type', 
> 'proj.main-file', 'testing.test-file-list', 
> 'testing.auto-test-file-specs', 'testing.test-framework', 'proj.pyexec']
> Cheers,
> John
> _________________________________________________
> Wing IDE users list
> http://wingware.com/lists/wingide


May you do good and not evil
May you find forgiveness for yourself and forgive others
May you share freely, never taking more than you give.
-- the sqlite blessing http://www.sqlite.org/different.html

More information about the wingide-users mailing list