sl@0
|
1 |
// Copyright Stefan Seefeld 2005.
|
sl@0
|
2 |
// Distributed under the Boost Software License, Version 1.0. (See
|
sl@0
|
3 |
// accompanying file LICENSE_1_0.txt or copy at
|
sl@0
|
4 |
// http://www.boost.org/LICENSE_1_0.txt)
|
sl@0
|
5 |
#ifndef EXEC_SS20050616_HPP
|
sl@0
|
6 |
# define EXEC_SS20050616_HPP
|
sl@0
|
7 |
|
sl@0
|
8 |
# include <boost/python/object.hpp>
|
sl@0
|
9 |
# include <boost/python/str.hpp>
|
sl@0
|
10 |
|
sl@0
|
11 |
namespace boost
|
sl@0
|
12 |
{
|
sl@0
|
13 |
namespace python
|
sl@0
|
14 |
{
|
sl@0
|
15 |
|
sl@0
|
16 |
// Execute python source code from str.
|
sl@0
|
17 |
// global and local are the global and local scopes respectively,
|
sl@0
|
18 |
// used during execution.
|
sl@0
|
19 |
object
|
sl@0
|
20 |
BOOST_PYTHON_DECL
|
sl@0
|
21 |
exec(str string, object global = object(), object local = object());
|
sl@0
|
22 |
|
sl@0
|
23 |
// Execute python source code from file filename.
|
sl@0
|
24 |
// global and local are the global and local scopes respectively,
|
sl@0
|
25 |
// used during execution.
|
sl@0
|
26 |
object
|
sl@0
|
27 |
BOOST_PYTHON_DECL
|
sl@0
|
28 |
exec_file(str filename, object global = object(), object local = object());
|
sl@0
|
29 |
|
sl@0
|
30 |
}
|
sl@0
|
31 |
}
|
sl@0
|
32 |
|
sl@0
|
33 |
#endif
|