cython/cython — pull request #84 by Juntalis (2012-01-27 03:38:52+00:00)
Title: Specifying a custom main function with --embed= causes a TypeError

There's currently a typo in the Cython.Compiler.CmdLine module that causes the cython script to error out with a TypeError. I think you guys are actively working on a new command-line interface, but I figured I'd commit this this anyways.

To replicate:

cython.py --embed=my_main cython.py
Traceback (most recent call last):
File "C:\Development\scripting.py\interop\cython\cython2\cython.py", line 17, in
main(command_line = 1)
File "C:\Development\scripting.py\interop\cython\cython2\Cython\Compiler\Main.py", line 642, in main
options, sources = parse_command_line(args)
File "C:\Development\scripting.py\interop\cython\cython2\Cython\Compiler\CmdLine.py", line 92, in parse_command_line
Options.embed = options[8:]
TypeError: 'CompilationOptions' object is not subscriptable