home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / tcl / 2446 < prev    next >
Encoding:
Text File  |  1993-01-22  |  2.4 KB  |  54 lines

  1. Newsgroups: comp.lang.tcl
  2. Path: sparky!uunet!walter!grumpy!bytor
  3. From: bytor@grumpy.NoSubdomain.NoDomain (Ross Huitt)
  4. Subject: Re: How difficult is a restricted tcl shell ?
  5. Message-ID: <1993Jan22.142651.19906@walter.bellcore.com>
  6. Keywords: shell user supervisor interpreter
  7. Sender: bytor@grumpy (Ross Huitt)
  8. Nntp-Posting-Host: grumpy.ctt.bellcore.com
  9. Organization: Bellcore
  10. References: <brucet.727682251@extro.ucc.su.OZ.AU> <C198w7.6Jv@ux1.isu.edu>
  11. Date: Fri, 22 Jan 93 14:26:51 GMT
  12. Lines: 40
  13.  
  14.  
  15. This is _exactly_ what I was intending on doing in one of my applications.
  16. The longer I work with Tcl, the more good uses I find for multiple
  17. interpreters.
  18.  
  19.       -bytor@bellcore.com
  20.  
  21. In article <C198w7.6Jv@ux1.isu.edu>, simmdan@ux1.isu.edu (Daniel Simmons) writes:
  22. |> In article <brucet.727682251@extro.ucc.su.OZ.AU> brucet@extro.ucc.su.OZ.AU (Bruce Tulloch) writes:
  23. |> >Is something along the lines of a restricted tcl shell or "user" and
  24. |> >"supervisor" mode easily implemented ? For example, in supervisor mode,
  25.  
  26. |> Well, I'm just at the thought/dream't state at the moment, but...
  27. |> 
  28. |> As a part of a Campus Wide Information System for Idaho State University,
  29. |> I've been implementing a menu system based on Tcl.  Menu definitions are
  30. |> all in Tcl, and the users actually get a Tcl interpreter to type menu
  31. |> choices into (they just don't know it).  That is, the user is presented
  32. |> with a menu of numbered options and a command prompt.  When they type
  33. |> number "5" for instance, they are actually calling a Tcl procedure named
  34. |> "5" which carries out the action named on the menu.
  35. |> 
  36. |> Anyway, at the moment, they have full access to the interpreter, but it
  37. |> is my plan to eventually have two interpreters.  One is for the users
  38. |> and will have most everything disabled (ie. no exec or any other way to
  39. |> get to a subshell, etc.).  It will also have at least one command added
  40. |> from C which will be used for choosing menu items.  In this case, when
  41. |> they type "1", it will actually call a C procedure which will pass the
  42. |> command "go 1" into a separate interpreter.  The second interpreter 
  43. |> will have the full set of Tcl commands plus the application specific
  44. |> commands.
  45. |> 
  46. |> Does this kind of describe what you're thinking about?  Anyone else
  47. |> have thoughts/comments?
  48. |> 
  49. |> Danny
  50. |> -- 
  51. |> Daniel Simmons          electronic mail : simmdan@isu.edu
  52. |> Idaho State University       voice mail : (208) 236-3199
  53. |> Computer Center              snail mail : Box 8037, Pocatello
  54.