added old code, fixed it (mostly), merged some new code to the old code, made it mostly runnable
This commit is contained in:
6
New_Client/Classes/Engine/Utils/Path.py
Normal file
6
New_Client/Classes/Engine/Utils/Path.py
Normal file
@ -0,0 +1,6 @@
|
||||
import os
|
||||
|
||||
|
||||
class PathUtil:
|
||||
def getAbsolutePathTo(notAbsolutPath:str) -> str:
|
||||
return os.path.abspath("Client/" + notAbsolutPath)
|
11
New_Client/Classes/Engine/Utils/StringUtils.py
Normal file
11
New_Client/Classes/Engine/Utils/StringUtils.py
Normal file
@ -0,0 +1,11 @@
|
||||
import random
|
||||
import string
|
||||
|
||||
|
||||
class StringUtils:
|
||||
def get_random_string(length) -> str:
|
||||
# choose from all lowercase letter
|
||||
letters = string.ascii_lowercase
|
||||
result_str = ''.join(random.choice(letters) for i in range(length))
|
||||
print("Random string of length", length, "is:", result_str)
|
||||
return result_str
|
BIN
New_Client/Classes/Engine/Utils/__pycache__/Path.cpython-311.pyc
Normal file
BIN
New_Client/Classes/Engine/Utils/__pycache__/Path.cpython-311.pyc
Normal file
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user