python-embedding Questions
1
Solved
I have a bunch of functions written in python (for rapid prototyping). My main project is in C++ and I wanna call these functions from my C++ program.These functions use some specialized python mod...
Moy asked 23/7, 2015 at 8:14
0
I have a bunch of functions written in python (for rapid prototyping). My main project is in C++ and I wanna call these functions from my C++ program.
These functions use some specialized python ...
Despair asked 20/7, 2015 at 12:13
1
Solved
ImportError and PyExc_SystemError while embedding Python Script within C for PAM modules (.so files)
I'm trying to write a demo PAM module in C, which uses Embedding Python in C concept to run a script written in python (2.7), inside pam_sm_authenticate() function, which is written in C file (pam_...
Langston asked 26/4, 2015 at 17:26
6
Solved
I am working on embedding python in to c++. In some peculiar case I require two separate instances of the interpreter in same thread.
Can I wrap Python interpreter in to a c++ class and get servic...
Pneumoencephalogram asked 26/9, 2009 at 5:28
3
Solved
I have a program which during it's run sometimes needs to call python in order to preform some tasks. I need a function that calls python and catches pythons stdout and puts it in some file.
This i...
Rodgers asked 29/11, 2010 at 17:54
2
Solved
I'm trying to embed a Python (2.7) library in my C application and I'm using the Python/C API to call Python code from C. I need to call a Python method that takes keyword arguments. Semantically, ...
Auk asked 27/5, 2013 at 16:24
2
Solved
using the next line
pModule = PyImport_Import(pName);
Only load modules from the current directory.
But what I want to load from somewhere else? Is there a neat way to do so?
PyRun_SimpleStrin...
Phytogeography asked 22/1, 2014 at 10:12
1
I am fairly new to python and a real beginner to tkinter and matplotlib.
I have the following code which essentially is a testbed for what I eventually want to do.
#!/usr/bin/env python
import nu...
Broussard asked 17/1, 2014 at 7:14
1
Solved
Trying to pass a list to python from C++ is not working. Here is the relevant code ( written using other related postings):
Py_Initialize();
PyObject *sys = PyImport_ImportModule("sys");
PyObject ...
Timms asked 9/1, 2014 at 21:45
2
Solved
Is it possible to embed python without the standard library?
I'm working with a cmake build for python 2.7.6 and I've got a basic embedded script running, like so:
#include <stdio.h>
#inclu...
Maltose asked 6/1, 2014 at 14:2
1
Solved
I am developing an math-oriented GUI application in Qt/C++ and would like to embed a Python scripting, including NumPy and Matplotlib. Using Python C API, I finally managed to run a script, retriev...
Jenks asked 7/9, 2013 at 23:40
1
Solved
When messing around with Python.h I got this error:
AttributeError: 'module' object has no attribute 'argv'
C++ code:
#include "stdafx.h"
#include "C:/Python27/include/Python.h"
#include &l...
Cortisol asked 1/9, 2012 at 18:16
2
Solved
I am trying to embed some python in my pet project. I have reduced my problem to the following code:
#include <Python.h>
#include "iostream"
int main(int argc, char *argv[])
{
Py_Initializ...
Defile asked 21/5, 2012 at 10:38
2
I am trying to write a plug-in for Audacious Media Player that loads a python module. The python embedding code is from the python-2.6 source(embed/Demo). This compiles with the command line,
gcc ...
Twyla asked 22/1, 2011 at 9:14
1
Solved
I'm embedding Python into a C/C++ application that will have a defined API.
The application needs to instantiate classes defined in a script, which are structured roughly like this:
class userscr...
Impedimenta asked 21/3, 2012 at 23:46
1
Solved
I'm trying to load a python module that contains a math and numpy import in C, using the C API. I can load and run the module but, if I import the math module it doesn't work.
I'm using Arch Linux...
Vasquez asked 2/10, 2011 at 3:59
1
Solved
This bug report states that the Python interpreter, as of June 2007, will not clean up all allocated memory after calling Py_Finalize in a C/C++ application with an embedded Python interpreter. It ...
Coadjutress asked 10/1, 2012 at 5:22
1
Solved
Im trying to call python functions from C code, and i followed a sample from here
I also have the correct include file directries, library directries, and linked the python32.lib (im using python ...
Hydrophilous asked 22/11, 2011 at 15:48
1
Solved
Here is canonical example of a program extending embedded Python 3.x in C/C++:
#include <Python.h>
//// Definition of 'emb' Python module ////////////////////
static PyObject* emb_foo(PyObje...
Madancy asked 3/11, 2011 at 16:57
1
Solved
I am new of python embedding.
I am trying to embed python + numpy code inside a C++ callback function (inside a dll)
the problem i am facing is the following. if i have:
Py_Initialize();
// some ...
Coattail asked 24/9, 2011 at 17:56
2
Solved
I am having problems using the Embedded Python for C as per the Documentation - Whenever I try using imported modules I get an :
Unhandled exception at 0x1e089e85 in PythonIncl.exe: 0xC0000005:
...
Entirely asked 2/9, 2011 at 13:14
2
Solved
I would like to embed a Python interpreter into my .NET application. I'm aware of IronPython, of course, but I'm specifically interested in PyPy, because of its stackless support and microthreads.
...
Clansman asked 21/5, 2011 at 21:54
1
Embedding Python interpreter in a C/C++ application is well documented. What is the best approach to run multiple python interpreter on multiple operating system threads (i.e. one interpreter on on...
Cheater asked 3/6, 2010 at 17:25
1
Solved
Say I have my object layout defined as:
typedef struct {
PyObject_HEAD
// Other stuff...
} pyfoo;
...and my type definition:
static PyTypeObject pyfoo_T = {
PyObject_HEAD_INIT(NULL)
// ...
...
Traverse asked 12/11, 2010 at 9:6
1
Solved
BACKGROUND
I've successfully embedded IronPython in my WinForm apps using techniques like the one described here: http://blog.peterlesliemorris.com/archive/2010/05/19/embedding-ironpython-into-a-...
Otis asked 27/5, 2010 at 16:6
© 2022 - 2025 — McMap. All rights reserved.