Those of you who know me know that I'm a big fan of Python. It's a really powerful and flexible scripting language that sits nicely in that space between shell scripts that have gotten too big (i.e. more than 10 lines ), and large-scale applications written in C++ or Java. I remember trying to print out the manual for 1.5.2IIRC, this was the iconic version of Python, much like 3.1 was for Windows for a long time. way back in the late-90'sYes kids, we often used printed manuals, back in the day :-O, and I'd already been using it for a few years then, so I guess that means I've been using it for nearly 20 years now
Awasu has had an embedded Python interpreter for some time, and one of the things that has been lurking in the murky depths of my to-do list for many years now is a write-up on how to actually do this, since the documentation is not particularly great. Inexplicably, I found myself with a bit of time recently and have finally managed to cross this one off my list
- Compiling the Python interpreter
In which we look at how to compile Python from its source code.
- Adding the Python interpreter to your program
In which we look at how to embed Python into your own program.
- Calling Python code from your program
In which we look at how to pass data into Python for process, and get the results back.
- Using Python in a multi-threaded program
In which we look at how to use Python in a multi-threaded program.
- Handling errors
In which we look at how to handle errors returned to us by Python.
- Writing a C++ wrapper library (part 1, part 2, part 3, part 4)
In which we write a C++ wrapper library around the Python API.
- Distributing your program
In which we look at what you need to distribute with your program for Python to work.
Hopefully, I'll be able to follow this series up with another one, that explains how to go the other way - extending Python with your own custom features. Just give me a couple of years...
[ + ]
|1.||↵||IIRC, this was the iconic version of Python, much like 3.1 was for Windows for a long time.|
|2.||↵||Yes kids, we often used printed manuals, back in the day :-O|