At some point, "Sean Berry" <se********@cox.net> wrote:
I want to debug a script that has a line like the following:
if len(os.environ["QUERY_STRING"]) > 0:
How do I debug this from the command line. I tried
QUERY_STRING='sized=72&shaped=3' ./aqua_getShapes
But that returns:
QUERY_STRING=sized=72&shaped=3: Command not found.
Please help. Thanks
Are you using tcsh as your shell? The syntax above works with Bourne
shells (bash, etc.). With tcsh, try
$ env QUERY_STRING='sized=72&shaped=3' ./aqua_getShapes
('env' being the same program that most Python scripts use to find the
interpreter in the #! line: #! /usr/bin/env pytho)
or, set the variable in the environment
$ setenv QUERY_STRING='sized=72&shaped=3'
$ ./aqua_getShapes
--
|>|\/|<
/--------------------------------------------------------------------------\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca