QuantLib-Python and enums

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

QuantLib-Python and enums

m.e.bruche@lse.ac.uk
Hello,

how are you meant to access the C++ enums from Python (like
BusinessDayConvention)?

When I import QuantLib and run dir(), there don't seem to be any objects
that resemble these...? I guess I could just work them out manually
(maybe not the optimal solution, though).

Thanks,

Max


Reply | Threaded
Open this post in threaded view
|

Re: QuantLib-Python and enums

Luigi Ballabio
On 01/03/05 21:20:02, [hidden email] wrote:
>
> how are you meant to access the C++ enums from Python (like
> BusinessDayConvention)?

Max,
        pass the functions the corresponding strings  
('modifiedFollowing','mf','f',...)

Cheers,
        Luigi