Re: [C++-sig] Exposing c++ class template to Python (known template instances)

2013-03-17 Thread Holger Brandsmeier
Dotan, in >>> barPolicy = GetBarWithPolic(Io) >>> barPolicy = GetBarWithPolic(File) what type of object would you imaginge `Io` and `File` to be? You already exported the functions as `GetBarWithPolicIo` and `GetBarWithPolicFile` and then you could implement in python `GetBarWithPolic(str)` a

Re: [C++-sig] Exposing c++ class template to Python (known template instances)

2013-03-17 Thread Dotan Barak
Thanks for the response That trick can help me out in the python level since python is has a duck typing attribute. do you familiar with any a procedure for the C++ ?. what I mean is this : I would like to have some generic pointer that can either point to BarWithPolicy nor to BarWithPolicy ? t

Re: [C++-sig] Exposing c++ class template to Python (known template instances)

2013-03-17 Thread Holger Brandsmeier
Dotan, Well, you can derive your template class BarWithPolicy from a non-template class IBarWithPolicy and maybe that interface is enough to work with. Otherwise I usually drag the template arguments along on the C++ side. What exactly do you want to do with that object, that can then either be a

Re: [C++-sig] Exposing c++ class template to Python (known template instances)

2013-03-17 Thread Dotan Barak
It is basically a logger policy and the idea is to create cross platform logger that can be accessed from C++ and from python. Except from the creation point I don't rely care what is the policy and that is why I can't drag the template argument. I think I understand what you mean by using an base