def main(option, export_type, testmode): """ Main driver. """ ### Run the application ### #NOTE: the import statement loads the views and tables, #but when doing an install, they are not created yet. #So we skip loading this until we are sure we can start. from main import MainWrapper wrapper = MainWrapper() if testmode: print "test: unit_test" wrapper.unit_test() wrapper.exitstate = 1 if (option == 'import'): wrapper.file_import() wrapper.exitstate = 1 if (option == 'export'): wrapper.export(export_type) wrapper.exitstate = 1 #TODO: add stuff for export to ledger format? wrapper.run() # run the main method for the program