changeset 726:541560ed190f

foo
author Jeff Hammel <k0scist@gmail.com>
date Tue, 02 Dec 2014 13:57:02 -0800
parents 55a9ba575605
children 03b66f90916f
files python/find_str_format.py
diffstat 1 files changed, 30 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/python/find_str_format.py	Tue Dec 02 13:57:02 2014 -0800
@@ -0,0 +1,30 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+"""
+find str format options
+"""
+
+import argparse
+import os
+import subprocess
+import sys
+
+__all__ = ['main']
+
+def find_keys(string):
+    retval = set()
+    while True:
+        try:
+            string.format(**{i:'' for i in retval})
+            return retval
+        except KeyError:
+            import pdb; pdb.set_trace()
+
+def main(args=sys.argv[1:]):
+
+    # parse command line
+    string = ' '.join(args)
+
+if __name__ == '__main__':
+    main()