]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/python/exec.hpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / boost / python / exec.hpp
1 // Copyright Stefan Seefeld 2005.
2 // Distributed under the Boost Software License, Version 1.0. (See
3 // accompanying file LICENSE_1_0.txt or copy at
4 // http://www.boost.org/LICENSE_1_0.txt)
5 #ifndef EXEC_SS20050616_HPP
6 # define EXEC_SS20050616_HPP
7
8 # include <boost/python/object.hpp>
9 # include <boost/python/str.hpp>
10
11 namespace boost
12 {
13 namespace python
14 {
15
16 // Evaluate python expression from str.
17 // global and local are the global and local scopes respectively,
18 // used during evaluation.
19 object
20 BOOST_PYTHON_DECL
21 eval(str string, object global = object(), object local = object());
22
23 object
24 BOOST_PYTHON_DECL
25 eval(char const *string, object global = object(), object local = object());
26
27 // Execute an individual python statement from str.
28 // global and local are the global and local scopes respectively,
29 // used during execution.
30 object
31 BOOST_PYTHON_DECL
32 exec_statement(str string, object global = object(), object local = object());
33
34 object
35 BOOST_PYTHON_DECL
36 exec_statement(char const *string, object global = object(), object local = object());
37
38 // Execute python source code from str.
39 // global and local are the global and local scopes respectively,
40 // used during execution.
41 object
42 BOOST_PYTHON_DECL
43 exec(str string, object global = object(), object local = object());
44
45 object
46 BOOST_PYTHON_DECL
47 exec(char const *string, object global = object(), object local = object());
48
49 // Execute python source code from file filename.
50 // global and local are the global and local scopes respectively,
51 // used during execution.
52 object
53 BOOST_PYTHON_DECL
54 exec_file(str filename, object global = object(), object local = object());
55
56 object
57 BOOST_PYTHON_DECL
58 exec_file(char const *filename, object global = object(), object local = object());
59
60 }
61 }
62
63 #endif