[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Import script



[Note: I am resending this message that Chema sent to an older version
of the Open Mash list since it has some useful info for folks doing
script development.  I wanted it recorded in the developers list so I
link to it from a webpage. /LAR]

Hi, 

I created a import script that permits executing current 
mash otcl scripts without having to expand them previously. 
I found pretty annoying the need to "compile" my scripts 
everytime I modified them. The new script does the expansion 
process during run-time: instead of expanding every "import" 
command, now there is an actual import command that worries 
about everything. You can also execute "import" commands 
interactively. 

You may find it useful, or at least you may feel like 
helping me to debug it. I've already tried vic, vat, 
and nsdr and all of them work fine. 

To try it: 

1) copy the import.tcl file (attached to this mail or 
available at ~chema/import.tcl) in the directory where 
your mash import table (a file called importTable) is 
located. This directory is normally called mash-1 (for 
example, in the OpenMash notes it is /vid30/mash-1/mash-1/ ). 
This is also the directory pointed by the environment 
variable TCLCL_IMPORT_DIRS. 

2) Check that your TCLCL_IMPORT_DIRS env variable is 
defined and pointing to the same directory. 

3) add the following line as the very first one on your 
main.tcl script: 

source [file join $env(TCLCL_IMPORT_DIRS) import.tcl]

That should be everything. 

Regards. 
-Chema

import.tcl