Code Comments
Programming Forum and web based access to our favorite programming groups.I think I am missing something badly. I have lappend auto_path in my .tclshrc. Isn't .tclshrc executed everytime you invoke tclsh? Why am I getting 2 different outputs (and behaviors) when I do "tclsh a.tcl" versus invoking tclsh and then sourcing a.tcl? Thanks in advance, -Bhushit bhushit@jungle:/home/bhushit/learn/tcl/graph: head ~/.tclshrc lappend auto_path <foo>/lib/tcllib package require control package require struct bhushit@jungle:/home/bhushit/learn/tcl/graph: cat temp.tcl puts $auto_path bhushit@jungle:/home/bhushit/learn/tcl/graph: tclsh temp.tcl <bar>/tcl8.3.3/lib/tcl8.3 <bar>/tcl8.3.3/lib /import/tools/lib BUT bhushit@jungle:/home/bhushit/learn/tcl/graph: tclsh ========= 8.3:/home/bhushit/learn/tcl/graph:-> source temp.tcl <bar>/tcl8.3.3/lib/tcl8.3 <bar>/tcl8.3.3/lib /import/tools/lib <foo>/lib/tcllib <foo>/lib/tcllib/control
Post Follow-up to this messageBhushit Joshipura wrote: > I have lappend auto_path in my .tclshrc. > Isn't .tclshrc executed everytime you invoke tclsh? No. http://www.tcl.tk/man/tcl8.4/UserCmd/tclsh.htm "There is no automatic evaluation of .tclshrc when the name of a script file is presented on the tclsh command line, but the script file can always source it if desired." -- | Don Porter Mathematical and Computational Sciences Division | | donald.porter@nist.gov Information Technology Laboratory | | http://math.nist.gov/~DPorter/ NIST | |_______________________________________ _______________________________|
Post Follow-up to this messageBhushit Joshipura wrote: > I have lappend auto_path in my .tclshrc. What you probably want to use instead is the TCLLIBPATH environment variable. -- | Don Porter Mathematical and Computational Sciences Division | | donald.porter@nist.gov Information Technology Laboratory | | http://math.nist.gov/~DPorter/ NIST | |_______________________________________ _______________________________|
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.