On Mon, 2007-01-01 at 13:15 -0500, Jason Tackaberry wrote:
> On Mon, 2007-01-01 at 10:01 -0800, Ryan Roth wrote:
> > while len(salt) < 8:
> >   char = os.urandom(1)
> >   if re.match('[a-zA-Z0-9]', char) > -1:
> >       salt = salt + char
> 
> This is fine.  A bit hungrier than the code I suggested, but then it
> doesn't need to be fast. I'd get rid of "> -1"

Wait, you missed '/.'  Change your re.match line to:

   if re.match(r'[a-zA-Z0-9/.]', char):




-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-users mailing list
Freevo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-users

Reply via email to