Community mailing list archives

community@mail.odoo.com

Re: Call a C# dll from python

by
Projetgrup, Levent Karakaş
- 11/26/2015 07:55:22
Omar,

Here's an example to execute a command and get it's output for later use:


This should give an idea.




2015-11-25 21:47 GMT+02:00 Omar Ouhari <omar.ouhari@gmail.com>:

Hello Levent,
thanks to answer. however I ask if you can tell me more about the first solution.
How can I do this.

On Nov 23, 2015 9:10 AM, "Levent Karakas" <levent@mektup.at> wrote:
You might want to consider other solutions that doesn't require direct python-c# interaction:

1) Make a c# console program and call it with a suitable python os.* call (system, pipe, execv etc). 

2) Make a c# web service which interacts with and call it within your python.

or if the interaction starts from the device:

1) You can call odoo with XMLRPC from your c# application.

2) You can use routes to create a custom URL etc. in the backend to be called from your c# application.





2015-11-22 13:17 GMT+02:00 Omar Ouhari <omar.ouhari@gmail.com>:
Hi Stephane,

In reality it's about Odoo. I try to communicate my odoo module with
zkteco device using a C# dll (fin it in attachment). I try
python_zklib but it present some limitations (can't set user
cardnumber nither set user with uid > 255). In fact, I want to load
the c# dll in odoo module and use it functions (Connect_Net,
SetStrCardNumber, SSR_SetUserInfo).

Regards.

On Nov 22, 2015 10:53 AM, "Stephane Wirtel"
<stephane+odoocommunity@wirtel.be> wrote:
>
> Your question is more general and not specific to Odoo.
>
> In fact, your dll, the symbols can be exported to the C conventions?
>
> Firstly, try to load your library with libffi.
>
> Stephane
>
> On 11/22, Omar Ouhari wrote:
> > Hello communauty,
> > I have to call a C# dll from code python and use it functions.
> > How can I do this ?
> > Regards.
> >
> > _______________________________________________
> > Mailing-List: https://www.odoo.com/groups/community-59
> >
>
>
> --
> Stéphane Wirtel - http://wirtel.be - @matrixise
>
> _______________________________________________
> Mailing-List: https://www.odoo.com/groups/community-59
> Post to: mailto:community@mail.odoo.com
> Unsubscribe: https://www.odoo.com/groups?unsubscribe

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe


_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe