# HG changeset patch # User Jeff Hammel # Date 1417557422 28800 # Node ID 541560ed190fec6c6b85e4234b072cfa903253a4 # Parent 55a9ba575605fcaaf8d556831cc1c36d207d86c9 foo diff -r 55a9ba575605 -r 541560ed190f python/find_str_format.py --- /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()