From 85f872d3b88062a7176c51859c51aa9e41c51ba5 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Fri, 6 Oct 2017 16:03:04 +0200 Subject: [PATCH] ifcopenshell.guid.new() --- src/ifcopenshell-python/ifcopenshell/guid.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ifcopenshell-python/ifcopenshell/guid.py b/src/ifcopenshell-python/ifcopenshell/guid.py index ddc95694b9..86ee5c4cef 100644 --- a/src/ifcopenshell-python/ifcopenshell/guid.py +++ b/src/ifcopenshell-python/ifcopenshell/guid.py @@ -17,6 +17,7 @@ # # ############################################################################### +import uuid import string from functools import reduce @@ -40,4 +41,6 @@ def expand(g): def split(g): return '{%s-%s-%s-%s-%s}'%(g[:8], g[8:12], g[12:16], g[16:20], g[20:]) - + +def new(): + return compress(uuid.uuid4().hex)