On Tuesday, July 23, 2019 at 2:20:45 PM UTC-6, Stefan Behnel wrote:
> Jesse Ibarra schrieb am 22.07.19 um 18:12:
> > On Saturday, July 20, 2019 at 1:11:51 PM UTC-6, Stefan Behnel wrote:
> >> Jesse Ibarra schrieb am 20.07.19 um 04:12:
> >>> Sorry, I am not understanding. Smalltlak VW 8.3 does not su
Jesse Ibarra schrieb am 22.07.19 um 18:12:
> On Saturday, July 20, 2019 at 1:11:51 PM UTC-6, Stefan Behnel wrote:
>> Jesse Ibarra schrieb am 20.07.19 um 04:12:
>>> Sorry, I am not understanding. Smalltlak VW 8.3 does not support Python.
>>> I can only call Pyhton code through C/Python API.
>>
>> Ok
On Saturday, July 20, 2019 at 1:11:51 PM UTC-6, Stefan Behnel wrote:
> Jesse Ibarra schrieb am 20.07.19 um 04:12:
> > Sorry, I am not understanding. Smalltlak VW 8.3 does not support Python.
> > I can only call Pyhton code through C/Python API.
>
> Ok, but that doesn't mean you need to write code
Jesse Ibarra schrieb am 20.07.19 um 04:12:
> Sorry, I am not understanding. Smalltlak VW 8.3 does not support Python.
> I can only call Pyhton code through C/Python API.
Ok, but that doesn't mean you need to write code that uses the C-API of
Python. All you need to do is:
1) Start up a CPython ru
Jesse Ibarra writes:
> ...
> Now ,I need to bring in shared libraries using C/Python API using Smalltalk.
> It seems like I can't directly bring in C shared libraries (.so files).
> PROBLEM.
With Python, you typically do not load ("bring in") shared libraries
explicitly; instead, you simply imp
Sorry, I am not understanding. Smalltlak VW 8.3 does not support Python. I can
only call Pyhton code through C/Python API.
--
https://mail.python.org/mailman/listinfo/python-list
Jesse Ibarra schrieb am 17.07.19 um 20:39:
> My options seem rather limited, I need to make a Pipeline from
> (Smalltalk -> C -> Python) then go back (Smalltalk <- C <- Python).
> Since Smalltalk does not support Python directly I have to settle with
> the C/Python API
> (https://docs.python.org/3.
Am 19.07.19 um 16:26 schrieb Jesse Ibarra:
On Friday, July 19, 2019 at 8:17:43 AM UTC-6, Chris Angelico wrote:
On Sat, Jul 20, 2019 at 12:16 AM Jesse Ibarra
wrote:
On Thursday, July 18, 2019 at 2:01:39 PM UTC-6, Chris Angelico wrote:
On Fri, Jul 19, 2019 at 5:51 AM Christian Gollwitzer wrot
On Friday, July 19, 2019 at 8:17:43 AM UTC-6, Chris Angelico wrote:
> On Sat, Jul 20, 2019 at 12:16 AM Jesse Ibarra
> wrote:
> >
> > On Thursday, July 18, 2019 at 2:01:39 PM UTC-6, Chris Angelico wrote:
> > > On Fri, Jul 19, 2019 at 5:51 AM Christian Gollwitzer
> > > wrote:
> > > > Once you can
On Thursday, July 18, 2019 at 1:46:05 PM UTC-6, Christian Gollwitzer wrote:
> Am 18.07.19 um 16:18 schrieb Jesse Ibarra:
> > On Wednesday, July 17, 2019 at 2:20:51 PM UTC-6, Christian Gollwitzer wrote:
> >> What level of integration do you want to achieve? Do you want
> >>
> >> a) to call Python fu
On Sat, Jul 20, 2019 at 12:16 AM Jesse Ibarra
wrote:
>
> On Thursday, July 18, 2019 at 2:01:39 PM UTC-6, Chris Angelico wrote:
> > On Fri, Jul 19, 2019 at 5:51 AM Christian Gollwitzer
> > wrote:
> > > Once you can do this, you can proceed to call a Python function, which
> > > in C means that yo
On Thursday, July 18, 2019 at 2:01:39 PM UTC-6, Chris Angelico wrote:
> On Fri, Jul 19, 2019 at 5:51 AM Christian Gollwitzer wrote:
> > Once you can do this, you can proceed to call a Python function, which
> > in C means that you invoke the function PyObject_CallObject(). A basic
> > example is s
On Fri, Jul 19, 2019 at 5:51 AM Christian Gollwitzer wrote:
> Once you can do this, you can proceed to call a Python function, which
> in C means that you invoke the function PyObject_CallObject(). A basic
> example is shown here:
>
> https://docs.python.org/2/extending/embedding.html#pure-embeddi
Am 18.07.19 um 16:18 schrieb Jesse Ibarra:
On Wednesday, July 17, 2019 at 2:20:51 PM UTC-6, Christian Gollwitzer wrote:
What level of integration do you want to achieve? Do you want
a) to call Python functions from Smalltalk
b) call Smalltalk functions from Python
c) pass callbacks around, e.g.
On Wednesday, July 17, 2019 at 2:20:51 PM UTC-6, Christian Gollwitzer wrote:
> Am 17.07.19 um 20:39 schrieb Jesse Ibarra:
> > My options seem rather limited, I need to make a Pipeline from (Smalltalk
> > -> C -> Python) then go back (Smalltalk <- C <- Python). Since Smalltalk
> > does not support
> On 17 Jul 2019, at 19:39, Jesse Ibarra wrote:
>
> On Wednesday, July 17, 2019 at 11:55:28 AM UTC-6, Barry Scott wrote:
>>> On 17 Jul 2019, at 16:57, wrote:
>>>
>>> I am using Python3.6:
>>>
>>> [jibarra@redsky ~]$ python3.6
>>> Python 3.6.8 (default, Apr 25 2019, 21:02:35)
>>> [GCC 4.8.5
Jesse Ibarra writes:
> ...
> My options seem rather limited, I need to make a Pipeline from (Smalltalk ->
> C -> Python) then go back (Smalltalk <- C <- Python). Since Smalltalk does
> not support Python directly I have to settle with the C/Python API
> (https://docs.python.org/3.6/extending/em
Am 17.07.19 um 20:39 schrieb Jesse Ibarra:
My options seem rather limited, I need to make a Pipeline from (Smalltalk -> C ->
Python) then go back (Smalltalk <- C <- Python). Since Smalltalk does not support
Python directly I have to settle with the C/Python API
(https://docs.python.org/3.6/ext
On Wednesday, July 17, 2019 at 11:55:28 AM UTC-6, Barry Scott wrote:
> > On 17 Jul 2019, at 16:57, wrote:
> >
> > I am using Python3.6:
> >
> > [jibarra@redsky ~]$ python3.6
> > Python 3.6.8 (default, Apr 25 2019, 21:02:35)
> > [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux
> > Type "help", "
> On 17 Jul 2019, at 16:57, jesse.ibarra.1...@gmail.com wrote:
>
> I am using Python3.6:
>
> [jibarra@redsky ~]$ python3.6
> Python 3.6.8 (default, Apr 25 2019, 21:02:35)
> [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux
> Type "help", "copyright", "credits" or "license" for more information
I am using Python3.6:
[jibarra@redsky ~]$ python3.6
Python 3.6.8 (default, Apr 25 2019, 21:02:35)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux
Type "help", "copyright", "credits" or "license" for more information.
I am
referencing:https://docs.python.org/3.6/extending/embedding.html#beyond
On 2/5/2013 10:23 AM, Duncan Booth wrote:
Bas wrote:
A) Implement the main program in C. In a loop, get a chunk of data
using direct call of C functions, convert data to python variables and
call an embedded python interpreter that runs one iteration of the
user's algorithm. When the script fi
Bas, 05.02.2013 16:10:
> at work, we are thinking to replace some legacy application, which is a
> home-grown scripting language for monitoring and controlling a large
> experiment. It is able to read live data from sensors, do some simple
> logic and calculations, send commands to other subsystems
On Feb 5, 8:10 pm, Bas wrote:
> Since all the functions I have to interface with (read and write of live
> data, sending
> commands, ...) are implemented in C, the solution will require writing both C
> and python.
Standard embedding/extending is ok when the interface is 'thin' ie the
number of
Bas wrote:
> A) Implement the main program in C. In a loop, get a chunk of data
> using direct call of C functions, convert data to python variables and
> call an embedded python interpreter that runs one iteration of the
> user's algorithm. When the script finishes, you read some variables
> fro
Hi Group,
at work, we are thinking to replace some legacy application, which is a
home-grown scripting language for monitoring and controlling a large
experiment. It is able to read live data from sensors, do some simple logic and
calculations, send commands to other subsystems and finally gene
graph wrote:
Does anyone know why PySys_GetObject wasn't documented until somewhat
recently (http://bugs.python.org/issue1245) if it has been part of the
system module interface since at least Python 1.5.2? Is it not
supposed to be used? What's the difference the above and importing
the sys mod
Per http://mail.python.org/pipermail/python-list/2008-September/506206.html
something like this (plus error handling) seems to be the right way to
add to sys.path when embedding python in C:
PyObject *sys_path = PySys_GetObject("path");
PyObject *path = PyString_FromString(&
On Mar 15, 2:10 am, kaush <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I have a simple python script saved to "test.py" as
>
> import os
> import base64
>
> def Testfunction():
> print "Hello World"
> return
>
> Testfunction()
>
> I am trying to invoke this from a C program as follows
>
> int m
Hi All,
I have a simple python script saved to "test.py" as
import os
import base64
def Testfunction():
print "Hello World"
return
Testfunction()
I am trying to invoke this from a C program as follows
int main(int argc, char* argv[])
{
Py_Initialize();
PyObject* main_
On Dec 4, 12:36 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Tue, 04 Dec 2007 00:54:57 -0300, Borse, Ganesh
> <[EMAIL PROTECTED]> escribió:
>
> > When we compile a Python code using functions such as Py_CompileString
> > or any other similar compile function, what will be the resulti
En Tue, 04 Dec 2007 00:54:57 -0300, Borse, Ganesh
<[EMAIL PROTECTED]> escribió:
> When we compile a Python code using functions such as Py_CompileString
> or any other similar compile function, what will be the resulting
> executable code?
> Will it be byte code somewhat like the byte code o
When we compile a Python code using functions such as Py_CompileString or any
other similar compile function, what will be the resulting executable code?
Will it be byte code somewhat like the byte code of Java?
Or it will be the same binary code like the once generated by C/C++ compilers
from th
On Aug 23, 1:17 pm, TheShadow <[EMAIL PROTECTED]> wrote:
> On Aug 23, 11:57 am, Farshid Lashkari <[EMAIL PROTECTED]> wrote:
>
> > TheShadow wrote:
> > > When extending python in c/c++ after you register a module is there a
> > > way in c/c++ to check if they were correctly registered?
>
> > > Cause
On Aug 23, 11:57 am, Farshid Lashkari <[EMAIL PROTECTED]> wrote:
> TheShadow wrote:
> > When extending python in c/c++ after you register a module is there a
> > way in c/c++ to check if they were correctly registered?
>
> > Cause I'm having the problem where when I execute the the python
> > scrip
On Aug 23, 11:57 am, Farshid Lashkari <[EMAIL PROTECTED]> wrote:
> TheShadow wrote:
> > When extending python in c/c++ after you register a module is there a
> > way in c/c++ to check if they were correctly registered?
>
> > Cause I'm having the problem where when I execute the the python
> > scrip
TheShadow wrote:
> When extending python in c/c++ after you register a module is there a
> way in c/c++ to check if they were correctly registered?
>
> Cause I'm having the problem where when I execute the the python
> script it finds the module but none of the functions.
>
Are you calling Py_In
When extending python in c/c++ after you register a module is there a
way in c/c++ to check if they were correctly registered?
Cause I'm having the problem where when I execute the the python
script it finds the module but none of the functions.
--
http://mail.python.org/mailman/listinfo/python-
On 6 Jun., 05:44, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> Python lists and tuples are "generic" containers: both can contain any
> kind of object, and each item may be of a different type: (1, 2.0, 3+0j,
> "four", u"Fünf", file("six")) is a tuple containing 6 items, all of
> differe
En Tue, 05 Jun 2007 03:41:19 -0300, <[EMAIL PROTECTED]> escribió:
> On 5 Jun., 01:32, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
>> Yes, it appears that you are building a plain list but your code is
>> expecting another kind of object. I'm unfamiliar with Numeric arrays, if
>> that is what y
This seems like a pretty good resource, although I didn't read it all yet:
http://www.ibm.com/developerworks/edu/l-dw-linux-pythonscript-i.html
--
http://mail.python.org/mailman/listinfo/python-list
now then... where's the edit button...?
oh well, double-posting. Problem solved, thanks for pointing out that
I am needing a numeric array built instead of building a normal list/
tuple. For those who are curious, steps to solving:
...
#include "libnumarray.h" /*from numpy*/
...
...
...
void Cal
On 5 Jun., 01:32, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> En Mon, 04 Jun 2007 11:58:38 -0300, <[EMAIL PROTECTED]> escribió:
>
>
>
>
>
> > Onwards to the problem, I have been having difficulty embedding a
> > python module into my C/C++ program. (just a test program before
> > moving on int
En Mon, 04 Jun 2007 11:58:38 -0300, <[EMAIL PROTECTED]> escribió:
> Onwards to the problem, I have been having difficulty embedding a
> python module into my C/C++ program. (just a test program before
> moving on into the real thing). I have been making test runs using the
> codes from http://docs
Hello,
first of all, I am a programming newbie, especially in python...
Onwards to the problem, I have been having difficulty embedding a
python module into my C/C++ program. (just a test program before
moving on into the real thing). I have been making test runs using the
codes from http://docs.
We are still struggling with this but having spent many hours looking
at related code on the net, i have noticed the following sequence quite
a lot
globals = PyDict_New();
PyDict_SetItemString(globals, "__builtins__", PyEval_GetBuiltins());
Can anyone explain what this does exactly? I know what "
Not a Python newb but a bit out of my depth here...
We are trying to use the Python interpreter from within a C/C++
aplication to execute Python code which is in an external file. The
idea is to share a dictionary between the C app and the python script.
After Py_Initialize()
we do something like
Dear Pythoners,
I am trying to embed a Python script into a C++ application for the
first time.
Although I have used the example 5.3 Pure Embedding I am having
problems with calling the function defined in my program.
If I define function multiply in module "multiply.py"
def multiply(a,b):
I see a couple of problems. First, because I'm using Unix, where filenames are
case-sensitive, I had to '#include "Python.h"' instead of '#include
"python.h"'.
Next, it looks like the behavior that '.' is placed on sys.path isn't done
automatically when embedding. So I had to set the environment
[EMAIL PROTECTED] wrote:
> Program crashes at line Py_Finalize(). Program tries to read some
>memory location and suffer run time exception.
PyTuple_SetItem "steals" a reference, so changing
Py_XDECREF(stringarg);
Py_XDECREF(args);
to just
Py_XDECREF(args);
might fix the problem.
well I manage to figure it out myself. I'm using Bloodshed Dev-cpp
Here's the code:
#include "python.h"
#include
int main(int argc, char* argv[])
{
double answer = 0;
PyObject *modname, *mod, *mdict, *func, *stringarg, *args, *rslt;
Py_Initialize();
modname = PyStri
On Wed, 17 Aug 2005 14:29:43 +0800
Simon Newton wrote:
> The C program is being built like so:
>
> gcc main.c -c -I-I/usr/include -I/usr/include -I/usr/include/python2.4
> -I/usr/include/python2.4 -DNDEBUG -g -O3 -Wall -Wstrict-prototypes
> gcc main.o -L/usr/lib -lpthread -ldl -lutil
> -lm /us
On Wed, 2005-08-17 at 09:52 +0200, "Martin v. Löwis" wrote:
> Simon Newton wrote:
> > gcc main.c -c -I-I/usr/include -I/usr/include -I/usr/include/python2.4
> > -I/usr/include/python2.4 -DNDEBUG -g -O3 -Wall -Wstrict-prototypes
> > gcc main.o -L/usr/lib -lpthread -ldl -lutil
> > -lm /usr/lib/pyt
Simon Newton wrote:
> gcc main.c -c -I-I/usr/include -I/usr/include -I/usr/include/python2.4
> -I/usr/include/python2.4 -DNDEBUG -g -O3 -Wall -Wstrict-prototypes
> gcc main.o -L/usr/lib -lpthread -ldl -lutil
> -lm /usr/lib/python2.4/config/libpython2.4.a -o main
>
> I've tried the above on two
Hi,
I've just starting out embedding Python in C and get the following error
when I try and import a module that in turn imports the math module.
ImportError: /usr/lib/python2.4/lib-dynload/math.so: undefined symbol:
PyExc_FloatingPointError
The module is as follows:
# begin script.py
i
Thanks, I cannot get the demo to compile, but I joined their list.
Thanks
Philippe
Chris Lambacher wrote:
> pyrex can be used for embedding too.
> http://www.freenet.org.nz/python/embeddingpyrex/
>
> On 6/28/05, Philippe C. Martin <[EMAIL PROTECTED]> wrote:
>> Actually maybe not ... looking
pyrex can be used for embedding too.
http://www.freenet.org.nz/python/embeddingpyrex/
On 6/28/05, Philippe C. Martin <[EMAIL PROTECTED]> wrote:
> Actually maybe not ... looking at the doc:
>
> I have modules already coded in Python, and I need a C wrapper so C
> applications may link with it.
>
Sorry, it is still not clear when I reread it:
1) I have a bunch of Python working modules
2) I need to compile "something" so external C applications can access 1)
Thanks,
Philippe
Philippe C. Martin wrote:
> Just to make sure i'm clear as I've been told about swig and pyrex: I
> don't want
Just to make sure i'm clear as I've been told about swig and pyrex: I don't
want to eventually have a python script call C modules, but rather a main.c
make calls to python functionnalities.
I did add newbie in the title :-)
Regards,
Philippe
Philippe C. Martin wrote:
> Hi,
>
> Is there a p
Hi,
Is there a program out there that would generate the C code to instantiate
objects and call them:
ex: miracle.exe -i mymodule.py -o module_internface.c ?
I seem to recall a _yes_ to that but I got a memory overflow :-)
Thanks,
Philippe
--
http://mail.python.org/mailman/listinfo/python-lis
Got it, thanks :)
--
http://mail.python.org/mailman/listinfo/python-list
"Donnie Leen" <[EMAIL PROTECTED]> writes:
> I wrote a program to test calling c function from python code embedding in c
> as following, it cause error after running a while(about 398 circle). I
> test it in msvc6, python2.3, windows 2k, could anyone tell me why this
> happened since i just work
I wrote a program to test calling c function from python code embedding in c
as following, it cause error after running a while(about 398 circle). I
test it in msvc6, python2.3, windows 2k, could anyone tell me why this
happened since i just work according to the document? Thanks first.
Donnie Le
63 matches
Mail list logo