]>
git.proxmox.com Git - mirror_edk2.git/blob - Tools/Python/WorkspaceRoutines.py
3 import os
, sys
, re
, getopt
, string
, glob
, xml
.dom
.minidom
, pprint
, md5
, socket
, getpass
, time
, random
5 def inWorkspace(rel_path
=""):
6 """Treat the given path as relative to the workspace."""
8 # Make sure the user has set the workspace variable:
10 return os
.path
.join(os
.environ
["WORKSPACE"], rel_path
)
12 print "Oops! You must set the WORKSPACE environment variable to run this script."
17 str(random
.random()) +
20 socket
.gethostbyname(socket
.gethostname())).hexdigest()
21 return "%s-%s-%s-%s-%s" % (g
[0:8], g
[8:12], g
[12:16], g
[16:20], g
[20:])