So @SirPython covered a lot.
I'm just wanted to mention: threads in python are (most of the time) not executed in parallel because of the Global Interpreter Lock. So you'll have to use stackless python
or the multiprocessing
module if you want true parallelism.
Do mind that either conversion is not magical and you would have to modify your code (specially stuff involving global variables). It looks like you don't really need your code to have great performance, but it's up to you.
Also, try to avoid global variables. They make your program unpredictable They make your program unpredictable
So @SirPython covered a lot.
I'm just wanted to mention: threads in python are (most of the time) not executed in parallel because of the Global Interpreter Lock. So you'll have to use stackless python
or the multiprocessing
module if you want true parallelism.
Do mind that either conversion is not magical and you would have to modify your code (specially stuff involving global variables). It looks like you don't really need your code to have great performance, but it's up to you.
Also, try to avoid global variables. They make your program unpredictable
So @SirPython covered a lot.
I'm just wanted to mention: threads in python are (most of the time) not executed in parallel because of the Global Interpreter Lock. So you'll have to use stackless python
or the multiprocessing
module if you want true parallelism.
Do mind that either conversion is not magical and you would have to modify your code (specially stuff involving global variables). It looks like you don't really need your code to have great performance, but it's up to you.
Also, try to avoid global variables. They make your program unpredictable
So @SirPython covered a lot.
I'm just wanted to mention: threads in python are (most of the time) not executed in parallel because of the Global Interpreter Lock. So you'll have to use stackless python
or the multiprocessing
module if you want true parallelism.
Do mind that either conversion is not magical and you would have to modify your code (specially stuff involving global variables). It looks like you don't really need your code to have great performance, but it's up to you.
Also, try to avoid global variables. They make your program unpredictable