Is there a way to pass text strings to Pager from the PKC file?

You can use DL Pager's ability to access the Python programming language interpreter.

Let's say you want to pass a filename through a Pager keyboard command (PKC) file. In the PKC file you'd enter the command:

PY "myfile='\\\\node\\\\device\\directory\\text'"

A couple syntax notes:

  • The example above stores a string containing a Windows file specification in a Python variable.
  • PY is the Python command. The entire string following the PY, enclosed in double quotes, is passed to the Python interpreter.
  • MYFILE is the name of the Python variable into which we're going to be storing the value of our string.
  • Note that the value to be stored in the variable MYFILE is enclosed in single quotes.
  • Also note all of the "extra" backslashes. That's because the backslash is the escape character in Python. To output a backslash, you have to precede it with a backslash.
Here is the actual composition of a Pager-accessible Python instance:
[dg s^^raw_input]

The Pager global string variable "s^^raw_input" will contain the string \"\node\\device\directory\text."

Feedback and Knowledge Base