We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4ca8756 commit fdc7bd6Copy full SHA for fdc7bd6
Utils.py
@@ -11,7 +11,7 @@
11
import ntpath
12
from subprocess import STDOUT, Popen, PIPE
13
from socket import inet_aton
14
-import os
+import os, random, string
15
16
def generateUniqueNameFile ():
17
'''
@@ -223,4 +223,8 @@ def stringToLinePadded(string, padValue=" "):
223
padding = padValue*(sizeTerm - (len(string) % sizeTerm) -4)
224
return string+padding
225
226
+def generateRandomString (length=20):
227
+ '''
228
229
+ return ''.join(random.SystemRandom().choice(string.ascii_uppercase + string.digits) for _ in range(length))
230
0 commit comments