Re: [Python-Dev] PEP 376 - get_egginfo_files

2009-07-08 Thread Sridhar Ratnakumar
On Sun, 05 Jul 2009 11:46:58 -0700, Paul Moore wrote: 2009/7/5 P.J. Eby : At 05:26 PM 7/5/2009 +0100, Paul Moore wrote: def get_distribution(name): for d in get_distributions(): if d.name == name: return d return None Btw, this is broken code anyway, because it's no

Re: [Python-Dev] PEP 376 - get_egginfo_files

2009-07-05 Thread Paul Moore
2009/7/5 Tarek Ziadé : > 2009/7/5 Paul Moore : >> The PEP says: >> >> """ >> get_egginfo_files(local=False) -> iterator of paths >> >> Iterates over the RECORD entries and return paths for each line if the >> path is pointing a file located in the .egg-info directory or one of >> its subdirectory.

Re: [Python-Dev] PEP 376 - get_egginfo_files

2009-07-05 Thread Paul Moore
2009/7/5 P.J. Eby : > At 05:26 PM 7/5/2009 +0100, Paul Moore wrote: >> >> def get_distribution(name): >>    for d in get_distributions(): >>        if d.name == name: >>            return d >>    return None > > Btw, this is broken code anyway, because it's not handling > case-insensitivity or name

Re: [Python-Dev] PEP 376 - get_egginfo_files

2009-07-05 Thread Tarek Ziadé
2009/7/5 P.J. Eby : > At 05:26 PM 7/5/2009 +0100, Paul Moore wrote: >> >> def get_distribution(name): >>    for d in get_distributions(): >>        if d.name == name: >>            return d >>    return None > > Btw, this is broken code anyway, because it's not handling > case-insensitivity or name

Re: [Python-Dev] PEP 376 - get_egginfo_files

2009-07-05 Thread Tarek Ziadé
2009/7/5 Paul Moore : > The PEP says: > > """ > get_egginfo_files(local=False) -> iterator of paths > > Iterates over the RECORD entries and return paths for each line if the > path is pointing a file located in the .egg-info directory or one of > its subdirectory. > """ > > Should this method real

Re: [Python-Dev] PEP 376 - get_egginfo_files

2009-07-05 Thread P.J. Eby
At 05:26 PM 7/5/2009 +0100, Paul Moore wrote: def get_distribution(name): for d in get_distributions(): if d.name == name: return d return None Btw, this is broken code anyway, because it's not handling case-insensitivity or name canonicalization. (I've mentioned t

[Python-Dev] PEP 376 - get_egginfo_files

2009-07-05 Thread Paul Moore
The PEP says: """ get_egginfo_files(local=False) -> iterator of paths Iterates over the RECORD entries and return paths for each line if the path is pointing a file located in the .egg-info directory or one of its subdirectory. """ Should this method really only return filenames noted in the REC