Small test program
Definition at line 46 of file base64.py.
References getopt.getopt(), aifc.open(), and test1().
48 """Small test program"""
52 except getopt.error, msg:
53 sys.stdout = sys.stderr
55 print """usage: %s [-d|-e|-u|-t] [file|-]
58 -t: encode and decode string 'Aladdin:open sesame'"""%sys.argv[0]
62 if o ==
'-e': func = encode
63 if o ==
'-d': func = decode
64 if o ==
'-u': func = decode
65 if o ==
'-t':
test1();
return
66 if args
and args[0] !=
'-':
67 func(
open(args[0],
'rb'), sys.stdout)
69 func(sys.stdin, sys.stdout)