Message159065
>> The semantics of "associated application" change considerably from
>> operating system to operating system. As an example,
>> ``os.startfile("a.py")`` will usually run `a.py` in the Python
>> interpreter, while ``xdg-open a.py`` it will usually open the source
>> code in an editor on Linux.
>
> Outch. I think the behavior should be more similar than that, i.e. that the function should use startfile with the edit action on Windows.
It's a universal problem on all 3 platforms. Given a script file argument, a generic "open" (as opposed to "edit") procedure will either run the script or open it in an editor, depending entirely upon the user's system configuration. Same thing happens when double-clicking a script in the file manager, which is IMO what we're trying to emulate here.
It sounds like some people want a generic "(text) edit" procedure, which IMO is different enough to warrant a separate bug since there are different/more design issues to tackle (e.g. if someone edit()s an image file (or a file of uncertain type) on Unix, what application is opened, and how is that determined?). And no peeking at Mercurial's code; it's under GPLv2, whereas Python is under BSD/MIT-like licensing, making them incompatible. |
|
Date |
User |
Action |
Args |
2012-04-23 18:45:39 | cvrebert | set | recipients:
+ cvrebert, pitrou, vstinner, giampaolo.rodola, benjamin.peterson, eric.araujo, ganadist, Arfrever, r.david.murray, rosslagerwall, smarnach, Roman.Evstifeev, Hobson.Lane |
2012-04-23 18:45:39 | cvrebert | set | messageid: <1335206739.56.0.492901035376.issue3177@psf.upfronthosting.co.za> |
2012-04-23 18:45:38 | cvrebert | link | issue3177 messages |
2012-04-23 18:45:38 | cvrebert | create | |
|