Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #83372
| References | <ec235ae5-d926-4747-9a8f-2952956a2494@googlegroups.com> |
|---|---|
| Date | 2015-01-09 10:47 +1100 |
| Subject | Re: exporting c_variable to embedded python module |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.17486.1420760852.18130.python-list@python.org> (permalink) |
On Fri, Jan 9, 2015 at 8:03 AM, <kenakahn@gmail.com> wrote: > I'm running a python script loaded via PyImport_Import in my C++ program on Linux. Is there any way I can pass a value from the c-code to the loaded python module? To answer this question, first think about how you would like to see that value on the Python side. Does your C code call a function in that module? If so, it can pass it a parameter. Or do you want the top-level import to be aware of something? It might be best to put something into another module, maybe even builtins. What makes sense from the Python end? Pretty much anything can be done. ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
exporting c_variable to embedded python module kenakahn@gmail.com - 2015-01-08 13:03 -0800 Re: exporting c_variable to embedded python module Chris Angelico <rosuav@gmail.com> - 2015-01-09 10:47 +1100 Re: exporting c_variable to embedded python module kenakahn@gmail.com - 2015-01-08 18:16 -0800
csiph-web