From 3ce86076787122c572790e6d9a2512c2ea28d7ab Mon Sep 17 00:00:00 2001 From: 6455 Date: Mon, 14 Aug 2017 13:29:10 +0000 Subject: [PATCH] attempting to start a python program properly --- nicethings | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/nicethings b/nicethings index b0e5fda..c3ad8a9 100755 --- a/nicethings +++ b/nicethings @@ -55,8 +55,12 @@ def handlechoice(): print("sorry, I didn't get that, type either y or n:") handlechoice() -if os.path.exists('/home/m455/code/projects/nicethings/list.txt') == True: - handleargs() -else: - print("list.txt doesn't exist\ndo you want me to make a list.txt file right now? (y/n)") - handlechoice() +def main(): + if os.path.exists('/home/m455/code/projects/nicethings/list.txt') == True: + handleargs() + else: + print("list.txt doesn't exist\ndo you want me to make a list.txt file right now? (y/n)") + handlechoice() + +if __name__ == '__main__': + main()