[GRASS-dev] Re: how to check for system in TclTk
glynn at gclements.plus.com
Sun May 6 17:09:16 EDT 2007
Michael Barton wrote:
> Paul Kelly sent me this great-sounding tip as a way to get system
> information without invoking the Unix command uname, which is unavailable
> under windows.
> The only problem is that I get an error...
> can't read "tcl_platform(platform)": no such variable
> ...whenever I try to invoke it in a TclTk script. Even odder, if I invoke it
> from a wish command line, it is fine (though it report unix on my Mac
> because I'm using x11).
> Is there some secret trick to using this? It is not apparent in the TclTk
> docs that I'm reading.
Are you using it from within a procedure? If so, you need to use
"global tcl_platform", as with any other global variable.
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev