![]() Parser.add_argument("-z", "-zip", metavar="", required=True, help="Location and the name of the. Parser = argparse.ArgumentParser(description="Unzips selected. My 'modernized' code as follows: import zipfile What I mean is to get accept an input like Project.py -z "Generic ZIP Name.zip" -d "Dictionary.txt" I did manage to recreate the args but couldn't get the code to work properly. ![]() My attempt of modernizing was using argparse instead of optparse. T = Thread(target=extractFile, args=(zFile, password)) If (options.zname = None) | (options.dname = None): Parser.add_option('-d', dest='dname', type='string', \ Parser.add_option('-f', dest='zname', type='string', \ Parser = optparse.OptionParser("usage%prog " \ ![]() The original code follows: import zipfile I've been trying to 'modernize' the ZIP Cracker code from "Violent Python" by TJ O'Connor which was written in Python 2.7 (I presume) ![]()
0 Comments
Leave a Reply. |