Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > de.comp.lang.python > #6280

Re: [Python-de] Re: subprocess.call() funktioniert nicht mit Windows?

Path csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From "Peter Heitzer" <peter.heitzer@rz.uni-regensburg.de>
Newsgroups de.comp.lang.python
Subject Re: [Python-de] Re: subprocess.call() funktioniert nicht mit Windows?
Date 27 Mar 2025 09:16:23 GMT
Lines 27
Message-ID <m4kjb7F9relU1@mid.individual.net> (permalink)
References <vs0k86$ukp$1@rusnews.informatik.uni-stuttgart.de> <198c8db5-3320-48fc-a119-5ff6f299cc5d@goebel-consult.de>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
X-Trace individual.net LD8xUvTat9u0HCq7smp4uwKML33LuEefC/4WnvcGMZF7a917cBSohPjR2J
X-Orig-Path not-for-mail
Cancel-Lock sha1:s17u52QQMDcb1FARsxITfaNE3LM= sha256:mkzbvOCuf682twCxdSvzO+SOnNIqaZfYEcEP5C5ZitU=
User-Agent tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.1.0-32-amd64 (x86_64))
Xref csiph.com de.comp.lang.python:6280

Show key headers only | View raw


Hartmut Goebel <h.goebel@goebel-consult.de> wrote:
>Hi,
>> def syscall(*cmd):
>>    cmd = ['cmd','/d','/c']+list(cmd)
>>    subprocess.call(cmd)

>Ich habe keine Ahnung von Windows, wunder mich aber, weshalb Du cmd /d 
>/c davor stellst. Ich hätte vermutet, dass Python sich selbst darum 
>kümmert, wenn es nötig wäre.
Das kann auch vom PyInstaller kommen. Ich habe PyInstaller ein paar
mal probiert und war wenig begeistert. Ich verwende lieber einen
generischen Installer (NSIS).
Für einen Test mit einem zugegebenerweise primitiven Programm mit
guizero bin ich wie folgt vorgegangen.
Python installiert:
python-3.13.2-amd64.exe /passive TargetDir="%userprofile%\py3" InstallAllUsers=0 Include_doc=0 Include_test=0
Danach ins Verzeichnis %userprofile%\py3 gewechselt und guizero
nachinstalliert.
py3> Scripts\pip.exe install guizero

Danach lege ich mein Pythonskript in py3 oder einem Unterverzeichnis
dort ab und packe das Verzeichnis py3 in ein Installationspaket mit
NSIS, das nach dem Auspacken pythonw.exe mit dem Pfad zum Skript
aufruft. 

-- 
Dipl.-Inform(FH) Peter Heitzer, peter.heitzer@rz.uni-regensburg.de

Back to de.comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

subprocess.call() funktioniert nicht mit Windows? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2025-03-26 10:17 +0000
  [Python-de] Re: subprocess.call() funktioniert nicht mit Windows? Hartmut Goebel <h.goebel@goebel-consult.de> - 2025-03-26 22:02 +0100
    Re: [Python-de] Re: subprocess.call() funktioniert nicht mit Windows? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2025-03-26 22:35 +0000
      [Python-de] Re: subprocess.call() funktioniert nicht mit Windows? Hartmut Goebel <h.goebel@goebel-consult.de> - 2025-03-27 16:24 +0100
        Re: [Python-de] Re: subprocess.call() funktioniert nicht mit Windows? "Peter Heitzer" <peter.heitzer@rz.uni-regensburg.de> - 2025-03-27 16:00 +0000
    Re: [Python-de] Re: subprocess.call() funktioniert nicht mit Windows? "Peter Heitzer" <peter.heitzer@rz.uni-regensburg.de> - 2025-03-27 09:16 +0000
      Re: [Python-de] Re: subprocess.call() funktioniert nicht mit Windows? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2025-03-27 23:31 +0000
        Re: [Python-de] Re: subprocess.call() funktioniert nicht mit Windows? "Peter Heitzer" <peter.heitzer@rz.uni-regensburg.de> - 2025-03-28 08:20 +0000

csiph-web