[Tutor] when is a generator "smart?"

Mark Lawrence breamoreboy at yahoo.co.uk
Mon Jun 3 11:21:12 CEST 2013


On 03/06/2013 08:41, Jim Mooney wrote:
> On 2 June 2013 23:56, eryksun <eryksun at gmail.com> wrote:
>> On Mon, Jun 3, 2013 at 12:44 AM, Jim Mooney <cybervigilante at gmail.com> wrote:
>>> On 2 June 2013 20:33, eryksun <eryksun at gmail.com> wrote:
>
>
>>
>> I looked into PC/getpathp.c. The value of PythonPath shown above is
>> only a fallback for when Python is embedded. Otherwise the interpreter
>> can determine sys.prefix from the exe path, and substitute it for the
>> dots in the following hard-coded path:
>>
>>      .\DLLs;.\lib;.\lib\plat-win;.\lib\lib-tk
>
> Using Python 2.7 on Windows 7
>
> Ah, useful. A lot more than is on windows path and PYTHONPATH
> obviously gets snuck in there. Sure enough, I queried sys.path and
> there's a Lot more in there. But even that wasn't everything since I
> saw RLPy and vtk had also set up their own system variables when I
> checked the environment. But those are special variables. From now on
> if I'm not sure something is on the path I can just query sys.path and
> see if it's there. Good to know.
>
> If I dump a package (not sure how to do that beyond just deleting it,
> but I've tried some bad ones, so I'd like to) how do I remove it from
> sys.path, or do I need to? I know the windows path and the registry
> have a bad habit of accumulating stuff that is no longer there, and
> just keeping it. Programs add to the windows path, but when you
> uninstall them, don't delete from the path, and it grows and grows.
>

On Windows Vista Control Panel->System->Advanced System Settings->System 
Properties->Advanced->Environment Variables.  The path is displayed as a 
user setting and a system setting, edit either at your own risk. 
Programs are available to clear unused settings from the registry.  I 
use them quite happily but if you're unsure of what you're doing I'd 
just leave things alone, you'll probably sleep better for it :)

-- 
"Steve is going for the pink ball - and for those of you who are 
watching in black and white, the pink is next to the green." Snooker 
commentator 'Whispering' Ted Lowe.

Mark Lawrence



More information about the Tutor mailing list