Creating a simple password Breaker Need help with the readline function.

Current problem: It will run, if i hold enter, and very slowly. If i take out the readline it will execute at perfect speed, but will never end as it can not come to an end.

Here is the full program, un-commented as it is pretty self explanatory.

Thank you
Josh