Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #101565
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Christian Gollwitzer <auriocus@gmx.de> |
| Newsgroups | comp.lang.python |
| Subject | Re: use Python and an outlook: protocol URL to bring up a specific email |
| Date | Tue, 12 Jan 2016 19:04:35 +0100 |
| Organization | A noiseless patient Spider |
| Lines | 20 |
| Message-ID | <n73f2f$t5m$1@dont-email.me> (permalink) |
| References | <ab47c98f-69af-49ee-b1c4-bced0c48a001@googlegroups.com> <CAPTjJmpjk+LVUmV9orqvVVmbWNXzsBYKO+be3A8P62znZZF5kQ@mail.gmail.com> <CACL+1auQXdkXyV0J22nKpOxt0ZLEGdkvHzxc-Mp2MfiJXsW_ug@mail.gmail.com> <mailman.79.1452621162.13488.python-list@python.org> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Tue, 12 Jan 2016 18:01:51 -0000 (UTC) |
| Injection-Info | mx02.eternal-september.org; posting-host="b226113fb883624f743392f09400182d"; logging-data="29878"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18AwjtjMfs6rVlP+3vtmkTWrTTtkHw80Fw=" |
| User-Agent | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 |
| In-Reply-To | <mailman.79.1452621162.13488.python-list@python.org> |
| Cancel-Lock | sha1:kheK6K4aK4WzkRBKHy2QWpyc0/o= |
| Xref | csiph.com comp.lang.python:101565 |
Show key headers only | View raw
Am 12.01.16 um 18:52 schrieb Chris Angelico:
> On Wed, Jan 13, 2016 at 4:37 AM, eryk sun <eryksun@gmail.com> wrote:
>>
>> start is a shell command. It also has a quirk that the first quoted
>> argument is the window title. Here's the correct call:
>>
>> subprocess.check_call('start "title" "%s"' % url, shell=True)
>
> Is that properly escaped to handle any arbitrary URL? I doubt it.
>
> Do you actually need shell=True? I would strongly recommend using the
> form that I used, unless it can be proven that that doesn't work.
As stated, start is not an executable on Windows, but it is a built-in
command of cmd.exe. And thus it has very quirky quotation rules. This is
unlike Linux, where "xdg-open" is a shell script, and OSX, where "open"
is a binary executable.
Christian
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
use Python and an outlook: protocol URL to bring up a specific email jkn <jkn_gg@nicorp.f9.co.uk> - 2016-01-12 08:51 -0800
Re: use Python and an outlook: protocol URL to bring up a specific email Chris Angelico <rosuav@gmail.com> - 2016-01-13 04:10 +1100
Re: use Python and an outlook: protocol URL to bring up a specific email jkn <jkn_gg@nicorp.f9.co.uk> - 2016-01-12 09:22 -0800
Re: use Python and an outlook: protocol URL to bring up a specific email eryk sun <eryksun@gmail.com> - 2016-01-12 11:37 -0600
Re: use Python and an outlook: protocol URL to bring up a specific email Chris Angelico <rosuav@gmail.com> - 2016-01-13 04:52 +1100
Re: use Python and an outlook: protocol URL to bring up a specific email Christian Gollwitzer <auriocus@gmx.de> - 2016-01-12 19:04 +0100
Re: use Python and an outlook: protocol URL to bring up a specific email eryk sun <eryksun@gmail.com> - 2016-01-12 13:12 -0600
csiph-web