By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,387 Members | 1,743 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,387 IT Pros & Developers. It's quick & easy.

How to pass C++ function pointer argument in embedded python environment? 1

P: 1
background:I have a python api like this,
Expand|Select|Wrap|Line Numbers
  1. def a(arg1,arg2,progress_callback = None)
obviously argument progress_callback is a callback function.In python,I can define a function like this:
Expand|Select|Wrap|Line Numbers
  1. def pro_call(prog_arg1,prog_arg2):
  2.            #do something with arg1 & arg2 
and I just need call a function like follow and it worked
Expand|Select|Wrap|Line Numbers
  1. a(arg1,arg2,progress_callback = pro_call)

question: I don't know how to do like the former exam in embedded python environment.

thank you for your reading ,thanks for any response!
Nov 5 '16 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.