KX Community

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

Home Forums PyKX pykx is returning different output compared to embedQ Reply To: pykx is returning different output compared to embedQ

  • rocuinneagain

    Member
    July 11, 2024 at 1:48 pm

    PyKX also will convert a hsym directly to a Path type object

    q).pykx.print[.pykx.eval["lambda x:x"]`:/path/to/file]
    /path/to/file
    q).pykx.print[.pykx.eval["lambda x:type(x)"]`:/path/to/file]
    <class 'pathlib.PosixPath'>

    If you want a string of the Path you can call:

    streamer:.pylibs.security[`:smStreamer] .pykx.eval["lambda x:str(x)"] file