Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Main function of the application.

  • Loading branch information...
commit aed23716529879b2a7c71be643e727a991ef7cc2 1 parent efb19c6
authored April 07, 2012

Showing 1 changed file with 20 additions and 0 deletions. Show diff stats Hide diff stats

  1. 20  receipts/main.py
20  receipts/main.py
... ...
@@ -0,0 +1,20 @@
  1
+# -*- coding: utf-8 -*-
  2
+
  3
+import sys
  4
+import receipts.settings
  5
+import receipts.db
  6
+from receipts.core_types import Receipt
  7
+from receipts.cmd_ui import setup_parser, add_receipt, report_month
  8
+
  9
+
  10
+def main(argv=None):
  11
+    if argv is None:
  12
+        argv = sys.argv[1:]
  13
+    parser = setup_parser()
  14
+    args = parser.parse_args(argv)
  15
+    args.func(**vars(args))
  16
+    return 0
  17
+
  18
+
  19
+if __name__ == '__main__':
  20
+    sys.exit(main())

0 notes on commit aed2371

Please sign in to comment.
Something went wrong with that request. Please try again.