Python Server Side Script Inconsistency
I am running python 2.7 on Ubuntu 12.04 via a Linode 3072. While the software is written correctly, there seems to be an issue unrelated to the writing of the software the affects the output of the code. For example, in an attempts to debug a script, I will print to screen various variables within a loop. While the variable should only be printed once, on some iterations with will print the variable n number of times. This is not a software issue but perhaps a memory issue? I am looking for help in figuring out this error and how to begin troubleshooting.
Thanks,
Aaron
1 Reply
Debugging Python is quite easy thanks to the pdb module:
Step through your script line-by-line with pdb until you reach the bad ouput code, then dump a stack trace to see what's going on.