Question: I've been seeing some examples of Python being used with c++, and I'm trying to understand why would someone want to do it. What are the benefits of calling C++ code from an external language such as Python?

I'd appreciate a simple example - Boost::Python will do

Answer: 
It depends on your point of view:

**Calling C++ code from a python application**

You generally want to do this when performance is an issue. Highly dynamic languages like python are typically somewhat slower then native code such as C++. "Features" of C++ such as manual memory management allows for the development of very fast libraries, which can then be called from python in order to gain performance.

Another reason is due to the fact that most libraries on both windows and \*nix are written in C or C++, and it's a huge advantage to have this existing code base available.

**Calling python code from a C++ application**

Complex applications sometimes require the ability to define additional abilities. Adding behaviors in a compiled application is messy, requires the original source code and is time consuming. Therefore it's often strategic to embed a scripting language such as python in order to make the application more flexible and customizable.

As for an example: I think you need to clarify a bit what you're interested in if you want the sample to be of any help. The boost manual provides a simple [hello world sample](http://www.boost.org/doc/libs/1_39_0/libs/python/doc/tutorial/doc/html/index.html), if that's what you're looking for.
Because C++ provides a direct way of calling OS services, and (if used in a careful way) can produce code that is more efficient in memory and time, whereas Python is a high-level language, and is less painful to use in those situations where utter efficiency isn't a concern and where you already have libraries giving you access to the services you need.

**If you're a C++ user**, you may wonder why this is necessary, but the expressiveness and safety of a high-level language has such a massive relative effect on your productivity, it has to be experienced to be understood or believed.

I can't speak for Python specifically, but I've heard people talk in terms of "tripling" their productivity by doing most of their development in it and using C++ only where shown to be necessary by profiling, or to create extra libraries.

**If you're a Python user**, you may not have encountered a situation where you need anything beyond the libraries already available, and you may not have a problem with the performance you get from pure Python (this is quite likely). In which case - lucky you! You can forget about all this.