[wingide-users] Changing Python Path from Script

Wingware Support support at wingware.com
Fri Jan 12 18:00:46 MST 2007


Michael Foord wrote:
>> Hope this helps.  I'd still consider redesigning code so it runs 
>> without a unique python path for each script.
>>
>>   
> Let me explain our use case. It shouldn't be that unusual.
> 
> All our imports are absolute imports based on the directory of our main 
> script. This means that the Python path needs to be :
> 
>    Directory of main script
>    Main Directory/Python24

Hmm, the directory of the main script should already be added to the 
python path so it doesn't really need to be explicitly set in the Python 
path.  Is Python24 a copy of python 2.4 or something else?  If it's a 
copy of 2.4, you could just use one copy of it.  If it's something else, 
then you might be stuck for now.  I've thought of creating a 
pseudo-environment variable for these situations so that something like 
'${project base directory}/Python24' could be used.

Would that solve your problem?

Cheers,

John


More information about the wingide-users mailing list