Loading list_files/__init__.py +19 −1 Original line number Diff line number Diff line __version__ = '0.1' import sys def main(): import sys import argparse from . import walk argp = argparse.ArgumentParser() argp.add_argument('--zero', '-z', action='store_const', dest='sep', default='\n', const='\0', help=""" Print file names separated by null characters. Useful for passing the output for further processing when file names could contain whitespace characters or special processing characters. """) argp.add_argument('--sep', '-s', help=""" Use SEP to separate file names. (default is a carriage return) """) argp.add_argument('start_dir', default='.', nargs='?', help=""" Loading @@ -13,8 +27,12 @@ def main(): """) options = argp.parse_args() write = sys.stdout.write sep = options.sep for f in walk.walk_files(options.start_dir): print(f) write(f) write(sep) def mainwrap(): Loading Loading
list_files/__init__.py +19 −1 Original line number Diff line number Diff line __version__ = '0.1' import sys def main(): import sys import argparse from . import walk argp = argparse.ArgumentParser() argp.add_argument('--zero', '-z', action='store_const', dest='sep', default='\n', const='\0', help=""" Print file names separated by null characters. Useful for passing the output for further processing when file names could contain whitespace characters or special processing characters. """) argp.add_argument('--sep', '-s', help=""" Use SEP to separate file names. (default is a carriage return) """) argp.add_argument('start_dir', default='.', nargs='?', help=""" Loading @@ -13,8 +27,12 @@ def main(): """) options = argp.parse_args() write = sys.stdout.write sep = options.sep for f in walk.walk_files(options.start_dir): print(f) write(f) write(sep) def mainwrap(): Loading