Like this? import string import whrandom possiblevalues = string.letters + string.digits rndval = possiblevalues[whrandom.randint(0, len(possiblevalues))] ----- Original Message ----- From: "Trevor Toenjes" <zope@toenjes.com> To: <zope@zope.org> Sent: Monday, December 03, 2001 5:57 PM Subject: [Zope] random alphanumeric generator
Does this exist in python or has anyone worked on an random alphanumeric generator?
Generate random 10 character string consisting of 0-9, a-z, or A-Z.
I guess I could make a tuple of the characters and concatenate 10 random choices. But I am worried about overhead to execute 100+/minute while running other processes.
suggestions requested. Thanks, Trevor
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )