Éric Araujo <mer...@netwok.org> added the comment:

Thanks for relaunching this!

> I'm not sure I understand why this was moved to shutil.open. It seems 
> appropriate to try to accomplish what
> os.startfile() does in a cross-platform way. Don't many of the other os.* 
> calls do this--check os.name and
> then "do the right thing".
They don’t.  The os module is a thin wrapper on top of system functions.  
Cross-platform compat is not achieved with os.name checks but with 
platform-specific code in the C files.  As Windows provides a call named 
startfile, it is exposed.  When we want to provide a higher-level API on top of 
system calls, we use other modules such as shutil.

> fix minor shutil.disk_usage() doctext typo
Would you report this on another bug report or simply with a mail to the 
d...@python.org mailing list?  Thanks.

> Name changed from shutil.open to shutil.launch due to namespace conflict with 
> open() builtin within the shutil
> module and for users that do from shutil import *
I don’t think these are good arguments.  A lot of modules expose a function 
named open: tarfile, codecs, tokenize...  Python has namespaces, let’s use 
them.  The argument about import * is not strong either in my opinion, because 
all our docs recommend against this idiom.

One argument against open is that the other open functions I mention above 
return a file object, like the builtin open.  With this in mind I agree that a 
better name should be found.  I dislike launch though because it brings to my 
mind the idea of running/executing a program, not opening it in the appropriate 
program.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue3177>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to