views:

31

answers:

1

Coming from mostly C++ I'm relatively new to python and probably far from thinking in pythonic ways. Recently my web hoster activated python as cgi for my web space. I got an email asking me to test any python scripts on a local server (xampp, ...) since my web space is hosted on a productivity server.

Now my question is: What would be a good and maybe even pythonic way to keep scripts from infinite looping and such things? Obviously writing correct code is the solution, but I can't guarantee that. So is there a nice way to supervise my scripts from the outside or to prevent any processor max out or infinite loops?

A: 

Writing tests is always a good thing to do. Use this alongside coverage.py, and you should get some pretty safe code.

Space_C0wb0y