next up previous contents
Next: Networking Up: External Resources Previous: Files   Contents

Shells and Pipes (Not Currently Implemented)

The Shell and Environment globals are provided to access the underlying operating system's command shell functionality from within the Slate environment. Shell provides a dispatch hook for shell-related methods, while Environment acts as a Dictionary of the current shell context's defined variables and values. They support several primitive methods as follows:

Shell enter
enters the host operating system's command-line shell. This has no effect on the Slate environment directly except for suspending and resuming it.
Shell runProgram: programName withArgs: argsArray
executes the program with the given name and passes it the arguments which must be Strings.
Shell execute: scriptFilename
passes the contents of the file named along to the shell, returning its output.
Environment at: varName
returns the value stored in a given environment variable.
Environment at: varName put: newValue
stores the new value into the given environment variable named.
Environment keys
returns an Array of the environment variable names defined in the context that Slate was executed in. This result is independent of the actual environment variables.
Environment values
returns an Array of the environment variable values in the context that Slate was executed in, in the same order as the keys are returned. This result is independent of the actual environment variables.


next up previous contents
Next: Networking Up: External Resources Previous: Files   Contents
Brian Rice 2004-08-24