Skip to content

Update daily_checks.py #88

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 6, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions daily_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def clear_screen(): # Function to clear the screen
os.system('CLS') # Clear the Screen

def print_docs(): # Function to print the daily checks automatically
print "Printing Daily Check Sheets:"
print ("Printing Daily Check Sheets:")
# The command below passes the command line string to open word, open the document, print it then close word down
subprocess.Popen(["C:\\Program Files (x86)\Microsoft Office\Office14\winword.exe", "P:\\\\Documentation\\Daily Docs\\Back office Daily Checks.doc", "/mFilePrintDefault", "/mFileExit"]).communicate()

Expand All @@ -35,7 +35,7 @@ def putty_sessions(): # Function to load the putty sessions I need
subprocess.Popen(('putty -load '+server)) # Open the PuTTY sessions - 1.1

def rdp_sessions():
print "Loading RDP Sessions:"
print ("Loading RDP Sessions:")
subprocess.Popen("mstsc eclr.rdp") # Open up a terminal session connection and load the euroclear session

def euroclear_docs():
Expand All @@ -53,7 +53,8 @@ def main():
clear_screen() # Call the clear screen function

# The command below prints a little welcome message, as well as the script name, the date and time and where it was run from.
print "Good Morning " + os.getenv('USERNAME') + ", " + filename, "ran at", strftime("%Y-%m-%d %H:%M:%S"), "on",platform.node(), "run from",os.getcwd()
print ("Good Morning " + os.getenv('USERNAME') + ", "+
filename, "ran at", strftime("%Y-%m-%d %H:%M:%S"), "on",platform.node(), "run from",os.getcwd())

print_docs() # Call the print_docs function
putty_sessions() # Call the putty_session function
Expand Down