optparse TypeError

Simon Brunning simon at brunningonline.net
Mon Jun 28 09:51:50 EDT 2010


On 28 June 2010 14:30, dirknbr <dirknbr at gmail.com> wrote:
> I get an int object is not callable TypeError when I execute this. But
> I don't understand why.
> (snip)
>    lines=options.lines

Here you are assigning the -l option to the name 'lines'.

>    lines(args[0],topbottom=tb,maxi=lines)

Here you are attempting to call a function with the name 'lines'. But
'lines' has been assigned an integer above.

I'm assuming that elsewhere you've defined a function called 'lines'.
You'll need to call either the function or the option by another name.

-- 
Cheers,
Simon B.



More information about the Python-list mailing list