Emerge: Plotting build dependencies graph, emerge -k/-j

Ralf Habacker ralf.habacker at freenet.de
Thu Jul 22 13:30:47 CEST 2010


Sascha L. Teichmann schrieb:
> Am 22.07.2010 11:45, schrieb Ralf Habacker:
>   
>> in portage.py I also found the following change - for what is this good ?
>>
>>         # TODO: Impove importing ...
>>         suff_indices, suff_idx = imp.get_suffixes(), 1
>>         for idx, suff in enumerate(suff_indices):
>>             if suff[0] == ".py": suff_idx = idx; break
>>         return imp.load_module( modulename.replace('.', '_'),
>>             fileHdl, module, suff_indices[suff_idx] )
>>
>>     
>
> I forgot to mention. This makes the portage loading compatible
> with GNU/Linux (my main working system) as well. The
> imp.get_suffixes() returns different lists on the different systems.
> Checking for the explicit position of '.py' ensures that it works
> on both platforms.
>   
Thanks for this explanation - there is still a TODO note in the related 
code part: Could this be removed ?

Just one additional question - I guess I can uncompress the for loop to 
the following code snippet:

        for idx, suff in enumerate(suff_indices):
            if suff[0] == ".py": 
		suff_idx = idx
		break


Ralf



More information about the Kde-windows mailing list