mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 20:18:18 +00:00
Moved python bindings into package
This commit is contained in:
parent
9f77759cd6
commit
fa6cc19184
|
@ -1600,8 +1600,8 @@ def write_core_py_preamble(core_py):
|
||||||
core_py.write('# Automatically generated file\n')
|
core_py.write('# Automatically generated file\n')
|
||||||
core_py.write('import sys, os\n')
|
core_py.write('import sys, os\n')
|
||||||
core_py.write('import ctypes\n')
|
core_py.write('import ctypes\n')
|
||||||
core_py.write('from z3types import *\n')
|
core_py.write('from .z3types import *\n')
|
||||||
core_py.write('from z3consts import *\n')
|
core_py.write('from .z3consts import *\n')
|
||||||
core_py.write(
|
core_py.write(
|
||||||
"""
|
"""
|
||||||
_lib = None
|
_lib = None
|
||||||
|
|
10
src/api/python/z3/__init__.py
Normal file
10
src/api/python/z3/__init__.py
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
from .z3 import *
|
||||||
|
|
||||||
|
from . import z3core
|
||||||
|
from . import z3num
|
||||||
|
from . import z3poly
|
||||||
|
from . import z3printer
|
||||||
|
from . import z3rcf
|
||||||
|
from . import z3types
|
||||||
|
from . import z3util
|
||||||
|
from . import z3consts
|
|
@ -41,10 +41,10 @@ Z3 exceptions:
|
||||||
... print("failed: %s" % ex)
|
... print("failed: %s" % ex)
|
||||||
failed: sort mismatch
|
failed: sort mismatch
|
||||||
"""
|
"""
|
||||||
from z3core import *
|
from .z3core import *
|
||||||
from z3types import *
|
from .z3types import *
|
||||||
from z3consts import *
|
from .z3consts import *
|
||||||
from z3printer import *
|
from .z3printer import *
|
||||||
from fractions import Fraction
|
from fractions import Fraction
|
||||||
import sys
|
import sys
|
||||||
import io
|
import io
|
|
@ -5,9 +5,9 @@
|
||||||
#
|
#
|
||||||
# Author: Leonardo de Moura (leonardo)
|
# Author: Leonardo de Moura (leonardo)
|
||||||
############################################
|
############################################
|
||||||
from z3 import *
|
from .z3 import *
|
||||||
from z3core import *
|
from .z3core import *
|
||||||
from z3printer import *
|
from .z3printer import *
|
||||||
from fractions import Fraction
|
from fractions import Fraction
|
||||||
|
|
||||||
def _to_numeral(num, ctx=None):
|
def _to_numeral(num, ctx=None):
|
|
@ -5,7 +5,7 @@
|
||||||
#
|
#
|
||||||
# Author: Leonardo de Moura (leonardo)
|
# Author: Leonardo de Moura (leonardo)
|
||||||
############################################
|
############################################
|
||||||
from z3 import *
|
from .z3 import *
|
||||||
|
|
||||||
def subresultants(p, q, x):
|
def subresultants(p, q, x):
|
||||||
"""
|
"""
|
|
@ -6,8 +6,8 @@
|
||||||
# Author: Leonardo de Moura (leonardo)
|
# Author: Leonardo de Moura (leonardo)
|
||||||
############################################
|
############################################
|
||||||
import sys, io, z3
|
import sys, io, z3
|
||||||
from z3consts import *
|
from .z3consts import *
|
||||||
from z3core import *
|
from .z3core import *
|
||||||
from ctypes import *
|
from ctypes import *
|
||||||
|
|
||||||
##############################
|
##############################
|
|
@ -9,9 +9,9 @@
|
||||||
#
|
#
|
||||||
# Author: Leonardo de Moura (leonardo)
|
# Author: Leonardo de Moura (leonardo)
|
||||||
############################################
|
############################################
|
||||||
from z3 import *
|
from .z3 import *
|
||||||
from z3core import *
|
from .z3core import *
|
||||||
from z3printer import *
|
from .z3printer import *
|
||||||
from fractions import Fraction
|
from fractions import Fraction
|
||||||
|
|
||||||
def _to_rcfnum(num, ctx=None):
|
def _to_rcfnum(num, ctx=None):
|
|
@ -6,7 +6,7 @@
|
||||||
# Author: Leonardo de Moura (leonardo)
|
# Author: Leonardo de Moura (leonardo)
|
||||||
############################################
|
############################################
|
||||||
|
|
||||||
import ctypes, z3core
|
import ctypes
|
||||||
|
|
||||||
class Z3Exception(Exception):
|
class Z3Exception(Exception):
|
||||||
def __init__(self, value):
|
def __init__(self, value):
|
|
@ -11,7 +11,7 @@ Usage:
|
||||||
import common_z3 as CM_Z3
|
import common_z3 as CM_Z3
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from z3 import *
|
from .z3 import *
|
||||||
|
|
||||||
def vset(seq, idfun=None, as_list=True):
|
def vset(seq, idfun=None, as_list=True):
|
||||||
# This functions preserves the order of arguments while removing duplicates.
|
# This functions preserves the order of arguments while removing duplicates.
|
Loading…
Reference in a new issue