2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-20 04:42:28 +00:00
Files
python/example/tutorial/hello.cpp
Joel de Guzman 59b596e1ee license
[SVN r25867]
2004-10-26 00:13:19 +00:00

21 lines
477 B
C++

// Copyright Joel de Guzman 2002-2004. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
// Hello World Example from the tutorial
// [Joel de Guzman 10/9/2002]
char const* greet()
{
return "hello, world";
}
#include <boost/python/module.hpp>
#include <boost/python/def.hpp>
using namespace boost::python;
BOOST_PYTHON_MODULE(hello)
{
def("greet", greet);
}