The test scripts listed on this page demonstrate some of PyWX's features. There are also some even simpler scripts that can be used to test your installation of PyWX in several modes.
NOTE: Some of these scripts won't function unless
SetupCGIEnv
is enabled in the AOLserver configuration
file.
hello.py -- [ source ] -- Print "Hello, world."
simple-form.py -- [ source ] -- do simple form processing.
simple-sql.py -- [ source ] -- run some simple SQL commands through the AOLserver Ns.Db interface. (Requires that a database be set up in your AOLserver configuration file.)
interpret.py -- [ source ] -- run a Python interpreter on user specified code (in restricted execution mode).
Example: Hello, world!
print-source.py -- [ source ] -- print source code in basic HTML format.
simple.adp -- [ source ] -- shows calling simple Python code from ADP.
Clearly this is not the way to do it; taking out the 'ns_python eval' is the next step of the process ;).
Persistence testing: do values persist across interpreters? They shouldn't, unless you put them in __persistdict__.
persist-1.py -- [ source ] --
establishes a persistent dictionary entry
persist-2.py -- [ source ] --
checks for a persistent dictionary entry
persist-clean.py -- [ source ]
-- cleans out the persistent dictionary entry
If you get odd results, it may be because someone else is running the scripts at the same time!