MCPcopy Create free account
hub / github.com/corpnewt/GenSMBIOS / __init__

Method __init__

Scripts/utils.py:12–21  ·  view source on GitHub ↗
(self, name = "Python Script")

Source from the content-addressed store, hash-verified

10class Utils:
11
12 def __init__(self, name = "Python Script"):
13 self.name = name
14 # Init our colors before we need to print anything
15 cwd = os.getcwd()
16 os.chdir(os.path.dirname(os.path.realpath(__file__)))
17 if os.path.exists("colors.json"):
18 self.colors_dict = json.load(open("colors.json"))
19 else:
20 self.colors_dict = {}
21 os.chdir(cwd)
22
23 def check_admin(self):
24 # Returns whether or not we're admin

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected