embedded Python sample

Syver Enstad syver-en+usenet at online.no
Thu Sep 12 16:13:40 EDT 2002


Michael Chermside <mcherm at destiny.com> writes:

> bruno Monnet wrote:
> > Hi,
> > I'm trying to call a python script from my c++ code. All I need is
> to
> 
> > invoke the script and check the return status.
> > does anyone has a simple example ? All I found until now is very
> > complex and ugly code :-((
> > Regards,
> > Bruno
> 
> Why not just execute as a sub-process... invoke it as a shell command
> just as you'd do with "ls".
> 
> -- Michael Chermside
> 

Yes that is also an option, use 

system("python your_script.py");

-- 

Vennlig hilsen 

Syver Enstad



More information about the Python-list mailing list