Home | Trees | Indices | Help |
---|
|
1 ################################################################################ 2 # Ganga Project. http://cern.ch/ganga 3 # 4 # $Id: guid.py,v 1.1 2008-07-17 16:41:02 moscicki Exp $ 5 ################################################################################ 6 """module to build GUIDs""" 7 8 9 import time 10 import random 11 12 13 #---------------------------------------------------------------------------15 """newGUID(value = None) --> guid 16 value - any python object""" 17 tt = time.gmtime()[0:6] + (random.randint(0,9), 18 random.randint(0,9), 19 random.randint(0,9), 20 random.randint(0,9), 21 random.randint(0,9), 22 random.randint(0,9), 23 random.randint(0,9), 24 random.randint(0,9), 25 random.randint(0,9), 26 id(value)) 27 return '_' + (''.join(map(str, tt))).replace('-','')28
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Mon Jun 25 10:35:24 2012 | http://epydoc.sourceforge.net |