utils.py
changeset 4510 8dc44329f5c8
parent 4478 442fd69ff13b
parent 4501 71ba2d0f34f2
child 4511 270a75f6e33f
equal deleted inserted replaced
4509:a17033cfc892 4510:8dc44329f5c8
     1 """Some utilities for CubicWeb server/clients.
     1  """Some utilities for CubicWeb server/clients.
     2 
     2 
     3 :organization: Logilab
     3 :organization: Logilab
     4 :copyright: 2001-2010 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2.
     4 :copyright: 2001-2010 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2.
     5 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
     5 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
     6 :license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses
     6 :license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses
    14 import decimal
    14 import decimal
    15 import datetime
    15 import datetime
    16 from md5 import md5
    16 from md5 import md5
    17 from time import time
    17 from time import time
    18 from random import randint, seed
    18 from random import randint, seed
    19 import decimal
       
    20 
    19 
    21 # initialize random seed from current time
    20 # initialize random seed from current time
    22 seed()
    21 seed()
    23 
       
    24 
       
    25 
    22 
    26 if sys.version_info[:2] < (2, 5):
    23 if sys.version_info[:2] < (2, 5):
    27     def make_uid(key):
    24     def make_uid(key):
    28         """forge a unique identifier
    25         """forge a unique identifier
    29         not that unique on win32"""
    26         not that unique on win32"""