[PyAR2] Writing to a text file

Daniel Veazey daniel at danielveazey.com
Wed Jun 9 05:09:38 CEST 2010

Hi, I'm totally new. I wrote a short program to find combinations on a
bike lock that have adjacent double digits. The lock has 4 digits, and
each digit can have a value of 1-6. So 1442 would have adjacent double
digits, and 1424 would not. Here is the program:


The problem I'm having is that when I run the program in a Linux
terminal, by the time all the combinations have been printed, the first
half of the combinations have run out of the top of the terminal's

So what I'd like to do is instead of just printing the numbers on the
screen, write them to a text file. Is there a way to do this? Does it
have something to do with stdout?


Daniel Veazey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/mailman/private/pyar2/attachments/20100608/3d08315c/attachment.html>

More information about the PyAR2 mailing list