Do Explorative Programming in tclsh with Readline Support
Kevin Walzer
kw at codebykevin.com
Fri Sep 18 07:02:49 PDT 2009
On 9/18/09 8:47 AM, Ryan Schmidt wrote:
> I'm trying to follow these instructions for the first time and am not
> having any luck, so I don't know if I'm doing something wrong or if the
> instructions need to be changed e.g. for MacPorts 1.8.0 or if there is a
> bug in MacPorts 1.8.0.
>
> http://trac.macports.org/wiki/CommittersTipsAndTricks#DoExplorativeProgrammingintclshwithReadlineSupport
>
>
> I have created the file macports_testing.tcl with the specified contents
> (except that on the first line I use "/opt/local/Library/Tcl" etc.
> because that is where my macports1.0 lives).
>
> Leaving rlwrap out of it for the moment, I can run "tclsh" (or
> "tclsh8.4" or "tclsh8.5"). But as soon as I try to "source
> ~/path/to/macports_testing.tcl" I don't see the successful "1.0" message
> but instead:
>
> can't read "workpath": can't read "portbuildpath": no such variable
>
> Can anybody help?
The problem might be that your installation of the MacPorts libraries
isn't on the standard Tcl search path. /Library/Tcl is a standard search
path for Tcl on the Mac, but /opt/local/Library is not. Try running this
command in your tclsh session:
lappend auto_path /opt/local/Library/Tcl
or whatever the specific location is, then try sourcing the relevant file.
Here's a good site with resources for learning more about Tcl:
http://www.tcl.tk/doc/
There's a tutorial there, among other things.
HTH,
Kevin
--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
More information about the macports-dev
mailing list