In demand for the code encryption, I need to encrypt my codes into a binary file( reference: https://code.kx.com/q/wp/permissions/#protecting-proprietary-code ), i.e., by running the "_ test.q", I got a binary encrypted file test.q_. Then I need to upload this file to the kdb instance, but unfortunately, I don't have the access to the server that hosts the kdb instance, then I need to inject this test.q_ to the kdb by python.
I've tried to use the qpython module, with
f = open( 'test.q_', 'rb')
codes = f.read()
conn = qpython.qconnection.QConnection( 'localhost', 12345 )
conn.open()
conn( codes )
But it doesn't work, any idea how can I achieve this via python to kdb? Many thanks!
You can't send the contents of a scrambled q file over IPC, it can only be loaded into the kdb instance. Can you not connect to the kdb instance and tell it to load the file?