Chris@16: // Copyright Stefan Seefeld 2005. Chris@16: // Distributed under the Boost Software License, Version 1.0. (See Chris@16: // accompanying file LICENSE_1_0.txt or copy at Chris@16: // http://www.boost.org/LICENSE_1_0.txt) Chris@16: #ifndef EXEC_SS20050616_HPP Chris@16: # define EXEC_SS20050616_HPP Chris@16: Chris@16: # include Chris@16: # include Chris@16: Chris@16: namespace boost Chris@16: { Chris@16: namespace python Chris@16: { Chris@16: Chris@16: // Evaluate python expression from str. Chris@16: // global and local are the global and local scopes respectively, Chris@16: // used during evaluation. Chris@16: object Chris@16: BOOST_PYTHON_DECL Chris@16: eval(str string, object global = object(), object local = object()); Chris@16: Chris@16: // Execute an individual python statement from str. Chris@16: // global and local are the global and local scopes respectively, Chris@16: // used during execution. Chris@16: object Chris@16: BOOST_PYTHON_DECL Chris@16: exec_statement(str string, object global = object(), object local = object()); Chris@16: Chris@16: // Execute python source code from str. Chris@16: // global and local are the global and local scopes respectively, Chris@16: // used during execution. Chris@16: object Chris@16: BOOST_PYTHON_DECL Chris@16: exec(str string, object global = object(), object local = object()); Chris@16: Chris@16: // Execute python source code from file filename. Chris@16: // global and local are the global and local scopes respectively, Chris@16: // used during execution. Chris@16: object Chris@16: BOOST_PYTHON_DECL Chris@16: exec_file(str filename, object global = object(), object local = object()); Chris@16: Chris@16: } Chris@16: } Chris@16: Chris@16: #endif