Random passwords generation (Python vs Perl) =)

Gabriel Genellina gagsl-py at yahoo.com.ar
Wed Jan 31 03:06:50 EST 2007


En Wed, 31 Jan 2007 01:08:28 -0300, Hieu.D.Hoang at gmail.com  
<Hieu.D.Hoang at gmail.com> escribió:

> raw_input can do the job of print
> while 1: raw_input(__import__('os').urandom(6).encode('base64'))
>
> And can anyone explain why this is so?
>>>> while 1: input(__import__('os').urandom(6).encode('base64'))
>     ^
> SyntaxError: unexpected EOF while parsing

input and raw_input are not the same, see the docs.

-- 
Gabriel Genellina




More information about the Python-list mailing list