def get_random_id():
 from random import random
 from time import time
 try:
  from hashlib import sha1 as sha
 except ImportError:
  import sha
  sha = sha.new
 return sha(('%s|%s' % (random(), time()))).hexdigest()

def get_random_id ( ) : from random import random from time import time try : from hashlib import sha1 as sha except ImportError : import sha sha = sha . new return sha ( ( '%s|%s' % ( random ( ) , time ( ) ) ) ) . hexdigest ( )
generate a random id number .