python: implement formula.__format__

Fixes #105.

* src/bin/common_trans.cc (quote_shell_string): Move ...
* src/misc/escape.cc, src/misc/escape.hh (quote_shell_string):
... here.
* wrap/python/spot_impl.i: Wrap escape.hh.
* wrap/python/spot.py: Implement formula.__format__.
* wrap/python/tests/ltlsimple.py: Test it.
* NEWS, doc/org/tut01.org, wrap/python/tests/formulas.ipynb: Document
it.
This commit is contained in:
Alexandre Duret-Lutz 2015-10-03 11:20:02 +02:00
parent 20bb171904
commit 5bfd0267e7
9 changed files with 364 additions and 67 deletions

2
NEWS
View file

@ -3,6 +3,8 @@ New in spot 1.99.4a (not yet released)
Python:
* Add bindings for complete().
* Formulas now have a custom __format__ function. See
https://spot.lrde.epita.fr/tut01.html for examples.
Bugs fixed: