Search notes:

Python library: pyexpander

Installing pyexpander

In my case as administrator on Windows:
pip install pyexpander
This also installs the expander.py script under <inst-dir>/Scripts.

Simple example

Here's a file to be preprocessed (test.txt):
first $py(num = 42) line
second $py(txt = 'Hello world') line

This is the fourth line in the output.

The number is $(num) and the text is $(txt).
This file can now be preprocessed to stdout with
C:\users\rene> expander test.txt
This command prints
first  line
second  line

This is the fourth line in the output.

The number is 42 and the text is Hello world.

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1759561883, '216.73.216.149', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/Python/libraries/pyexpander(62): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78