MCPcopy Create free account
hub / github.com/geekcomputers/Python / main

Function main

daily_checks.py:71–96  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

69
70# Start of the Main Program
71def main():
72 filename = sys.argv[0] # Create the variable filename
73 confdir = os.getenv(
74 "my_config"
75 ) # Set the variable confdir from the OS environment variable - 1.3
76 conffile = "daily_checks_servers.conf" # Set the variable conffile - 1.3
77 # Set the variable conffilename by joining confdir and conffile together - 1.3
78 conffilename = os.path.join(confdir, conffile)
79 clear_screen() # Call the clear screen function
80
81 # The command below prints a little welcome message, as well as the script name,
82 # the date and time and where it was run from.
83 print(
84 "Good Morning " + os.getenv("USERNAME") + ", " + filename,
85 "ran at",
86 strftime("%Y-%m-%d %H:%M:%S"),
87 "on",
88 platform.node(),
89 "run from",
90 os.getcwd(),
91 )
92
93 print_docs() # Call the print_docs function
94 putty_sessions(conffilename) # Call the putty_session function
95 rdp_sessions() # Call the rdp_sessions function
96 euroclear_docs() # Call the euroclear_docs function
97
98
99if __name__ == "__main__":

Callers 1

daily_checks.pyFile · 0.70

Calls 5

print_docsFunction · 0.85
putty_sessionsFunction · 0.85
rdp_sessionsFunction · 0.85
euroclear_docsFunction · 0.85
clear_screenFunction · 0.70

Tested by

no test coverage detected