From: Justin Gullingsrud (
Date: Fri Aug 30 2002 - 08:37:04 CDT


Have you tried TkCon? It's a Tk-based terminal that's easy to embed within
VMD, replacing the regular text console, and it has quite of bit of readline's
functionality, including command, filename, and variable completion, access
to history via the cursor keys, as well as syntax highlighting and other nice
features. You can get a modified version from the VMD script library at;
we've added a workaround to make TkCon handle long lines more efficiently,
or you can get the original version at If you use
the sourceforge version you'll have to enter "tkcon attach main" at the
command prompt after starting TkCon in order to have access to VMD's commands.

I'm not sure why tclreadline is failing; VMD doesn't use the Tcl_Main
procedure that tclsh uses, so it might not be a compatible environment
for tclreadine.

Let us know if you have any other questions.


On Fri, Aug 30, 2002 at 10:02:47AM +0100, Marc Baaden wrote:
> Hi,
> I was wondering whether there is an easy way to get file
> completion and history functions (cursor up/down) to work
> in the tcl console.
> For a simple tclsh it works when I add
> if {$tcl_interactive} {
> package require tclreadline
> ::tclreadline::Loop
> }
> to my .tcshrc, but that has no effect on vmd. Maybe I just
> need to know the correct place where to put this in one of
> the vmd tcl scripts ?
> Marc Baaden
> --
> Dr. Marc Baaden - Laboratory of Molecular Biophysics, Oxford University
> - ICQ# 11466242 -
> FAX/Voice +49 697912 39550 - Tel: +44 1865 275380 or +33 609 843217

  Justin Gullingsrud        3111 Beckman Institute        217-244-8946
  I been dropping the new science, and I be kicking the new knowledge,
  and I'm seeing to a degree that you can't get in college.  -- b.boys