KxSystems / pyq

PyQ — Python for kdb+
http://code.kx.com/q/interfaces
Apache License 2.0
191 stars 49 forks source link

support for .z.pi #140

Closed xiangpeng2008 closed 3 years ago

xiangpeng2008 commented 3 years ago

Do we have any plan to support .z.pi in pyq ? The issue is firstly posted: https://github.com/KxSystems/pyq/issues/93 With the help of .z.pi, I could easily custom output like adding colors to make output easier to read. image But in pyq I can't as .z.pi is not supported.

sashkab commented 3 years ago

The answer is same: q) prompt in PyQ is a pseudo-prompt and does not support all features of kdb+ prompt and was created to simplify debugging.

Closing as duplicate of #93.

xiangpeng2008 commented 3 years ago

For me, I mainly use q) prompt in PyQ, and the python prompt serves as an interface for calling python package, loading pd data and related debugging Am I right to use pyq for this purpose ? Or is there any other more straightforward specific package for this ?

sashkab commented 3 years ago

You don't really need to use q) prompt while in PyQ. You can run your queries from Python prompt, using q.table.select('...')-like notation.

xiangpeng2008 commented 3 years ago

Thanks for your reply. q.table.select would work as well. But as I used q heavily for years already, I'm quite used to q syntax, and it's not convenient to switch a new notation, especially when original q style could be very short and efficient. But overall I understand well what you said that q) prompts is a pseudo-prompt.