From 45637808018546cb22da59b0c461abec32106609 Mon Sep 17 00:00:00 2001 From: Ryan Hennig Date: Mon, 31 Aug 2020 14:41:47 +0300 Subject: [PATCH 1/2] Converted code to python3 by running command: 2to3 -n -w . --- framingham10yr/framingham10yr.py | 12 ++++++------ setup.py | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/framingham10yr/framingham10yr.py b/framingham10yr/framingham10yr.py index c4ca972..fc00deb 100644 --- a/framingham10yr/framingham10yr.py +++ b/framingham10yr/framingham10yr.py @@ -485,9 +485,9 @@ def framingham_10year_risk(sex, age, total_cholesterol, hdl_cholesterol, blood_pressure_med_treatment=sys.argv[7].lower() except(IndexError): - print "All values are required." - print "Usage: framingham.py " - print "Example: framingham.py male 25 152 56 130 0 0" + print("All values are required.") + print("Usage: framingham.py ") + print("Example: framingham.py male 25 152 56 130 0 0") exit(1) try: @@ -498,9 +498,9 @@ def framingham_10year_risk(sex, age, total_cholesterol, hdl_cholesterol, smoker, blood_pressure_med_treatment) #return pretty-print json to standard out - print json.dumps(result, indent=4) + print(json.dumps(result, indent=4)) except(): - print "An unexpected error occured. Here is the post-mortem:" - print sys.exc_info() + print("An unexpected error occured. Here is the post-mortem:") + print(sys.exc_info()) \ No newline at end of file diff --git a/setup.py b/setup.py index c498362..fab0c71 100644 --- a/setup.py +++ b/setup.py @@ -39,7 +39,7 @@ def fullsplit(path, result=None): # Tell distutils to put the data_files in platform-specific installation # locations. See here for an explanation: # http://groups.google.com/group/comp.lang.python/browse_thread/thread/35ec7b2fed36eaec/2105ee4d9e8042cb -for scheme in INSTALL_SCHEMES.values(): +for scheme in list(INSTALL_SCHEMES.values()): scheme['data'] = scheme['purelib'] # Compile the list of packages available, because distutils doesn't have From 82e3f3264b104d3e018896ce23564404e16be401 Mon Sep 17 00:00:00 2001 From: Ryan Hennig Date: Mon, 31 Aug 2020 14:42:24 +0300 Subject: [PATCH 2/2] Added .idea directory to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 447d2cb..6665e32 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ *.kpf dist build +.idea/