[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[pygame] Debug printouts - faster to screen or file?



Hello all,
     Another newbie post here.

     I program very incrementally, making sure each step works as I go along, by printing feedback.  I have a couple of questions:



     1.  My program seems to slow considerably when I print a bunch of feedback to the DOS screen (I'm using winblows) with the print statement, like so:

          	print "Variable number_of_cows equals:", number_of_cows

          Would it be faster to send these statements to a text file?  



      2.  If I leave all of these print statements in my code, but comment them out, does the resulting bloat slow down my code in any way?  I guess I've never been sure about how the size of include files (i.e., number of 
lines, whether executed or not) affects program load time.  So maybe another way to say this is:

          If module A has the same number of executing lines as module B, but 5000 lines of comments, does module A load more slowly?


Thanks in advance,
Chris McCormick


____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org