diff --git a/README b/README index 8eb44af..d422b6d 100644 --- a/README +++ b/README @@ -138,6 +138,15 @@ Database name:user name:password The output directory is where image files are written if you choose "file" as the destination for the graph. +You can test these scripts interactively through IDLE by setting the arguments +at the top of the script. So, if you want to test ashonewait.py put these lines +at the top of the file: + +import sys +sys.argv = ['x','screen','YOURDB','N','N'] + +Once you are done testing remove these lines and run the script from the command line. + Related blog posts: http://www.bobbydurrettdba.com/?s=Python diff --git a/util.py b/util.py index f549710..8bce84c 100644 --- a/util.py +++ b/util.py @@ -30,6 +30,7 @@ import myplot import db import argparse +import locale """ @@ -191,9 +192,14 @@ def script_startup(script_description): user=util.my_oracle_user password=util.get_oracle_password(database) + +# Set locale so we can test in IDLE + + locale.setlocale(locale.LC_ALL, 'C') + return database,db.connection(user,password,database) def exit_no_results(results): if results == None: print("No results returned") - sys.exit() \ No newline at end of file + sys.exit()