KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums PyKX pykx incompatible with subprocess and multiprocess – core dumps Re: pykx incompatible with subprocess and multiprocess – core dumps

  • rocuinneagain

    Member
    July 21, 2023 at 12:00 am
    PyKX 1.6.1 has been released. Full details on the release can be found here.
    Highlights:
    • Added sortedgroupedparted, and unique. As methods off of Tables and Vectors.
    • Added PyKXReimport class to allow subprocesses to reimport PyKX safely. Details here.
    • Added environment variables to specify a path to libpython. Details here.
    • Fixed memory leaks in QConnection and PyKX as a server.
    • Fixed bug in Jupyter Notebook magic command.
    Full details including many other fixes included here.

    import pykx as kx

    with kx.PyKXReimport():

    output = subprocess.run(

    (str(Path(sys.executable).as_posix()), ‘-c’, ‘import pykx; print(pykx.q(“til 10”))’),

    stdout=subprocess.PIPE,

    stderr=subprocess.STDOUT,

    text=True,

    ).stdout.strip()

    assert output == “0 1 2 3 4 5 6 7 8 9”