From 5715ba52f2238af513b0b87f4aa3c0158d2c84ba Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sat, 30 Jul 2011 21:47:31 +0200 Subject: Documentation, and removal of unnecessary imports --- cli.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'cli.py') diff --git a/cli.py b/cli.py index bfedbf6..f72602e 100755 --- a/cli.py +++ b/cli.py @@ -12,6 +12,9 @@ __version__ = '0.1' def parse(): + ''' + Get, and parse options passed to the program + ''' parser = optparse.OptionParser(usage='%prog [options] filename') parser.add_option('--add2archive', '-a', action='store_true', default=False, help='Add to outputed archive non-supported filetypes') @@ -33,7 +36,10 @@ def parse(): return values, arguments -def display_version(*args): +def display_version(*_): + ''' + Display the program's version, and exit + ''' print('Metadata Anonymisation Toolkit version %s') % mat.__version__ print('CLI version %s') % __version__ print('Hachoir version %s') % hachoir_core.__version__ @@ -87,6 +93,9 @@ def clean_meta_ugly(class_file, filename): def main(): + ''' + main function : get args, and launch the appropriate function + ''' args, filenames = parse() #func receive the function correponding to the options given as parameters -- cgit v1.3