KxSystems / pyq

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

-s argument to enable multithreading #67

Closed antipisa closed 6 years ago

antipisa commented 6 years ago

Is there a way to specify the number of slaves prior to executing PyQ? The command

PYQ_BACKTRACE=yes pyq -s 14

does not work.

abalkin commented 6 years ago

There is no support for passing q arguments via the pyq executable, but you should be able to work around this limitation by calling the python.q script directly:

$ q python.q <python script> <q arguments>
abalkin commented 6 years ago

See gl-784.

sashkab commented 6 years ago

This feature is implemented and scheduled for release 4.2.0.

You will able to pass arbitrary options to q by adding them after --

For example:

$ pyq -- -s 14
zak-b2c2 commented 6 years ago

Will this work for iPyQ too? And how do I run that atm with iPyQ? I'm trying to load in a Python file to iPyQ and pass in q arguments. I want to run something like below, but -s does not work

ipyq -i script.py -- -abc 123 -def 456 -s 4