comparison .emacs @ 658:c2e89dafa397

add __all__
author Jeff Hammel <k0scist@gmail.com>
date Wed, 02 Apr 2014 11:04:47 -0700
parents b4dc72b7c5c3
children 8466deea2eaf
comparison
equal deleted inserted replaced
657:60952012be78 658:c2e89dafa397
158 import argparse 158 import argparse
159 import os 159 import os
160 import subprocess 160 import subprocess
161 import sys 161 import sys
162 162
163 __all__ = ['main']
163 here = os.path.dirname(os.path.realpath(__file__)) 164 here = os.path.dirname(os.path.realpath(__file__))
164 string = (str, unicode) 165 string = (str, unicode)
165 166
166 def main(args=sys.argv[1:]): 167 def main(args=sys.argv[1:]):
167 168
169 # parse command line
168 parser = argparse.ArgumentParser(description=__doc__) 170 parser = argparse.ArgumentParser(description=__doc__)
169 parser.add_argument('input', nargs='?', 171 parser.add_argument('input', nargs='?',
170 type=argparse.FileType('r'), default=sys.stdin, 172 type=argparse.FileType('r'), default=sys.stdin,
171 help='input file, or read from stdin if ommitted') 173 help='input file, or read from stdin if ommitted')
172 options = parser.parse_args(args) 174 options = parser.parse_args(args)