[Chicago] Anaconda vs. IDLE.
David Rock
david at graniteweb.com
Thu Oct 15 15:21:43 CEST 2015
* Lewit, Douglas <d-lewit at neiu.edu> [2015-10-15 08:08]:
>
> *//anaconda/bin:/Users/administrator/anaconda/bin:/Users/administrator/anaconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin*
>
>
> Now let's turn to IDLE for a moment.
>
>
> *import os*
>
> *print( os.getenv("PATH") )*
>
>
> *'/usr/bin:/bin:/usr/sbin:/sbin' #### NOT the same as above!!!*
>
> If anyone can provide a solution I would be very grateful. Is there some
> way (using "os" or "sys" functions) that I can get IDLE to "see" my
> computer's complete path? I tried to find a solution on Stack Overflow,
> but the stuff I found there was a little incoherent.
How are you starting IDLE? If you are starting it from the Terminal, it should inherit the same $PATH.
As for setting it within IDLE, you used os.getenv to see $PATH, try using os.putenv to set it:
os.putenv("PATH","/anaconda/bin:/Users/administrator/anaconda/bin:/Users/administrator/anaconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin")
--
David Rock
david at graniteweb.com
More information about the Chicago
mailing list