.pyw files in python program

I am new to Python programming. Can someone explain to you what a * .pyw file is and how it works.

+4
source share
1 answer

Python scripts (files with the extension .py) will be executed by python.exe by default. This executable file opens a terminal, which remains open even if the program uses a graphical interface. If you do not want this to happen, use the .pyw extension, which will cause the script to be executed by pythonw.exe by default (both executables are at the top level of your Python installation directory). This suppresses the terminal window at startup.

You can also execute all .py scripts using pythonw.exe, installing it, for example, using the usual means (may require administrative rights):

https://docs.python.org/2/using/windows.html

, , , - . *.pyw - , , , .

python.exe pythonw.exe, . fooobar.com/questions/60917/...

+16

Source: https://habr.com/ru/post/1623890/


All Articles