How are tcl files evaluated by Aolserver?

Philip Greenspun's Homepage : Philip Greenspun's Homepage Discussion Forums : 6916 : One Thread
Notify me of new responses
In the TCL shell, how do you run a series of tcl commands written to
a text
file in emacs?
I'd like to run them as declarations, then also run other tcl commands
afterwards .... If I do tclsh filename, it runs it, but then kicks me
out
of tcl so I can't use those procedures

-- Aileen Tang, February 2, 2000

Answers

Response to A student's question

Just call the .tcl file from your browser. e.g. if you save it under /web/yourserver/www/foo.tcl, just load up this page:

http://lcswebXX.lcs.mit.edu/www/foo.tcl

Or you can put the commands in a proc defined in a file in the /web/yourserver/tcl/ directory. i would name it yourserver.tcl (as in these procs are for custom use by your server). Then reinitialize private tcl from the AOLserver. Then you can execute the commands every time you reference that proc name from any of the .tcl files executed via a web browser.

In the future, please post 6.916 related questions to the 6.916 forum:

http://photo.net/bboard/q-and-a.tcl?topic_id=24&topic=6916

This way your question can also benefit other students.

Aileen

-- Aileen Tang, February 2, 2000