Author Hobson.Lane
Recipients Arfrever, Hobson.Lane, Roman.Evstifeev, benjamin.peterson, cvrebert, eric.araujo, ganadist, giampaolo.rodola, pitrou, r.david.murray, rosslagerwall, smarnach
Date 2012-04-24.07:14:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CACZ_DoeLZM5N9qxJZ0UnJbf=rLRXjXbVpqb6R68yrn=YZPJqSg@mail.gmail.com>
In-reply-to <1335182013.36.0.802943288691.issue3177@psf.upfronthosting.co.za>
Content
I can see why this partial implementation of `operation` in this ver seems
useless. But it is a placeholder for eventually providing Linux/Mac users
with the same functionality as windows. The os.startfile() or
shutil.launch() function can easily fill the gap left by the OS, which is
what os does for lots of other missing  OS features on one platform or
another.

I'll delete the OS9 ('mac') test comment and leave an implementation for
those platforms up to others?

`gui` is for software that intends to launch user's $EDITOR, vi, nano,
emacs, etc. This is intended to generalize startfile to encompass a common
pattern, e.g. in bzr, hg. Perhaps it doesn't belong in ver1 until we sort
out all the other uncomfortable things about this patch.

I'll test all the windows and linux exception possabilities and get back to
you on what exceptions startfile() normally raises, and whether this
implementation of shutil.launch() raises comparable exceptions.

Cheers,
H
On Apr 23, 2012 7:53 PM, "Chris Rebert" <report@bugs.python.org> wrote:

>
> Chris Rebert <pybugs@rebertia.com> added the comment:
>
> `operation` seems questionable. IMO, the verbs seem stronger / more
> important than mere optional suggestions (particularly "open" vs. "edit"
> for files with read-only viewers), and only Windows supports them (so
> anyone requiring that feature might as well just use startfile() directly).
> By virtue of this function being cross-platform, we're kinda limited to
> just supporting the lowest common denominator.
>
> Hobs, can you explain `gui`?
>
> Also, does startfile() raise exceptions for either of the basic error
> conditions ("no such file" and "no associated application")? If not, I
> believe using the lower-level ShellExecute (
> http://msdn.microsoft.com/en-us/library/windows/desktop/bb762153%28v=vs.85%29.aspx) or similar Windows API function would allow us to report such errors, as
> the other platform implementations currently do.
>
> ----------
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue3177>
> _______________________________________
>
History
Date User Action Args
2012-04-24 07:14:06Hobson.Lanesetrecipients: + Hobson.Lane, pitrou, giampaolo.rodola, benjamin.peterson, eric.araujo, ganadist, Arfrever, r.david.murray, cvrebert, rosslagerwall, smarnach, Roman.Evstifeev
2012-04-24 07:14:06Hobson.Lanelinkissue3177 messages
2012-04-24 07:14:05Hobson.Lanecreate