Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

The ripest fruit falls first. -- William Shakespeare, "Richard II"


comp / comp.lang.python / Re: subprocess.Popen does not launch audacity

SubjectAuthor
o Re: subprocess.Popen does not launch audacityMRAB

1
Subject: Re: subprocess.Popen does not launch audacity
From: MRAB
Newsgroups: comp.lang.python
Date: Fri, 10 Jan 2025 20:32 UTC
References: 1 2
Path: news.eternal-september.org!eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!not-for-mail
From: python@mrabarnett.plus.com (MRAB)
Newsgroups: comp.lang.python
Subject: Re: subprocess.Popen does not launch audacity
Date: Fri, 10 Jan 2025 20:32:08 +0000
Lines: 38
Message-ID: <mailman.57.1736541315.2912.python-list@python.org>
References: <735b7965-c16c-45a7-a2b8-d9ff1adc21ba@gmail.com>
<616dcf1e-4f82-48ed-851c-fe5342f42f40@mrabarnett.plus.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de X3rpkOArAqv5AZ1qDRHUXweDn9HvzbqNjQHV9Z+88EcA==
Cancel-Lock: sha1:qMExuL0zqhL7f0nkwlqkP/cscfo= sha256:xMxcmrWultoaU5BPjg+H2LDhzuzG4mnQm+uPywUNKeQ=
Return-Path: <python@mrabarnett.plus.com>
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=plus.com header.i=@plus.com header.b=OnszCaH2;
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.001
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'argument': 0.04;
'skip:\xc2 30': 0.07; 'from:addr:python': 0.09; 'python3.': 0.09;
'received:192.168.1.64': 0.09; 'subject:not': 0.09; 'ubuntu':
0.09; 'unsure': 0.09; 'values.': 0.09; 'approach,': 0.16;
'from:addr:mrabarnett.plus.com': 0.16; 'from:name:mrab': 0.16;
'insufficient': 0.16; 'legacy': 0.16; 'menus': 0.16; 'message-
id:@mrabarnett.plus.com': 0.16; 'pertinent': 0.16;
'received:plus.net': 0.16; 'script.': 0.16; 'subject:does': 0.16;
'wrote:': 0.16; 'python': 0.16; 'applications': 0.17; 'uses':
0.19; 'to:addr:python-list': 0.20; "i've": 0.22; 'problem,': 0.22;
'code': 0.23; 'programming': 0.25; 'tim': 0.26; 'header:User-
Agent:1': 0.30; "doesn't": 0.32; 'guess': 0.32; 'python-list':
0.32; 'but': 0.32; 'received:192.168.1': 0.32; 'there': 0.33;
'script': 0.33; 'header:In-Reply-To:1': 0.34; 'able': 0.34;
'printing': 0.34; 'using': 0.37; 'could': 0.37;
'received:192.168': 0.37; 'list': 0.39; 'prompt': 0.39; 'still':
0.40; 'try': 0.40; 'should': 0.40; 'ten': 0.61; 'skip:\xc2 10':
0.62; 'great': 0.62; 'outside': 0.67; 'below': 0.69; 'essential':
0.70; 'causing': 0.75; '8bit%:100': 0.76; 'converted': 0.84;
'eliminate': 0.84
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plus.com; s=042019;
t=1736541128; bh=WZmh9/QZHDGA7ElZUAlSJzNYs8bZdn6vFC5A63srRPk=;
h=Date:Subject:To:References:From:In-Reply-To;
b=OnszCaH2QFWts6kYo+MpcFDZpm5eRWQmgmYehptcIcmq1uNaieC8Eb1Kp4UQVB7P0
3hGTKyTWZaboVIe84FPy9p9G24/U6K5Cc5Q4NfpR7Sr/6r/ERbSqG9QDFxp2JPbxp+
v1kOr16WuBl/R61n3xPOLjJYLphg1jF6Q+DxpiZQqeMzJPqiTY+uclxGkIUqUAotP4
ChGmpy6quatQsp/mEHhuQwOLWCtIVXMGAwuPM3/HJ5rc+byeC1/DiNtE1S243vMZOg
ynXazAALoW7C36fVvOzCx/G27RGe2sbD1sBGH9FvAfLz6wKie7M0bL/Du8at+ILDgc
o5EE1ySGUaxNg==
X-Clacks-Overhead: "GNU Terry Pratchett"
X-CM-Score: 0.00
X-CNFS-Analysis: v=2.4 cv=XaAqz555 c=1 sm=1 tr=0 ts=678183c8
a=0nF1XD0wxitMEM03M9B4ZQ==:117 a=0nF1XD0wxitMEM03M9B4ZQ==:17
a=IkcTkHD0fZMA:10 a=AqjqI9bG5Nk6KDbP5pkA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10
X-AUTH: mrabarnett@:2500
User-Agent: Mozilla Thunderbird
Content-Language: en-GB
In-Reply-To: <735b7965-c16c-45a7-a2b8-d9ff1adc21ba@gmail.com>
X-CMAE-Envelope: MS4xfLWnOn7zt065ZZ3OAuZ5TBSMtftI84AUUM4cqmmBCMyrt8UYIOmR00gm6I0xZTjcvIwTw534LOGBX5KXa0NVSw5/G805g3gfagcfjDCKW9eP6I4SJYUQ
zV+KJYQSQp5uG1UI6CNccTggsfFBz7JBs26d9pbIq/nU0EQUVwDgoS1MNACTJ4l71OQtq4iPMYkPJFyqMwO57CC2I0CksFkDxBg=
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: <616dcf1e-4f82-48ed-851c-fe5342f42f40@mrabarnett.plus.com>
X-Mailman-Original-References: <735b7965-c16c-45a7-a2b8-d9ff1adc21ba@gmail.com>
View all headers

On 2025-01-10 19:15, Tim Johnson via Python-list wrote:
> Using Python 3.12.3 on Ubuntu 24.04
>
> I've converted a legacy python2 script to python3. All went well.
> However, a glitch from python2 remains.
>
> The script uses dmenu to create menus to pick applications. Applications
> are then invoked from python
>
> using subprocess.Popen(). I have never been able to successfully launch
> audacity using this approach,
>
> which does work for other apps.
>
> I can launch audacity successfully using dmenu_run (on its own, outside
> of the script)
>
> 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.

1

rocksolid light 0.9.8
clearnet tor