Questions tagged [pythonw]
82 questions
1
vote
0 answers
How to name / find a specific running python script process on windows?
On windows:
I have two scripts:
Client.py
Console.py
Q1:
Client can be run multiple times but only single instance should be left running. It is being run with pythonW.exe
Q2:
Multiple console.py can be run at the same time. But the last one…

user2270708
- 11
- 1
1
vote
0 answers
tkinter file I/O breaks pythonw.exe drag and drop
Whenever I add file reading to a python tkinter gui like the code below, the program won't execute when I drag and drop the .py file into python.exe or pythonw.exe. I'm in Windows XP, using Python 3.2.
from tkinter import *
if __name__ ==…

qwerewq
- 11
- 1
0
votes
1 answer
How to call a shell command fom pythonw (with no explorer.exe running) without a terminal window flashing?
I am running a Python program on Windows with:
no explorer.exe running, no desktop, no start menu, typical for embedded computers. If you want to try, you can emulate this by killing explorer.exe in the Task manager ; note that I do it differently…

Basj
- 41,386
- 99
- 383
- 673
0
votes
1 answer
How to open a python file in background with a virtual environment activated on PC startup?
I have a python file that needs a virtual environment to be activated in order to be run, and I want this file to be run whenever I start my PC. Problem is a terminal window opens even though I'm using pythonw. It is just a blank terminal window.
So…

rpicoder
- 11
- 2
0
votes
1 answer
Pythonw.exe version=36+ always failed and report appcrash report with ucrtbase.dll
ENV=win7x64
20GB free disk space on each disks.
Used to work with python3.5.2.
Python3.5 from official release, Python 3.5.2 from Anaconda3-4.2.0-Windows-x86_64.
Both of them work well.
MSVC 2005-2022 runtime x86 x64 installed.
Try to upgrade…

WilsonF
- 85
- 6
0
votes
0 answers
I can't get pyw file to run for some reason
I created a python file where an event loop is running.
During this event loop, pressing certain hotkeys causes interaction with another app.
If I open the file and run it through PyCharm, it works.
If I run the file in a terminal or as a .py file,…

tschilpi
- 1
- 2
0
votes
0 answers
using "pythonw", ChromeDriverManager().install() is not working
from selenium.webdriver.chrome.service import Service as chromeService
from webdriver_manager.chrome import ChromeDriverManager
chromeServiceObj = chromeService(ChromeDriverManager().install())
this is my "test_install_driver.py" file.
and when i…

Jongok Lee
- 1
- 2
0
votes
0 answers
python.exe and pythonw.exe give different results for the same script ,what happened?
def log_file(file, *args):
with open(file, 'w', encoding='utf-8') as file:
file.write(' '.join([*args, '\n']))
def command_true(*args):
from subprocess import run, PIPE,STDOUT
from os.path import exists
return run(args,…

iouvxz
- 89
- 9
- 27
0
votes
1 answer
I can use the command line to run a .pyw file with pythonw, but the same file will not run when using "open with" -> "pythonw"
I have a python script that runs successfully, with no errors or outputs to stderr or stdout, when run with pythonw from the console.
However, if I try to open that script from file explorer using pythonw, it will exit in a few milliseconds.
I am…

Dwayne Thomson
- 71
- 1
- 5
0
votes
2 answers
pythonw.exe in python 3.9
I'm learning to code with python 3.9, but the resources I'm using are referred to a previous build. In one of the exercises I'm supposed to use pythonw.exe to run a script in the background, however I don't have such file in my installation…

Paolo Romano
- 1
- 1
0
votes
1 answer
Launch Python Script with Pythonw from Batch and give it Focus
I'm on Windows 10 and I have a PyQt5 Application I launch using a .bat file to use the venv interpreter.
When I call the script using python my_script.py it opens the main window in focus, but also shows the Python console in background. To get rid…

unknown user
- 9
- 3
0
votes
1 answer
Pythonw batch file still shows console
I have created a Python script for which I don't want to see the console pop-up every time it's being ran. I tried the pythonw.exe + .pyw approach, and while the script works just fine, the console still pops-up regardless.
.bat file…

instaspam
- 32
- 2
- 8
0
votes
0 answers
Running a process from pythonw launched GUI with a console
My GUI is a python script launcher that I would like to create a new console window that handles the selected script. But I can't get subprocess.Popen to handle the arguments sent correctly. It runs the script from the GUI's Python environment and…

e4862
- 19
- 6
0
votes
1 answer
Controlling location of Pmw.MessageDialog (and other similar widgets)
Python newbie here, newer still to Pmw:
I have the following method defined for showing a Pmw MessageDialog box, and it works as expected and the result value is returned and posted in edit1, which is a Tkinter.Text widget; 'self' here is a…

Vector
- 10,879
- 12
- 61
- 101
0
votes
0 answers
Why doesn't the tkinter GUI work using pythonw (in order to hide the command line)?
It runs in IDLE for example and as a .py file, but when I try to get rid of the command line using a .pyw extension the GUI never opens. I'm new with tkinter so I don't know a simple fix, here's my code (sorry that it's a bit sloppy, just doing this…

MichaelT572
- 178
- 1
- 9