Basic Docopt Example does not work
Question: So, I'm trying to run `odd_even_example.py` from the [docopt examples git
repo](https://github.com/docopt/docopt/blob/master/examples/odd_even_example.py).

No matter what I try to do, or change, the example won't work as expected.

When I:

    
    
    python odd_even_example.py 1 2 3 4
    

I expect to see a dictionary with the command line options or arguments I
passed. But instead I just get the `__doc__` string over and over again.

I'm confused because I just copied and ran the file verbatim from the examples
repo, and it's straight up broken.

This is the content of the file:

    
    
    """Usage: odd_even_example.py [-h | --help] (ODD EVEN)...
    Example, try:
      odd_even_example.py 1 2 3 4
    Options:
      -h, --help
    """
    from docopt import docopt
    
    
    if __name__ == '__main__':
        arguments = docopt(__doc__)
        print(arguments)
    


Answer: I had the same problem, and I think the problem is with whether or not you are
entering something for the `(ODD EVEN)` portion of the command. I played with
it a bit and still don't understand how exactly that is meant to work, but
here is an example that works like you expect. It takes one or more numbers as
input, and prints the results to stdout.

    
    
    """Usage: odd_even_example.py [-h | --help] (NUMBERS)...
    
    Example, try:
      odd_even_example.py 1 2 3 4
    
    Options:
      -h, --help
    """
    from docopt import docopt
    
    def is_even(x):
        xIsEven = x%2 == 0
        if xIsEven:
            return 'EVEN'
        else:
            return 'ODD'
    
    if __name__ == '__main__':
        arguments = docopt(__doc__) # returns a dictionary
        print(arguments)
        numbers_entered = [int(i) for i in arguments['NUMBERS']]
        answers = [is_even(x) for x in numbers_entered]
        print(answers)
    

