'Give python process a name or title for windows

I have multiple python scripts that keep running in background. I need to distinguish between them. So I think about giving every script like a name or title that shows up in task manager or PROCESS EXPLORER . From what I searched, this is possible in Linux, and impossible in windows. I Tried a module SETPROCTITLE but It didn't work.

I tried using pytoexe, It works but It's difficult as It requires to generate an exe file every time you edit your code.

Is there any portable method to give every python script a name that display it in PROCESS EXPLORER ?



Solution 1:[1]

Lots of applications have zillions of instances that can be hard to distinguish.

In Task Manager, I use the Details tab. Right click on one of the column headers, and choose "Select columns" from the contextual pop-up menu. If you select the "Command line" column (and make your window wide enough), you might be able to distinguish between your python processes by the name of the script.

I'm pretty sure Process Explorer can also show the command line, but I don't use it frequently enough to remember the details.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Adrian McCarthy