mirror of
https://github.com/Z3Prover/z3
synced 2025-04-08 10:25:18 +00:00
The issue here is that in Python2 ``exec`` is a statement and ``exec`` is a function in Python3. For the ``exec`` statement to work we would need to write ``` exec line.strip(' \n') in exec_globals, None ``` We could write a wrapper function to do the right thing depending on the Python version but a better approach is to actually just use ``eval()`` rather than ``exec()`` because * ``eval()`` is less "evil" than ``exec()`` because it only evaluates a single expression. My testing so far seems to indicate that this is sufficient. * ``eval()`` is function in both Python 2 and 3 so we don't need to specialise the code based on Python version. |
||
---|---|---|
.. | ||
mk_consts_files.py | ||
mk_copyright.py | ||
mk_def_file.py | ||
mk_exception.py | ||
mk_genfile_common.py | ||
mk_gparams_register_modules_cpp.py | ||
mk_install_tactic_cpp.py | ||
mk_make.py | ||
mk_mem_initializer_cpp.py | ||
mk_pat_db.py | ||
mk_project.py | ||
mk_unix_dist.py | ||
mk_util.py | ||
mk_win_dist.py | ||
pyg2hpp.py | ||
README | ||
trackall.sh | ||
update_api.py | ||
update_header_guards.py |
Instructions for updating external Z3 API ----------------------------------------- The python "macros": def_Type() and def_API() are used to add new types and function definitions to the Z3 API. The .h files provided to `mk_bindings(API_files)` contain these definitions. See src\api\z3_api.h for many examples. The bindings for .Net and Python are generated when mk_make.py is invoked.