Changing the process name of python script in windows

You have created several python scripts and running them simultaneously. You decide you want to kill first script you run. As always, you open Windows Task Manager but then you see several python.exe processes. Which one is the script you want to kill? You do not have clue. If you you recognize this situation – The following script I wrote allows to overcome this issue and change name of python processes to unique one.

Solution to producer and consumer problem in python

In my last project, I needed synchronize producer and consumers threads. The producer thread was responsible to generate the tasks while the consumer threads were responsible to execute them. This classic producer and consumer problem can be easily solved using the Queue module.

Log exception in python

When exceptions happens, you may find it useful to log the exception and its stack trace for further investigation. In this article, you will learn how to retrieve the current exception and its properties – its type and its stack trace.