[Python-Dev] Enhancing the shutil module

Michael Foord fuzzyman at voidspace.org.uk
Mon Jan 18 14:57:49 CET 2010


On 18/01/2010 13:46, Doug Hellmann wrote:
>
> On Jan 18, 2010, at 8:34 AM, Masklinn wrote:
>
>> On 18 Jan 2010, at 13:40 , Nick Coghlan wrote:
>>>
>>> Tarek Ziadé wrote:
>>>> There's one remaining external call for "zip" done if the zip module
>>>> is not found, but I am happy to remove it and throw an exception if
>>>> it's not found, and keep the external "zip" call on Distutils side, so
>>>> shutil stays 100% stdlib-powered.
>>>
>>> +1 for that approach. These changes all sound like nice additions to
>>> shutil, and hooray for every module that gets adopted by an active
>>> maintainer :)
>>
>> Isn't it a bit weird to include that to shutil though? shutil 
>> advertises itself as "a number of high-level operations on files and 
>> collections of files." 

Well - isn't what's being proposed "a number of high-level operations on 
files and collections of files." ?

>> and from what I understood it was a bunch of shell-type utility functions

like tar and zip? :-)

>> to easily copy, move or remove files and directories (that's pretty 
>> much all there is in it at this time).
>>

I don't think the additions are out of place prima-facie.

>> Wouldn't it make more sense to put those "archive utils" 
>> functions/objects in a new module separate from shutil, dealing 
>> specifically with cross-archive APIs and linked from the current 
>> archive-specific modules (essentially, just take the current 
>> archive_util, move it to the toplevel of the stdlib and maybe rename 
>> it)? It would also make the module much easier to find when searching 
>> through the module listing, I think.
>
> +1
>

Proliferation of modules is itself a bad thing though.

Michael


> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: 
> http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk 
>


-- 
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog

READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (”BOGUS AGREEMENTS”) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer.





More information about the Python-Dev mailing list