[C++-sig] [BPL] python::interpreter proposal

Bjorn Pettersen BPettersen at NAREX.com
Thu Jan 2 17:08:20 CET 2003


> From: Dirk Gerrits [mailto:dirk at gerrits.homeip.net] 
> 
> For the python::interpreter class that has been discussed 
> here earlier I propose the following interface:
[...]
> object interpreter::run(object code_string);
> 
> Run the Python code in the string 
> extract<std::string>(code_string) with 
> this (sub-)interpreter and return the result.

Question... how are you going to distinguish calling PyRun_String with
Py_eval_input vs. Py_file_input? (the former only takes expressions, the
latter doesn't return a result...)

-- bjorn




More information about the Cplusplus-sig mailing list