KxSystems / pyq

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

PyQ 4.2.1 command line arguments #104

Closed antipisa closed 4 years ago

antipisa commented 5 years ago

The new release of PyQ allows to specify q command line arguments referenced in #67. However one can no longer pass in a python script with arguments to an interactive IPython session. In 4.1.4, you could run a script in IPython/pyq with

pyq -m IPython -i script.py -- $PYARGS but now any arguments proceeding -- are considered q arguments.

pyq -m IPython -i $PYARGS script.py -- $QARGS clearly would not work either.

Is there a way to modify python.q to enable old behavior? Or allow something like this?

pyq -m IPython -i script.py -- $PYARGS -- $QARGS

abalkin commented 5 years ago

If we allow

pyq -m IPython -i script.py -- $PYARGS -- $QARGS

what would

pyq -m IPython -i script.py -- $ARGS

mean?

If we keep the current logic, $ARGS would be q args and to pass python args without q args you will have to do

pyq -m IPython -i script.py -- $PYARGS --

I think we can do this.

antipisa commented 5 years ago

I agree, $ARGS should be q args, and a pure python script with -- $PYARGS -- would be consistent with

pyq -m IPython -i script.py -- $PYARGS -- $QARGS

github-actions[bot] commented 4 years ago

Stale issue message