System Command Wrappers
pykx.system
System command wrappers for PyKX.
SystemCommands
SystemCommands(q)
Wrappers for q system commands.
More documentation on all the system commands available to q can being
(found here)[https://code.kx.com/q/basics/syscmds/].
tables
tables(namespace=None)
Lists the tables in the current namespace or in the provided namespace.
cd
cd(directory=None)
Get the current directory or change the current directory.
Examples:
Get the current working directory.
kx.q.system.cd()
Change the current working directory to the root directory on a UNIX like machine.
kx.q.system.cd('/')
namespace
namespace(ns=None)
Get the current namespace or change to a new namespace.
Examples:
Get the current namespace.
kx.q.system.namespace()
Change the current namespace to .foo, note the leading . may be ommited.
kx.q.system.namespace('foo')
functions
functions(ns=None)
Get the functions available in the current namespace or functions in a provided namespace.
Examples:
Get the functions within the current namespace.
kx.q.system.functions()
Get the functions within the .foo namespace, note the leading . may be ommited.
kx.q.system.functions('foo')
load
load(fd)
Loads a q script or a directory of a splayed table.
Examples:
Load a q script named foo.q.
kx.q.system.load('foo.q')
rename
rename(src, dest)
Rename file src to dest.
Equivalent to the unix mv command or Windows move command.
Note: Cannot rename to a different disk.
Examples:
Rename a file foo.q to bar.q.
kx.q.system.rename('foo.q', 'bar.q')
variables
variables(ns=None)
Get the variables in the current namespace or variables in a given namespace.
Examples:
Get the variables defined in the current namespace.
kx.q.system.variables()
Get the variables associated with a q namespace/dictionary
kx.q.system.variables('.foo')
kx.q.system.variables('foo')
workspace
workspace()
Outputs various information about the current memory usage of the q process.
Examples:
Get the memory usage of EmbeddedQ.
kx.q.system.workspace