You can use python.   Try:

# Make a random phone number
def mkphone():
    import random
    phone = ""
    for i in range(10):
        if (i == 3):
            phone += "-"
        if (i == 6):
            phone += "-"
        phone += str(random.randrange(0,9))
    return phone

# Based on
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/59865

# make a random username
def randomLine(filename):
    "Retrieve a  random line from a file, reading through the file
once"
    fh = open(filename, "r")
    lineNum = 0
    it = ''
    while 1:
        aLine = fh.readline()
        lineNum = lineNum + 1
        if aLine != "":
            #
            # How likely is it that this is the last line of the file ?

            if random.uniform(0,lineNum)<1:
                it = aLine
        else:
            break
    fh.close()
    return it

I usually use a file like /usr/share/dict/names or something similar to
make user names

Best,

Alan Boyce


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to