os.fork()
command is not supported under windows, and gives the following error:
AttributeError: 'module' object has no attribute 'fork'
So the general question is How to run a script that contain a call to os.fork()
under Windows?. I don't mind using something that only mocks up the behavior and runs much slower, it's only for testing. I also prefer not to change the script as it is a 3rd party module.
To give you a wider perspective, I'm trying to use the module rq
a.k.a redis queue
on Windows. Eventually I will run the code on heroku server which is a Linux machine, but during the development of the web app I'm using Windows.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…