PacktPublishing / Modern-Python-Cookbook

Code repository for the book Modern Python Cookbook, published by Packt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ch13_r09.py main needs revision

cpepper opened this issue · comments

This is the main() that worked for me.

def main():
    options = get_options(sys.argv[1:])
    if options.command is None:
        print("")
    command = options.command()  # Replaces: command = options.command(options)
    command.execute(options)  # Replaces: command.execute()