Pnyx can be used from a terminal window on Linux / Mac, or from CMD.exe on Windows. When using from Windows, however, its
shell is limited compared to the Unix based systems. One of those limitations is the handling of parameters. When parameters
contain reserved characters, like spaces, they must be quoted. Windows only supports double quotes, which makes including
C# strings a little awkward.
Take, for example, calling
pncs with a C# line containing a string literal, like:
On Linux, this can be easily escaped by using single quotes.
pncs -i 'readString("hello world");'
Windows does not support escaping parameters with single quotes. Instead, you must always use double quotes. To include a quote character
as a parameter, it can be escaped using 2 consecutive quote characters. On Windows, the preceding example becomes:
pncs -i "readString(""hello world"");"
For simplicity of this documentation, all examples will be shown as Linux examples. To run on Windows, you can either modify the parameters, or simply
install Linux on Windows
. Most of the examples for this documentation were verified
using Ubuntu on a Windows 10 PC.
Finally, you can avoid using inline scripts completely, and create
files (C# script). Using files may be a little extra effort, but there is no difference
in the syntax between Linux and Windows for
files. See Usage
for more information on