[Cython] [mailinglist] Re: problems with external data
Stefan Behnel
stefan_ml at behnel.de
Fri Nov 14 13:59:47 CET 2008
Uwe Schmitt wrote:
> Stefan Behnel schrieb:
>> Hmm, your code example is not very complete. An educated guess is that
>> the
>> above code occurs inside a function, and the assignment to SVDVerbosity
>> makes it a local variable (normal Python behaviour). Since it hasn't
>> been declared, it has the normal Python object type.
> Ok, that is the reason. Changing
>
> SVDVerbosity = 0
>
> to
>
> cdef extern long SVDVerbosity = 0
>
> helps.
>
> The reason is that I am interfacing external C code where
> the verbosity of its output is controlled by this global
> variable.
Ah, now I get it. A "global" statement would also do the trick, BTW.
Stefan
More information about the Cython-dev
mailing list