Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #197154
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Thomas Passin <list1@tompassin.net> |
| Newsgroups | comp.lang.python |
| Subject | Re: subprocess.Popen does not launch audacity |
| Date | Fri, 10 Jan 2025 16:53:14 -0500 |
| Lines | 47 |
| Message-ID | <mailman.60.1736546326.2912.python-list@python.org> (permalink) |
| References | <735b7965-c16c-45a7-a2b8-d9ff1adc21ba@gmail.com> <616dcf1e-4f82-48ed-851c-fe5342f42f40@mrabarnett.plus.com> <d40046bc-57c7-436e-b9a2-49af00cc77d7@gmail.com> <5f5b9fdd-1680-470b-bd09-715e67f145bc@tompassin.net> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8; format=flowed |
| Content-Transfer-Encoding | 8bit |
| X-Trace | news.uni-berlin.de 3d5tI2QXxubV93wx3OIQ9AYMzw+mWrboify0GKYH6ykw== |
| Cancel-Lock | sha1:+fEOEhLHhcXB4+Mbu/i9V1asPwA= sha256:TklI4XZ4A5Dsf26tpo5X5RQUSmedq77Vbj7eOAbXpUE= |
| Return-Path | <list1@tompassin.net> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| Authentication-Results | mail.python.org; dkim=pass reason="2048-bit key; unprotected key" header.d=tompassin.net header.i=@tompassin.net header.b=tAEQ4eSD; dkim-adsp=pass; dkim-atps=neutral |
| X-Spam-Status | OK 0.018 |
| X-Spam-Evidence | '*H*': 0.96; '*S*': 0.00; 'argument': 0.04; 'gui': 0.05; 'skip:\xc2 30': 0.07; 'string': 0.07; 'subject:not': 0.09; 'unsure': 0.09; 'values.': 0.09; 'import': 0.15; 'insufficient': 0.16; 'pertinent': 0.16; 'received:10.0.0': 0.16; 'received:64.90': 0.16; 'received:64.90.62': 0.16; 'received:64.90.62.162': 0.16; 'received:dreamhost.com': 0.16; 'script.': 0.16; 'subject:does': 0.16; 'wrote:': 0.16; 'python': 0.16; 'pm,': 0.19; 'to:addr:python-list': 0.20; 'application.': 0.22; 'maybe': 0.22; 'problem,': 0.22; 'command': 0.23; 'run': 0.23; 'code': 0.23; 'programming': 0.25; 'tim': 0.26; 'function': 0.27; '>>>': 0.28; 'header:User-Agent:1': 0.30; "doesn't": 0.32; 'guess': 0.32; 'python-list': 0.32; 'received:10.0': 0.32; 'received:mailchannels.net': 0.32; 'received:relay.mailchannels.net': 0.32; 'but': 0.32; 'there': 0.33; 'path': 0.33; 'header:In-Reply-To:1': 0.34; 'printing': 0.34; "it's": 0.37; 'could': 0.37; 'list': 0.39; 'prompt': 0.39; 'received:100': 0.39; 'still': 0.40; 'want': 0.40; 'try': 0.40; 'should': 0.40; 'ten': 0.61; 'skip:\xc2 10': 0.62; 'great': 0.62; 'skip:r 20': 0.64; 'shows': 0.67; 'worked': 0.67; 'header:Received:6': 0.67; 'received:64': 0.68; 'launches': 0.69; 'below': 0.69; 'essential': 0.70; 'causing': 0.75; '8bit%:100': 0.76; 'choice': 0.76; 'see,': 0.76; '4:00': 0.84; 'eliminate': 0.84; 'redirect': 0.84; 'hidden': 0.95 |
| X-Sender-Id | dreamhost|x-authsender|tpassin@tompassin.net |
| ARC-Seal | i=1; s=arc-2022; d=mailchannels.net; t=1736545996; a=rsa-sha256; cv=none; b=rc0T5FsW1XOLfFDmSFIgHEn2N7G2EW3PCL+zJyJsJM2BK2TFJvnePfsVJQem4XPBg11wsx /KTkzwkc6nGJwlpX5j/NNJ+cNIo0juQRczMf+aWpGE4tpBjrA5W/O2qjW/YhqvALFisYRd SUnIeYi6qnNXUSIMaClhIzBKksrXLXBwSf0zARQ61R6UUU6ksXkFLV+px2KdSoWlzCc7Re AM/TwdnchQlp2eSDliYVUHSd2K/wXSi3okHUMjLVWF5Ym3E3ADZO5L1otfhf8VZaLSLfWK RUHXKqUwDKWtS7ywVt0zdCDIC6CsDO4nTCddPAc1+r4eH9bvxIYS5rkujKYKcg== |
| ARC-Message-Signature | i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1736545996; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=vcRVy63pppF+VspD+q/1/Kiwp1qM+ih5fQXKS6plA3I=; b=mBvCge5FDYFUX00ERUoYpQ/cPR6tw3VZW2t+BlmiXrd0jzAZb3ayaLa5YhwmDW4gZM37Tu 1GvUl1ZpXVDxLylHFHOUQDd2oSQA8vrrx0mgQ9iIeiSbNbPUBLTRErXsZr7iPXl8S73FkO vhLdn9a/NUtfzXhlIMjfvbLRmyhGSPb75cmNlhI5cvU0e2JVyt6K9VA5YDgIu583CdOvff MK/Ul+nJ7tUB7a9cC9IZfYIlHDElD/hYKS1HfQkETxg9jMyrZkRs4kuJ0z6hsuO8bt3/I1 aHzVIZtY4LTbso1/L7AqlM3L4xUNKueuv9Z6PrZPb5ph3aeFP7hpArNgtK0sUw== |
| ARC-Authentication-Results | i=1; rspamd-7df4dcbd86-jxgqv; auth=pass smtp.auth=dreamhost smtp.mailfrom=list1@tompassin.net |
| X-Sender-Id | dreamhost|x-authsender|tpassin@tompassin.net |
| X-MC-Relay | Neutral |
| X-MailChannels-SenderId | dreamhost|x-authsender|tpassin@tompassin.net |
| X-MailChannels-Auth-Id | dreamhost |
| X-Battle-Duck | 4d2231ec5438e5b6_1736545996354_1340854846 |
| X-MC-Loop-Signature | 1736545996354:3427610255 |
| X-MC-Ingress-Time | 1736545996354 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=tompassin.net; s=dreamhost; t=1736545996; bh=vcRVy63pppF+VspD+q/1/Kiwp1qM+ih5fQXKS6plA3I=; h=Date:Subject:To:From:Content-Type:Content-Transfer-Encoding; b=tAEQ4eSDOS9ajpi71DUdJpbfAr1dDl78JpEUQ6p4ebWoex69YMhbIwMw/FMJfJH4+ Dfaug89M5aPvljHvbXmeda8ph2g/FNmzXWKHTwEF2V+HS/qMPyLLnBJxB7KkBOiBw4 vlzIbQlJqnx+UK9r4CHp4ubUUeQerZb6bWVic6vYMHUJnPo5e+fBQybsrqHzQebR9l 7qiiPU7c5cJmajf/vZUawIErHXvFGhBWl9MtPSEIn2AnW9naiyO1yGYsGJaaAcXpt7 4D2Ozk6FY2m78B4fn7jrUPPAkduzpDwVwxIrFr5tdpS3u+CBNeC9gIuYrblWYIJlLn VLnECKR1la6oQ== |
| User-Agent | Mozilla Thunderbird |
| Content-Language | en-US |
| In-Reply-To | <d40046bc-57c7-436e-b9a2-49af00cc77d7@gmail.com> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.39 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <https://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| X-Mailman-Original-Message-ID | <5f5b9fdd-1680-470b-bd09-715e67f145bc@tompassin.net> |
| X-Mailman-Original-References | <735b7965-c16c-45a7-a2b8-d9ff1adc21ba@gmail.com> <616dcf1e-4f82-48ed-851c-fe5342f42f40@mrabarnett.plus.com> <d40046bc-57c7-436e-b9a2-49af00cc77d7@gmail.com> |
| Xref | csiph.com comp.lang.python:197154 |
Show key headers only | View raw
On 1/10/2025 4:00 PM, Tim Johnson via Python-list wrote:
>
> On 1/10/25 11:32, MRAB via Python-list wrote:
>>> ,,, snipped
>
>>> Below is the pertinent code:
>>>
>>> Popen(choice, stdout=PIPE, stderr=PIPE,
>>> stdin=PIPE, close_fds=True)
>>>
>>> My guess is my argument list is either insufficient or an argument is
>>> causing the problem, but am unsure of which.
>>>
>>> I have been retired from python programming for ten years, and am pretty
>>> rusty, but it is still fun. There are plenty
>>>
>>> of other ways to successfully launch audacity but it would be great to
>>> make it work from this script.
>>>
>>
>> What is the value of 'choice'?
>>
>> You could try printing out the value of 'choice' for one that works
>> and the one that doesn't and then try them again interactively from
>> the Python prompt with the given values. That should eliminate all but
>> the essential code for easier debugging.
>
> choice is /usr/local/bin/audacity, which is the correct path for
> audacity on my system. As far as I can see, that string has no hidden
> bytes.
>
> Invoking /usr/local/bin/audacity from the command line launches audacity
> and so does choosing with dmenu_run. which -a audacity shows only that
> item.
>
> Maybe I need to isolate the function call and start stripping out
> parameters. I should have time to do that later today.
I don't know why you would want to redirect stdin, etc. It's a GUI
application.
This worked for me in a Python session on EndeavourOS, python 3.13.1:
>>> from subprocess import run
>>> run('/usr/bin/audacity')
Back to comp.lang.python | Previous | Next | Find similar
Re: subprocess.Popen does not launch audacity Thomas Passin <list1@tompassin.net> - 2025-01-10 16:53 -0500
csiph-web