embed python dynamically

2009-11-25 Thread naveen
How do you embed the python dll file distributed with the automatic installable python distribution on windows? Is it possible to dynamically load the python dll from running c program and start up a python interpreter ? Do you have to compile python from source to be able to embed python

Re: help! Troubled when embed python into C++

2009-05-25 Thread A. Cavallo
You need the: int main(int argc, char * argv[]) { Py_Initialize(); PySys_SetArgv(argc, argv); PyRun_SimpleString("execfile(r'1.py')"); Py_Finalize(); return 0; } Regards, Antonio On Sunday 24 May 2009 11:42:13 孟炜 wrote: > I have the following codes in C++: > #include > void

help! Troubled when embed python into C++

2009-05-24 Thread 孟炜
I have the following codes in C++: #include void main(){ Py_Initialize(); PyRun_SimpleString("execfile(r'1.py')"); Py_Finalize(); return; } the following is in 1.py : import Tkinter root=Tkinter.Tk() root2=Tkinter.Tk() root.mainloop() root2.mainloop() this is the output after I ru

Re: embed python in ms-word?

2008-09-06 Thread Diez B. Roggisch
oyster schrieb: in fact, during my work, I often write documnets in ms-word. But the doc has many numbers in it, which need to be calculated and to be modified frequently. Is there a method to write a ms-word add-in, so that 1.I can type in the calculation steps in some program language, please

Re: embed python in ms-word?

2008-09-06 Thread oyster
in fact, during my work, I often write documnets in ms-word. But the doc has many numbers in it, which need to be calculated and to be modified frequently. Is there a method to write a ms-word add-in, so that 1.I can type in the calculation steps in some program language, please have a look at htt

Re: embed python in ms-word?

2008-09-06 Thread Gerhard Häring
oyster wrote: > In my ms-word documnet, there are some calculation whihc I have to > change due to different argumnet. is there any way to embed python > code in word, so that I can write the following as a macro or > something else, then the result (i.e. 2) is shown in the wor

embed python in ms-word?

2008-09-05 Thread oyster
In my ms-word documnet, there are some calculation whihc I have to change due to different argumnet. is there any way to embed python code in word, so that I can write the following as a macro or something else, then the result (i.e. 2) is shown in the word documnet? def f(n): if n&l

Re: Looking to embed python into html like mason

2007-06-21 Thread Bruno Desthuilliers
Steven W. Orr a écrit : > Does something like that exist? http://www.myghty.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking to embed python into html like mason

2007-06-21 Thread Stefan Behnel
Steven W. Orr wrote: > Does something like that exist? Many of them, as usual :) http://wiki.python.org/moin/WebProgramming Stefan -- http://mail.python.org/mailman/listinfo/python-list

Looking to embed python into html like mason

2007-06-21 Thread Steven W. Orr
Does something like that exist? TIA -- Time flies like the wind. Fruit flies like a banana. Stranger things have .0. happened but none stranger than this. Does your driver's license say Organ ..0 Donor?Black holes are where God divided by zero. Listen to me! We are all- 000 individuals! What if

Re: Can't embed python in C++(Mingw[3.*] compiler)

2007-05-20 Thread sturlamolden
On May 19, 6:14 pm, Arjun Narayanan <[EMAIL PROTECTED]> wrote: > For thr program, > #include "E:\Python25\include\Python.h" Consider using #include "E:/Python25/include/Python.h" or #include "E:\\Python25\\include\\Python.h" instead. Or use #include and compile with -IE:/Python25/include

Re: Can't embed python in C++(Mingw[3.*] compiler)

2007-05-20 Thread Michael Hoffman
Arjun Narayanan wrote: > That AND I didn't use the american spelling Py_Initiali >>> Z <<< e(); Like many words ending in -ize/-ise, initialize is listed with what you call the "American" spelling in the Oxford English Dictionary. -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/p

Re: Can't embed python in C++(Mingw[3.*] compiler)

2007-05-19 Thread Arjun Narayanan
On May 20, 1:28 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Sat, 19 May 2007 13:14:40 -0300, Arjun Narayanan > <[EMAIL PROTECTED]> escribió: > > > For thr program, > > #include "E:\Python25\include\Python.h" > > #include > > Configure your environment so using: > > #include > > works (

Re: Can't embed python in C++(Mingw[3.*] compiler)

2007-05-19 Thread Gabriel Genellina
En Sat, 19 May 2007 13:14:40 -0300, Arjun Narayanan <[EMAIL PROTECTED]> escribió: > For thr program, > #include "E:\Python25\include\Python.h" > #include Configure your environment so using: #include works (you may need to add E:\Python25\include to some list of searched directories, maybe

Can't embed python in C++(Mingw[3.*] compiler)

2007-05-19 Thread Arjun Narayanan
For thr program, #include "E:\Python25\include\Python.h" #include int main(int argc, char* argv[]){ Py_Initialise(); Py_Finalise(); return 0; } I get the errors, main.cpp:7: `Py_Initialise' undeclared (first use this function) main.cpp:7: (Each undeclared identifier is reported only on

Re: Embed Python in HTML?

2006-09-25 Thread Fredrik Lundh
Sean Hammond wrote: > Forgive my ignorance, but I sometimes write custom dynamic web-pages > using PHP, by simply embedding PHP in HTML with tags, and > renaming for example index.html to index.php and making it executable. I > only use this for very minor things like calling a script, and don't

Re: Embed Python in HTML?

2006-09-25 Thread Ramon Diaz-Uriarte
On 9/25/06, Sean Hammond <[EMAIL PROTECTED]> wrote: > Forgive my ignorance, but I sometimes write custom dynamic web-pages > using PHP, by simply embedding PHP in HTML with tags, and > renaming for example index.html to index.php and making it executable. I > only use this for very minor things li

Embed Python in HTML?

2006-09-25 Thread Sean Hammond
Forgive my ignorance, but I sometimes write custom dynamic web-pages using PHP, by simply embedding PHP in HTML with tags, and renaming for example index.html to index.php and making it executable. I only use this for very minor things like calling a script, and don't really want to learn any more

Re: Modify a C++ instance from the embed python interpreter

2005-08-28 Thread Wezzy
Diez B. Roggisch <[EMAIL PROTECTED]> wrote: > Wezzy wrote: > > Hi, is there a tool that automatically expose an object to python? i > > have an instance of a C++ (or ObjC) object and i want to pass it to the > > embed interpreter that runs inside my program. > > Python code have to call c++ method

Re: Modify a C++ instance from the embed python interpreter

2005-08-27 Thread Diez B. Roggisch
Wezzy wrote: > Hi, is there a tool that automatically expose an object to python? i > have an instance of a C++ (or ObjC) object and i want to pass it to the > embed interpreter that runs inside my program. > Python code have to call c++ method and register some callback. > > I know that swig help

Modify a C++ instance from the embed python interpreter

2005-08-27 Thread Wezzy
Hi, is there a tool that automatically expose an object to python? i have an instance of a C++ (or ObjC) object and i want to pass it to the embed interpreter that runs inside my program. Python code have to call c++ method and register some callback. I know that swig helps when python creates c++

Embed Python

2005-05-17 Thread Tommy Ryding
Hi, Background: Im currently working on my own Python port for VxWorks this is part of my master thesis. What I want to do is to only to embed the interpreter and not the compiler. Both to save memory on the target device and to be get some security in the device. It is a mission critical device i