Best way to go about embedding python

Steve D'Aprano steve+python at pearwood.info
Sun Nov 13 19:40:46 EST 2016


On Mon, 14 Nov 2016 12:23 am, Chris Angelico wrote:

> Python without its stdlib is a disappointingly featureless
> language :)


I don't think that's true. You can do a lot in Python without any imports in
your code:

- basic string processing
- BigNum (int) and float arithmetic
- lists and tuples
- dicts
- lazy processing of iterators
- custom functions and classes
- functional style zip, map and filter

and more.

Some parts of the standard library are required for built-in functions, e.g.
the io module is needed to open files. But I think you could probably
reduce the standard library by, oh, 90% and still have a decent language
for game scripting.


-- 
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.




More information about the Python-list mailing list