Search
Powered by SQLite FTS

Content

  • Olivetti Programma 101 Simulator
    21 Sep 2017card -file $::runfrom/images/p101card-${size}%.gif image create photo p101 -file $::runfrom/images/p101.gif image create photo cr -file $::runfrom/images/cardreader-${size}%.gif image create photo 1xparentpx -file $::runfrom ... variable cmd. eval "bind $w.list <ButtonRelease-1> \{$cmd \[\%\W get \@\%x,\%y\]\}" # return the widget path return $w } proc scrolledtextarea {w l t r b } { set width [= {round(($r-$l)*$::dispw
  • *
    11 Jun 2014be made a lot more accessible by using `[namespace path]`, which means you don't need to write all those namespace qualifiers. ====== namespace path {::tcl::mathop ::tcl::mathfunc} * {*}$foo # => 2112 # if you ... the same thing as with `string match`). ====== glob -nocomplain *.bar # => (a list, possibly empty, containing any file names with the ".bar" extension you have in your current working directory.) ====== <<categories>> Operator | Syntax
  • /dev/disk
    05 Mar 2015the disk for information proc ::disk::resolve { path {max 20}} { if { [file type $path] eq "link" } { set dst [file join [file dirname $path] [file link $path]] incr max -1 if { $max > 0
  • 3D animation on canvas with Gnuplot
    25 Nov 2012a full path to gpexe if your platform is windows if {$::tcl_platform(platform) == "windows"} then { set gpexe C:/Prog/Graph/gnuplot-4.0/bin/pgnuplot.exe } set outfile [file dirname [info
  • 3D Hilbert Curve
    29 Apr 2018path for this type and draw # the remaining sub-units. set lvl2 [expr {$lvl - 1}] ;# Down a level set oct $hpath3d($type,start) ;# Octant to start in foreach path $hpath3d($type,path ... Linux for, respectively, capturing the image to a PNG file, cropping the image, and converting the resulting PNG file to a JPEG file about 3 times smaller. Thank you FOSS developers everywhere
  • 9P (Plan 9 Filesystem Protocol) VFS
    27 Sep 2012list /tmp/plan9/NOTICE /tmp / plan9/LICENSE] { file stat $fn X foreach e [array names X] { puts "file stat $fn $e $X($e)" } } ====== ---- The file"main-auth.tcl" [http://plan9.bell-labs ... have an account there. The authentication mechanism uses DES, and hence it requires tclDES. ====== lappend auto_path tclDES-0.8 source 9pvfs.tcl source p9sk1.tcl set fs [socket sources.cs.bell
  • A chroot virtual filesystem
    17 Jan 2012templateProc $infoArgs $infoBody } proc file_attributes {file {attribute {}} args} {eval file attributes \$file $attribute $args} catch {rename redirect_handler {}} catch {rename handler redirect_handler} proc handler args { set path [lindex $args 0
  • a debugger with syntax highlighting using ctext
    23 Apr 2017toplevel args} { destroy $toplevel } proc twDebug::InspectorSave {args} { variable config set file [tk_getSaveFile] if {$file == ""} {return} set fh [open $file w] puts $fh [$config(win,ctext) get 1.0 "end - 1 ... create a standard widget with scrollbars around # # wigdet -> name of the widget to be created # parent -> path to the frame, in which the widget and the scrollbars should # be created # scrollx -> boolean
  • A delta virtual filesystem
    31 Aug 2011Delta $fileName $path return } proc RemoveDirectory {path root relative actualpath} { catch {file delete [file join $path $relative]} } proc Stat {path root relative actualpath} { set fileNames [glob -nocomplain -path [file join $path $relative
  • A do-it-yourself IDE with the text widget
    25 Nov 2017of executables # - Path to the executables # # -- removed these parts for the benefit of the Wiki if { 0 } { set sysdir [file dirname [info script]] source [file join $sysdir "fshowsys.tcl"] source [file join
  • A DSL to generate XSD files
    20 Sep 2018result $text } if {$argc < 1 || $argc > 2} { puts stderr "Usage: tsd2xsd tsd-file ?xsd-file?" exit } set path [pwd] cd [file dirname [lindex $argv 1]] lassign $argv tsd xsd source -encoding utf
  • A featherweight test harness
    02 Aug 2014paste workflow. Example zource: ====== zource { package forget mytestingenvthing source "abs/path/to/file1" source "abs/path/to/file2" source "path/to/this/file" } ====== Called w/ one argument, means "this is my reset
  • a form for Access Database
    16 Oct 2012require BWidget package require tclodbc set connected no #driver set driver "Microsoft Access Driver (*.mdb)" #Database Path set dbfile "C:\\Program Files\\Microsoft Office\\office\\samples\\Northwind.mdb" #user account and where ... is #set mdw "C:\\My documents\\BasesDeDatos\\unfiled\\Control.mdw" #set user admin #set password "" if {![file exists $dbfile]} { tk_messageBox -message "Couldn't open:\n$dbfile" exit } # Database Connection database connect
  • A GUI for defining and solving ordinary differential equations
    22 Dec 2014and plot when starting with a different ODE file/anew # # Enhancements: # - Monte Carlo simulation # - Allow customised plotting # - Different integration options # - More examples # #lappend auto_path c:/tcl/lib ;# Hack! package require vectcl
  • A High-Definition Meter - for CPU Usage - using 'create image'
    07 Jun 2014FROM THE ## POINTER-IMAGE FILE --- determined by the current ## theme index, $THEMEindex --- IF the file is specified in ## the theme. ################################################################## if {"$aRimgPointer($THEMEindex)" != ""} { image create photo imgID_pointer -file \ "$DIRscripts/pointers/$aRimgPointer ... with 'create text') --- and whether an ## arc should be drawn/shown (with 'create arc') along the ## path of the tic marks. ## ## Optionally, as part of the 'theme' selected, 4 images ## ('rivets' or
  • A lightweight digraph package
    03 Jan 2016routes {graph file} { sqlite3 db $file db transaction { digraph nodes $graph -progress ::progress source { set visited [dict create] digraph search $graph $source {digraph least-cost} path { set dest [lindex $path end] if
  • A Little Clipboard Daemon
    01 Feb 2016Summary** ... **Code** ======tcl #!/bin/sh # execute in wish from path \ exec wish "$0" ${1+"$@"} # clipserver.tcl - Keeps an eye on everything that is copied to the clipboard # and doesn't let it ... xcb.html]. ---- [LES] on Feb 24, 2005: I had suggested running it from the rc.local file, but of course that doesn't work, because X is not running yet by the
  • A little fortune teller
    22 Jan 2012viewer that runs on Windows too - you just have to obtain a fortune file from somewhere, and put its path into the source. The viewer uses a [message] widget, which I've
  • A little XML browser
    10 Sep 2012node -text $text -fill $fill foreach child [$node childNodes] {recurseInsert $w $child $node} } set fp [open [file join [lindex $argv 0]]] set xml [read $fp] close $fp dom parse $xml doc $doc ... 25 recurseInsert $tree $root ====== ---- Also see "[browser]". ---- '''[rattleCAD] - 2011-03-09 06:22:51''' "[simplify_SVG: path element ...]". using tdom and ttk::treeview, load svg-files, display xml as text and DOM
  • A little XML Schema validator
    27 Jul 2015path. I use a global stack for paths, and implement the XSD elements as Tcl procs, so they can be directly eval-led. ====== proc readSchema filename { lappend ::Stack [file join [pwd] [file
  • A Message User Agent
    06 May 2014if {![file exists $path]} { file mkdir $path } while {[file exists $path/[set uniq [clock clicks]]]} {} file mkdir $path/$uniq set chan [open $path/$uniq/data w] close $chan[puts $chan $data] file
  • A Mini Database Manager
    10 Jul 2011mounted), or write with the corresponding path: ====== set fd [open datafile.dat w] puts $fd hi! close $fd ====== Note that the above mount will create the file if it did not exist
  • A Minimal Hypertext Help System
    21 Jul 2011if you try to use the "-all" flag with Tk 8.4.) * A plain-text help file with uniquely named section titles (or other section identifiers), plus minimal markup for links with ... read $helpfile] close $helpfile .uhelp.tx insert 1.0 $helpcontents getlinks } # Test (obviously, substitute your directory path first!): comhelp "/home/david/9.com/wish/suite/comhelp_link.txt" ====== ---- [HJG] I don't
  • A network echo Windows service using TWAPI
    07 Aug 2013to deal with # quoting of spaces in the path set exe [file nativename [file attributes [info nameofexecutable] -shortname]] set script [file nativename [file attributes [file normalize [info script]] -shortname]] twapi::create_service
  • A not-so-little value dialog
    02 Sep 2011all. ====== # # Copyright (c) 2011 by Michael Thomas Greer # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # package require Tk ... name) $options($abbreviation) } } } # Validate options ......................................................... if {($options(-parent) ne {}) && ![winfo exists $options(-parent)]} { error "bad window path name \"$options(-parent)\"" } foreach opt {fractionx fractiony} { set v $options(-$opt) if {![string is double
  • A package proto
    06 Jan 20120.9 [list source [file join $dir apackage.tcl]] ====== ---- **A demo** (file: demo.tcl) ====== ############################### # # APackage demo # ############################### # ----------- # packages & entry points # ----------- # refering the package in the current directory lappend auto_path [pwd] package require
  • A Paginated Canvas Widget
    24 Sep 2018page create %AUTO% $self -xorigin .... ====== I copied the whole page into a tcl file added an apropriate auto_path and ran it using tclkit. [NEM]: It works for me, on various platforms
  • A Poor Boy does Deployment
    02 Mar 2016introduced a wicked bug where the freewrap'ed app just sits there when run from a path that contains spaces - like C:\My Documents\My Pictures). Now don't get me wrong ... to see what it is all about - '''oh lord a revolution!''' applogic with appdata in one file... one runtime... need to distribute 3 files... the starkit, the tclkit, and msvcrt.dll ... for
  • A quota-enforcing virtual filesystem
    22 Jan 2012file exists [file join $path $relative]] {return} while {[file exists [file join $path $relative]]} {file delete -force [file join $path $relative]} QuotaDelete $path $root $relative } proc Stat {path root relative actualpath} { file
  • A Screenshot Widget implemented with TclOO
    04 Jan 2018library packages, # auto_path usually needs to be modified to fit your specific environment: # set dir [file dirname [info script]] lappend auto_path [file join $dir "."] lappend auto_path [file join $dir
  • A scrolled frame
    21 Jun 2016toplevel $path] <MouseWheel> [list +[namespace current] scroll $path yview %W %D] bind [winfo toplevel $path] <Shift-MouseWheel> [list +[namespace current] scroll $path xview %W %D] return $path } # Given the toplevel path of ... vtop}]" } } # end of ::scrolledframe namespace definition } ====== ---- **The demo** ====== # ============================== # # demo # # ============================== if {[catch {package require Scrolledframe}]} \ { source [file join [file dirname [info script]] scrolledframe.tcl] package require Scrolledframe } namespace import ::scrolledframe::scrolledframe scrolledframe .sf
  • A Scrolled Widget implemented with TclOO
    08 Nov 2011scrolledwidget {path args} { set obj [ScrolledWidget create tmp $path {*}$args] rename $obj ::$path return $path } oo::class create ScrolledWidget { variable widgetOptions variable widgetCompounds variable auto variable isHidden variable GridIdx constructor {path args ... terms of the GNU General Public License as published by # the Free Software Foundation. # # See the file "license" for information on usage and # redistribution of this program, and for a disclaimer of
  • A simple GUI for decision trees
    02 Mar 2015with via simple computations, for more complex cases the client is advised to follow the sophisticated path. Anyhow, such a system in this day and age requires a graphical user-interface and ... associated computations in a way as shown by the example * Run the general program with the file containing that decision tree as an argument The program itself looks like this: ====== # decision.tcl
  • A Simple Multi-File Starkit Example
    25 Apr 2015package require Tcl] 8.5]} { ::tcl::tm::path add [file join $starkit::topdir lib] } starkit::autoextend [file join $starkit::topdir lib tcllib] starkit::autoextend [file join $starkit::topdir lib tklib] package require
  • A simple package example
    10 Jul 2011that uses this package will only have to contain the two lines ====== lappend ::auto_path <directory of this file> package require futil ====== You can even omit the first line, if you install
  • A Snit News Ticker Widget
    02 Mar 2015get set Interval 45 ;# Refresh interval (mins) #set User "foo" #set Password "secret" lappend auto_path [file dirname [info script]] package require nntp package require ticker # Parse the NNTP message headers into
  • a tclhttpd scripted document
    22 Jan 2012or at least where the system can find it or edit the batch file and use the full path. Note, the current tclhttpd3.3.1, looks for tcllib at the same directory
  • A tcllib based smtp mailer package
    07 Mar 2015this [info script]] == ""} {set this [info nameofexecutable]} set appRoot [file dirname $this] # make sure, to load packages from *here*: lappend auto_path [file join $appRoot specify_where_to_find_tcllib] # note: # make
  • A TclOO megawidget based on tablelist (tabelistbrowser)
    30 Aug 2016find autoscroll, etc ... # set this_file [file normalize [file dirname [info script]]] # where to find required packages... # set auto_path [linsert $auto_path 0 [file join $this_file ".."]] package require autoscroll package
  • A TclOO megawidget based on tablelist - extended (XTableList)
    05 May 2017set dir [file normalize [file dirname [info script]]] # where to find required packages... set auto_path [linsert $auto_path 0 [file join $dir "."]] set auto_path [linsert $auto_path 0 [file join
  • A TclOO megawidget based on ttk::scale implementing -resolution option (xscale)
    05 Feb 2017W %x %y } } } } ====== xcale_test.tcl ====== # # xscale test # set dir [file dirname [info script]] set auto_path [linsert $auto_path 0 [file join $dir "."]] package require Tk package require xscale 0.1
  • A TclOO tablelist template
    29 Aug 2016find autoscroll, etc ... set this_file [file normalize [file dirname [info script]]] # where to find required packages... # set auto_path [linsert $auto_path 0 [file join $this_file ".." "contrib" ]] package require Tk
  • A TclOO Tkhtml 3.0 megawidget - example of how to render html+css
    09 Mar 2018packages... set auto_path [linsert $auto_path 0 [file join $dir "."]] set auto_path [linsert $auto_path 0 [file join $dir ".."]] set auto_path [linsert $auto_path 0 [file join $dir "../../00
  • A template virtual filesystem
    29 Nov 2011argument named "path" to the proc arglist. E.g., proc file_exists {file} {file exists $file} can be changed to: proc file_exists {file path} {puts $path ; file exists $file} and the
  • A Tk GUI for multiple XSLT processors
    07 Jun 2011original version. } ====== #!/bin/sh # # \ exec tclkit $0 "$(1+$@)" package require starkit ::starkit::startup lappend auto_path [file join $::starkit::topdir lib] package require Tcl 8.4 package require Tk 8.4 ################################################################################# # # XSLT
  • A Tk viewer for MJPEG streams
    22 Apr 2017GMT] set base [file join $home $base] while {[file exists [set fname "${base}_[incr i].jpg"]]} {} $img write $fname -format jpeg $tv insert {} end -values [list [file tail $fname] [file size $fname ... ne ""} { append path ? $query } } if {[catch {socket $host $port} fd]} { errCondition "Error opening socket\n$fd" return } chan configure $fd -buffering full -translation crlf -blocking 0 chan puts $fd "GET /$path HTTP
  • A two color rounded-rectangle-maker GUI
    07 Jun 2014solid-color image ## file, making a rounded-corner semi-transparent image file ## (GIF or PNG) from the NON-solid-color image. ## Then the SEMI-TRANSPARENT, NON-SOLID-COLOR image file could be ... command' of a button widget ##+############################################################### ##+##################################################################### ## proc DrawRoundRect: ## ## Draws a rounded rectangle in a canvas. ## ## Arguments: ## w - Path name of the canvas ## ## Global parms: ## ## curRADIUS - radius of the bend at the corners, in
  • A two-color rounded-POLYGON-maker GUI (equilateral and not so equilateral)
    07 Jun 2014solid-color image ## file, making a rounded-corner semi-transparent image file ## (GIF or PNG) from the NON-solid-color image. ## Then the semi-transparent, NON-solid-color image file could be ... rounded corners in the canvas, based ## on ideas and code from "Drawing rounded rectangles" ## ## Parameters: ## w - Path name of the canvas ## xy - list of coordinates of the vertices of the polygon ## radii
  • A versioning virtual filesystem
    18 Jul 2011return [file join $path $relative]} } if ![string first .&dir [file tail $relative]] { set fileName [file join $path [file dirname $relative]] return [file normalize $fileName] } return [file join [file dirname [file join $path
  • A Webcam setup with tcl scripts
    02 Mar 20161 -R - 2> /path/messdune" r] fconfigure $f -translation binary fileevent $s readable "puts \"read: \[gets $s\]\" ; flush stdout if \[eof $s\] { close $s close $f puts {End of file.}} " after 2000
  • Accessing the help pages without changing the default directory
    23 Feb 2016Change the default directory according to the file loaded * But Do not do this if the directory has the word '''User's Help''' in its path It's not a very orthodox
  • accordion - yet another TclOO implementation
    03 Apr 2018weight 1000 set row $num } } ====== ***demo1.tcl*** ====== #!/usr/bin/tclsh set dir [file dirname [info script]] lappend auto_path [file join $dir "."] package require Tk package require accordion # demo code ... catch {console
  • ActiveState of Tcl 2008
    07 Mar 2015now considered the stable line * Had several enhancements: [VFS], [lset], [lsearch], [trace], 64-bit integer and file system support * Had significant work on performance (+20%) Near or better than 8.0, but ... end[[+-]]int'' syntax * [namespace ensemble]: [[::carrot::foo]] == [[::carrot foo]] * [namespace unknown] (per-namespace unknown control) * [namespace path] (name resolution control) * [namespace upvar] (namespace variable resolution efficiency) * Completely revamped [clock] command; no more
  • ActiveTcl
    12 May 2018FIRST''' in your path. ---- Recently on comp.lang.tcl someone asked how to install ActiveTcl on Linux. A rough outline of the steps are: * Download the appropriate tar.gz file * Extract the
  • Add tk fontchooser Dialogue To tkcon prefrences menu
    28 May 2015tk fontchooser'' . The ''tk fontchooser'' helps you choose the font you like for the widget/window path you want. You can also watch this youtube that explains the steps below. https://www ... watch?v=3DqEIep8YQM So, this is what you should do: * In Linux, Open and edit the file ''/usr/bin/tkcon'' using any text editor. If you're on Windows, then open the
  • Additional file commands
    20 Jan 2016unknown platform"} } } proc path'find filename { foreach path [split $::env(PATH) [path'separator]] { set try [file join $path $filename] if [file readable $try] {return $try} } error "no such file: $filename" } ;# RS ====== Note
  • AKG Wikit
    08 Sep 2015diff pages on Windows. Unix uses "/tmp". WIKIT_PATH: Any directories to be added to the path. Apache seems to create its own path variable and doesn't allow modification, this is ... the following configuration environment variables: CGI_LOG: If this is set errors are written to the file named instead of being e-mailed. WIKIT_CVSDIR: The directory used to check items into
  • Alternative dialogs for pocketPC/etcl
    15 Aug 2010file join $dir colorBox.tcl] ;] [list source [file join $dir he-dialog.tcl] ] " 5. Move the directory dialogDir to a directory in the auto_path of etcl. This is file join [file
  • AMG's language ideas
    01 Dec 2013some kind of configuration file (for example). foo.mk is built by some inline shell script, external program, or combination of the two that reads the configuration file and outputs the data ... might itself be a qualified list, so it needs expansion: '''${caller `$name}''' Each element in the path can have indexing suffixes. I don't see why it wouldn't be possible to
  • An analogue stopwatch with music for game shows
    22 May 2013snack, this also plays directly from a single file. ====== #!/usr/bin/wish set basedir [file normalize [file dirname [info script]]] lappend auto_path [file join $basedir lib] package require snit package require
  • An Interactive Approach to Experimenting with Tcl
    04 Jun 2012bin/tclsh.exe % info vars tcl_rcFileName tcl_version argv argv0 tcl_interactive auto_oldpath auto_path err orCode errorInfo auto_index env tcl_patchLevel argc tcl_libPath tcl_platform tcl _library ... do is issue the following command: dnotify -r . -e ./try.tcl In plain english: whenever a file in the current dir is renamed, run the "try.tcl" script. With this running in
  • An Introduction to Tcl Scripting
    18 Sep 2015exec rm *.o ;#-> *.o: No such file or directory glob *.o ;#-> a.o b.o exec rm [glob *.o] ;#-> a.o b.o: No such file or directory exec rm {*}[glob *.o ... unknown procedure invoked when command doesn't exist. ** Loads procedures on demand from libraries. ** Uses search path of directories. * Additional features: ** Dynamic loading of binaries: load command. ** Security: Safe-Tcl. ** Event-driven
  • An LZW-compressing virtual filesystem
    22 Jan 2012file mkdir [file join $path $relative] } proc DeleteFile {path root relative actualpath} { set fileName [AcquireFile $path $relative] file delete $fileName } proc FileAttributes {path root relative actualpath} { set fileName [AcquireFile $path $relative] file
  • An SSH virtual filesystem
    02 Jun 2014closed, if a file named ~/.fish_close # exists on the remote computer it will be executed as a shell script in the # background (with the name of the file written as a ... that commits changes to a CVS repository. # # client configuration: # # The shell client must be in the PATH and configured for non-interactive # (no password prompt) use. # # The value of the -transport option
  • AndroWish
    01 Aug 2018in Androwish to reach and include config_include.tcl I must put the full path of the file as in: ====== source /sdcard/some/folder/config_include.tcl #rest of main.tcl code
  • AndroWish and SQLite
    25 Apr 2015package require sqlite3} namespace path ::tcl::mathop catch {font create myfont -family courier -size 10} wm attributes . -fullscreen 1 # Create a Tktable for display of an attached file's schema proc maketable
  • AndroWish Bugs
    08 May 2018env(PATH) path for exec(n) including app specific directory env(TMPDIR) path name for temporary files For the structure of an APK please see http://en.wikipedia.org/wiki/APK_(file
  • AndroWish Feature Requests
    18 Jun 2016it worked but the opposite (borg shortcut delete) did not. The <file-to-be-sourced> must be given as an absolute path and it must be readable by the user id under
  • AndroWish Questions
    14 Jan 2018correctly. Adding the path (even as glob -dir . *.gif) errors the same way. Is there a known issue there? [chw] 2015-01-14: confirmed the "glob" problem. Please file a ticket on
  • AndroWish/Patch for Tcl 8.6
    15 Dec 2013mk @@ -0,0 +1,224 @@ +LOCAL_PATH := $(call my-dir) + +########################### +# +# Tcl shared library +# +########################### + +include $(CLEAR_VARS) + +LOCAL_MODULE := tcl + +LOCAL_C_INCLUDES := $(LOCAL_PATH)/generic $(LOCAL_PATH)/unix + +LOCAL_EXPORT_C_INCLUDES ... CreateExitHandler(FreeMainInterp, interp); } +#ifdef ZIPFS_IN_TCL + /* + * Setup auto loading info to point to mounted ZIP file. + */ + + if (zipOk == TCL_OK) { + char *tcl_lib = "/assets/tcl" TCL_VERSION; + char *tcl_pkg = "/assets
  • AndroWish: Documentation
    28 Jul 201405) `env(PACKAGE_CODE_PATH)`: Path name of the app's APK `env(PACKAGE_NAME)`: Package name where the app's main class comes from `env(PATH)`: Path for exec(n) including ... size images but requires a file on external storage: ====== proc callback {filename retcode action uri mimetype categories data} { if {$retcode == -1} { # SUCCESS myphoto configure -file $filename catch {file delete -force $filename} } } package
  • AndroWish: Tips and Tricks
    06 Sep 2017s] proc motion {mode path W X Y finger} { global movex global movey if {$finger != 1} {return} if {$mode eq "motion" && [winfo exists $path] && [string match $path* $W] } { $path xview scroll [expr ... Androwish] version: file delete /data/data/tk.tcl.wish/files/.wishrc file copy .wishrc /data/data/tk.tcl.wish/files "wishrc.tcl", this is used to immediately get a file browser dialog
  • Annotated 10 steps to success with TEA
    19 Sep 2015will find the file. ***prepare Tk*** * My tclsh is not in the path so extend the path by my tcl bin folder: `PATH C:\Progra~1\tcl8.5\bin;%PATH%` (It will
  • Another font chooser dialog - based on tablelist
    06 Mar 2018file dirname [info script]] set auto_path [linsert $auto_path 0 [file join $dir "."]] set auto_path [linsert $auto_path 0 [file join $dir ".."]] set auto_path [linsert $auto_path 0 [file
  • Another little file search
    18 Jun 2011args]'" } } set fileList "" set fL "" set path [Backslash2Slash $path] set all [glob -nocomplain $path/*] dputs "all 'glob -nocomplain $path/*' -> '$all'" foreach f $all { update idletasks if {[file isdirectory $f]} { set progressVar $f
  • Another Shoutcast Player
    19 Sep 2015foo foo2 server foo3 port path]} { if {$port == ""} { set port 80 } if {$path == ""} { set path "/" } puts "server = $server; port = $port; path = $path" shoutcast::connect $server $port $path set status play shoutcast::play ... by a read/puts (at least on my windows machine). Otherwise works great! ---- [LV] 2007 June 27 Today, at least, jtang.org is not accessible. [tclshout] <<categories>> Application | File | Internet | Multimedia | Music
  • Another Tcl module maker
    30 May 2016is one of the values that \$tcl_platform(platform) chan have or \"any\". filename path to the file to add to the module " if {$argc < 3} { puts stderr "Wrong # args: must be
  • Answered Questions On: Basic Tcl
    14 Nov 2009in 8.4) would be this, I believe: set path [file attributes "c:/directory/your file.tcl" -shortname] eval exec [auto_execok start] $path & ----- **Saving canvas contents** ''This question is neither basic
  • Answered Questions On: Databases
    19 Sep 2015The script worked perfect now. I just added the path of the oratclsh file which is $ORACLE_HOME/bin/oratcl as the following: #!<path of your $ORACLE_HOME>/bin/oratclsh ----> The ! is
  • Answered Questions On: The Tk GUI
    13 Feb 2016resolved. Thank you all in advance! [FW]: All you need to do is determine the Tk path (ie .dialog1 or however IWidgets names them) of the dialog boxes. Then it becomes pretty ... a screen for a moment. What technique to use to avoid that? [FW]: Try reconfiguring the -file for the image, which (I believe) will redraw it without destroying anything. ---- **Yellow Sticky Note
  • AOLserver
    12 Feb 2015programming the AOLserver, as well as a DB2 driver and a ns_detach that keeps a file open across requests. At the vivtek site find a perl script to fix the dates ... tcl with threads and shared libs. I wonder why it didn't pick up the right path for tcl.. I even added /tcl/lib to /etc/ld.so.conf and ran ldconfig
  • Apple Macintosh and Tcl/Tk
    05 Mar 2013to execute my file (myfile.tcl) directly by do click on its > icon. ====== [MKS]: Windows tracks file extensions in the registry, and for each extension, may define a default file opener command ... tcl_version argv argv0 tcl_interactive\ tcl_nonwordchars tcl_traceCompile tk_library tk_version\ errorCode auto_path tk_strictMotif errorInfo tcl_wordchars\ tkPriv env tcl_pkgPath tcl_rcRsrcName auto_noexec\ tcl_patchLevel
  • Application preferences with gnocl::keyFile
    20 May 2012sample .ini file set fp [open "sample_config.ini" w] puts $fp { #--------------- # sample_config.ini #--------------- # this is just an example # there can be comments before the first group [Batch] base=/ path= [Crop
  • Array vs. VFS
    02 Jun 2014a directory, but other file systems (e.g. mkvfs, httpvfs) don't share this limitation. It's logically possible to treat a vfs as a flat mapping path->content, / need have no
  • artts
    07 Oct 2015probably have better results overall with [file join]. This should work with all platforms if I recall correctly: ====== # source the users configuration file catch {source [file join $::env(HOME) .arttsrc]} ====== <<categories>> Application ... Woodcock reports: Windoze 2K: I had to change the "source" line from +AH4-/.arttsrc to <full path to arttsrc>. Please note that the slashes go the correct (a la Unix) way round
  • Ask, and it shall be given # 1
    13 Jul 2018full path is, eg, ====== puts "The full path to this script file is [info script]" ====== Or to get just the file name, do: ====== puts "The filename of this script file is [file
  • Ask, and it shall be given # 2
    28 Apr 2015cancelled } set doc(path) $path } set fid [open $doc(path) w+] puts $fid [.t get 1.0 end] close $fid .t edit modified 0 };# save proc ask_to_save_file {} { global doc
  • Ask, and it shall be given # 3
    26 Sep 2016failed: No such file or directory c/r Killed" It looks like it compiled, but something else is wrong. Any ideas? [RJ] Try checking setenv for LD_LIBRARY_PATH - if it isn
  • Ask, and it shall be given # 4
    28 Apr 20157 # using absolute path lappend auto_path c:/Tcl/lib # using path relative to working directory, where Tclkit.exe is # lappend auto_path [file join [pwd] lib] # using path relative to where
  • Ask, and it shall be given # 5
    01 Sep 2015to be any (obvious) way of checking a) whether a given path exists, or b) whether a path refers to a file or a directory. And it seems, from the quick digging
  • Ask, and it shall be given # 6
    13 Feb 2016something like set path [file serialize {c:\mypath\to my\app.exe} ] Also, making your path a list, did seem to work for me. set pathl [list {c:\path to\my\app
  • Ask, and it shall be given # 8
    20 Sep 2018have a ttk::treeview widget set up along these lines: set image [image create photo -file $path] pack [ttk::treeview .t] set id [.t insert {} end -text Foo -image $image] .t insert
  • Ask, and it shall be given # 9
    28 Apr 2015see [namespace path] for details on this question. ---- ***Retrieving a file name from a file descriptor.*** [IanMac] Dec 6 2011 -- I have a common routine which inspects data in a file, for
  • Ask, and it shall be given # 10
    02 Sep 2015indices $value] set path [lreplace [file split $name] end-1 end-1 $lastdir] file mkdir [file join [lrange $path 0 end-1]] set name [file rootname [file join $path]].bin } ====== It replaces
  • Ask, and it shall be given # 12
    28 Jun 2018x": no such file or directory ====== The second has a correct file name, i.e. what was asked for. [gre] 2017-01-10 21:19 a path and a file C:\tmp
  • asynchronous threads
    09 May 2015namespace current]::waiter write [list [self] response] } } if {[info exists argv0] && [ file dirname [file normalize [info script]/...]] eq [ file dirname [file normalize $argv0/...]]} { # Unit Test #Debug on thread proc output args { puts ... Implementation ** ====== # Async - asynchronous thread wrapper if {0 && [info exists argv0] && $argv0 eq [info script]} { lappend ::auto_path . } package require Thread #package require Debug #Debug define thread oo::class create ::Async { # response - process
  • ATWF History (How it Started)
    07 Nov 2010tool would be a simple generator, which uses a [XML], [XSLT] and [CSS] file and generates the [HTML] file (that's very easy using the tools already there, but for beginners that ... between directory structure and class name architecture. Class names are built from directory path names by replacing the path delimiter (normally a „/“ character) by an underscore („_“) character. That
  • auto_load
    22 May 2016a command. ** Synopsis ** : '''auto_load''' ''cmd'' ** Description ** `[auto_load]`, looks in the directories specified by `$auto_path` for files named '''`tclIndex`'''. These are "Tcl autoload index files", and are formatted in two ... 2.0 contains commands set auto_index(::namespace::function_name) `$cmd` where `$cmd` typically sources a file that defines the command `::namespace::function_name` <<categories>> Arts and crafts of Tcl-Tk programming
  • auto_load_index
    18 Dec 2011load_index proc is defined in the init.tcl file. It is used to load the contents of the [tclIndex] files from the [auto_path] directory list. <<categories>> Internals | Tcl syntax help
  • auto_mkindex
    25 May 2014same file. I often use this for demo or self-test, to have the last part of the file like this: ====== if {[info exists argv0] && [file tail [info script]] eq [file tail ... init` procedure which they cannot `auto_load` (yet) because they did not setup load paths (`$[auto_path]`). Now if you e.g. start in a non-gui case, calling an `init` procedure
  • auto_path
    23 May 2016something like ====== set auto_path [linsert $auto_path 0 /home/mystuff/someextension/unix] ====== or ====== lappend auto_path [file join $env(HOME) someextension unix] ====== Always use an absolute path, not a relative one
  • auto_path4platform
    11 Oct 2015to ::auto_path starting with more specific and running to less specific foreach testdir [list "${platform}${windowingsystem}$wordsize" \ "${platform}$windowingsystem" \ "${platform}$wordsize" \ "$platform"] { if { [file exists $testdir] && [lsearch -exact $::auto_path $testdir
  • autocomplete
    11 Oct 2015require Tk 8.5 set mydir [file dirname [info script]] # use this to add the libdir of wcb, tablelist and autocomplete packages lappend auto_path [file join $mydir "lib"] package require autocomplete
  • AutoCorrect
    08 Apr 2014need a proc to parse this beautifully simple file and load the auto correction pairs: ====== proc LoadAutoCorrect {} { array unset ::AC_ARRAY set _fp [open /path/tofile/autocorrect.txt r] while {-1 != [gets
  • automatic .bak files
    24 Sep 2018a $b } if { ! [file exists $dir] } { file mkdir $dir } if { [ file exists $fname ] } { file copy -force $fname $dir set fname $dir/[file tail $fname] set files [ glob -nocomplain -path $fname .ba* ] set
  • automatically generating socket based Tcl / C connection code, 1
    23 Feb 2016Tk code to make a button for each message 5. save and compile the generated C file 6. link it with the socket code 7. run the resulting C program 8. connect ... shell (so that its output becomes visible) ./stub The ./ may not be necessary depending on you PATH variable. It prints that it is waiting for a socket connection to be initiated from
  • automatically generating socket based Tcl / C connection code, 2, using bwise
    23 Feb 2016out [file rootname ${Proc1.in}].o} set Proc1.bfunc_init {} set Proc1.in {test.c} set Proc1.out {test.o} set Proc2.bfunc {exec gcc -c ${Proc2.in} ; set Proc2.out [file ... set Proc5.out3 test.c and on cygwin making sure we have the compiler path included: append env(PATH) ";c:\\cygwin\\bin" we can fire the 'make' equivalent network by using the
  • automating itclproxy from ant
    30 Apr 2016jar"/> </fileset> <filelist dir="${env.HOME}/.ant/lib/lang/"> <file name="jtcl-2.8.0.jar"/> <file name="jtcl-engine.jar"/> </filelist> </path> ====== I used a fileset and the ant-contrib for
  • Automating sftp with Tcl
    17 Aug 2012proc main {argc argv} { if {$argc < 1} { puts stderr "syntax is: [info script] file" return 1 } set dir [file normalize .] set remote_dir [string range $dir [string first public_html $dir] end ... dir1 = "IN"; my $dir2 = "OUT"; my $timeout = 1; # If sftp is not in your path replace with absolute path of sftp program my $command = 'sftp'; my $params = ("$sftpUsername\@$sftpServer"); # Create the Expect
  • autosave
    24 Sep 2018important file, and be able to simply restore or examine a backup. The following script is just to be invoked every 3 minutes (or more if you want) by calling `autosave /path
  • Babylonian Combined Market Rates and eTCL demo example calculator, numerical analysis
    13 Oct 2018You may be interested in file "Free TCL books and docs from Facebook TCL Club.odt" on club file system. However, I am not sure this file format is sufficiently clean and ... to the Friberg and Proust findings in base 60 already, the intent to evaluate the alternate path of the MS3895 midstages and throw out the decimal base 10 expressions into a spreadsheet
  • Babylonian Square rule for Trapezoid Area and eTCL demo example calculator, numerical analysis
    14 Oct 20187) trapezoidal volume = w*(l**2-s**2)/(2.*feed) trapezoid_area_sq_law # end of file, pseudocode: ====== ---- **Appendix Code** ***appendix TCL programs and scripts *** ====== # pretty print from autoindent and ased editor ... version 8.6 # gold on TCL Club, 4oct2018 package require Tk package require math::numtheory namespace path {::tcl::mathop ::tcl::mathfunc math::numtheory } set tcl_precision 17 frame .frame -relief flat -bg
  • Bag of algorithms
    23 Nov 2017catch {file readlink $f} result]} { cd [file dirname $result] set f_path [pwd] ;# pwd makes path absolute set f_file [file tail $result] set f [file join $f_path $f_file] } cd
  • Bag of Tk algorithms
    30 Apr 2018error "Splash requires Tk" } set logo [file join $artdir $art] if { [ file exists $logo ] } { frame .splash -borderwidth 4 -relief raised set logo [ image create photo -file $logo ] label .splash.logo -image $logo ... path delay number_of_repeats label_text} { if { $number_of_repeats % 2 == 0 } { #case when the state is OFF $label_path configure -text " " } else { #case when the state is ON $label_path
  • balloon
    30 Jan 2016balloon * save the source code and make a simple pkgIndex.tcl file with: package ifneeded balloon 1.0 [list source [file join $dir balloon.1.0.tcl]]; * the source code: ====== package provide ... using option add command. This also allows to override balloon fonts just for some widgets, using path specification. BTW, it doesn't look like my code. Somebody have overhauled it, adding namespace
  • balloon help
    02 May 2016f.open -image $im(open) -command {starDOM::openFile .t} help .f.open balloon "Open existing XML file" ====== ** Other Balloon/Tooltip Systems ** What: tooltips Where: From the contact Description: Tk program which provides ... widget ?text?\""; } set w [lindex $args 0] if { ![winfo exists $w] } { return -code error "bad window path name \"$w\"" } if { [winfo class $w] == "Toplevel" } { return -code error "cannot create tooltip for toplevel
  • Best Practices
    14 Feb 2018often important to explain why the app was trying to open a file, particularly if it's a temp file with a completely meaningless name. So simply reporting "couldn't open /tmp ... ensemble command via a command in the ensemble's namespace called `set`, but that's the path to confusion and chaos (because locally, the command replaces the global command, which has to
  • Better getopt
    01 Sep 2015next line is executed by /bin/sh, but not tcl \ exec tclsh "$0" ${1+"$@"} lappend auto_path /usr/local/lib package require getOpt 1.0 namespace import ::getOpt::* # global var array set ... OptionList { {*0} {Dummy {*Options:}} {*1} {Dummy { *Options kkk1:}} f {arg y help {#Specify a test list file}} listf {arg y help {#Same as -f} link f} cc {arg m help {#Notify additional
  • bgexec
    01 Dec 2014today I hit a file size limit using bgexec: ====== set logfile "my_logfile.txt" set inputfile "input.dat" set outputfile "output.dat" eval set pid [::blt::bgexec triggervar /path/to/prog -o
  • Blauncher
    07 Apr 2010file and replace them by its path (currently under /tmp) @end -> ignores further arguments @bg -> runs command in background (appends '&' to the command line) @wdir /path/to/dir -> runs command with /path
  • bll
    20 Sep 2018wish executable path. It seems that stdout gets completely lost. I had to open a file and save the output there, then I could retrieve the information from the output file in
  • BLT
    23 Feb 2016site has a set of patches that adds full stubs support, fixes blt initialization, fixes config file problems, etc. The neosoft .exe happens to be a version of Tcl/Tk 8.3 ... zooming for the graph widget. Add one line of code to your graphing script ====== Blt_ZoomStack .path.to.graph ====== and then you can zoom in by selecting areas of the graph with
  • BOOK Tcl/tk Programmer's Reference
    24 Aug 2012argc, 27 argv, 27 array, 28 auto_execok, 31 auto_load, 32 auto_mkindex, 34 auto_path, 35 auto_reset, 35 beep, 35 bell, 37 binary, 37 bind, 43 bindtags, 52 bgerror ... eval, 126 event, 128 exec, 133 exit, 138 expr, 138 fblocked, 144 fconfigure, 145 fcopy, 149 file, 151 fileevent, 165 flush, 167 focus, 168 font, 170 for, 177 foreach, 178 format, 180
  • Boolean Logic
    02 Sep 2015the overall 1 for certain and 'gates'. Logical designers would never built this circuit with longest path of n-1, because that would have corresponding electronical signal delay, but built it like ... q or5 a} \ {or5 q list4 i2} {list4 l Mon2 in} ====== I should have the bwise file somewhere, I'll see. The idea in bwise is that the variables in a block
  • borg
    04 Apr 2014works better but requires a file on external storage: ====== proc callback {filename retcode action uri mimetype categories data} { if {$retcode == -1} { # SUCCESS myphoto configure -file $filename catch {file delete -force $filename} } } package ... the ''name-of-shortcut'' specified. The script, specified as ''script-to-run'' must use an absolute path must be readable by the user id under which the AndroWish package has been registered
  • Braintwisters
    26 Aug 2016source file, which when called re-sources it: ====== proc [file tail [info script]] {} "source [info script]" ====== Usage: include this line in files you're currently editing. Call the file name (without path
  • breadcrumbs widget
    11 Aug 2016this_file [file normalize [file dirname [info script]]] # where to find required packages... set auto_path [linsert $auto_path 0 [file join $this_file ".."]] set auto_path [linsert $auto_path 0 [file
  • BrowseX
    11 Mar 2015this puppy I added and changed a few lines in brx.tcl I changed the auto_path so it could find '[Memchan]', and the package that Peter assembled/wrote called 'thin'. Then ... in brx.tcl, sadly the paths were strewn all over the place (but only in that file). Please note that before all this I first ran the binary version that creates its
  • Brush
    30 Jul 2016or obscure their origin. For example, `set chan [[open file]]]]` is legal, and no error happens until `$chan` is passed to any file I/O commands, which will fail to find the ... me. Perhaps only support traces on the entire variable, but give the trace callback the reference path that was used. Let it decide what special handling, if any, the referenced component needs
  • Build Androwish
    17 Oct 2016an-unknown-file-c-android-ndk-jni-android-mk maybe there's something wrong with NDK_PROJECT_PATH on your machine. ---- [nb] Ok, continuing on this, indeed my NDK_PROJECT_PATH pointed
  • Build Your First Starkit
    02 Mar 2017xcopy C:\Tcl\lib\tcllib1.7\base64 "C:\Path_to_vfs\Popups.vfs\lib\base64\" /s /v /y echo. echo "Creating the EXE file" tclsh.exe c:\Tcl\bin\sdx.kit wrap
  • Building a custom tclsh
    16 Oct 2013this: file.o: file.h otherfile.h file.c $(CC) -c file.c $(INCLUDES) $(CFLAGS) This creates a file.o file whenever file.h, otherfile.h, or file.c changes. The file ... the OS at run time that it should search its known path (often called the '''LD_RUN_PATH''' or '''LD_LIB_PATH''') for the library name. At run time the loading of
  • Building JACL with Msys
    22 Aug 2011mingw zip file from [http://sourceforge.net/project/showfiles.php?group_id=10894] and extract into C:/ or some other location on your machine. See the included README.TXT file for more ... install is located in C:/j2sdk1.4.2, the /c/j2sdk1.4.2 path is an unix style path alias used by msys. Then do make make test (running test cases is
  • Building Stand Alone Executables in Unix
    17 May 2010lib to your /etc/ld.so.conf, if the path does not already exist within that file. If the ld.so.conf file does not exist then you may need to create
  • Building Stand-Alone Tcl/Tk Applications under Mac OS X
    19 Jan 2017provided with OS X's development tools: install_name_tool -change old new file 'old' is the currently existing path in the binary, which you can obtain using "otool -L MyApp.app
  • Building Starkits and Starpacks using a Makefile
    16 Jan 2015for automating the creation of a starpack: my.exe: my.kit sdx wrap my.kit -runtime /path/to/appropriate/tclkit Again, anything more than this is probably going to be application specific ... How do I automate the starkit creation using a Makefile? I want to create a single file executable. Currently, I can do this with the mktclapp and it seems to work most
  • Building Tcl and Tk with Cygwin
    22 Nov 2015names like "pkg::create.n". Windows doesn't allow colons (and some other "special characters") in file names. I don't think cygwin can go around that. Tk was built with Cygwin ... tk. [JMN] 2005-09-09: Note that if the [cygwin] utility 'cygpath.exe' exists on your path at the time you run 'configure' in [MSYS] - then the generated Makefile will try to
  • Building Tcl DLL's for Windows
    05 Jul 2018Msys and Mingw. * Create a .cpp or .cc file with the code below using your favourite editor. (eg: emacs) * Create a tcldemo.def file with the following lines: EXPORTS Tcldemo_Init Tcldemo ... load library "tcldemo.dll": this library or a dependent library couldn't be found in library path when executing "load tcldemo.dll Tcldemo" Why does it happen? Thank you. Anton. [Peter Newman
  • Building Tcl with the free VC++ toolkit
    17 Apr 2011eg: my vcsetup7.bat file... @echo off set MSDEVDIR=%VCToolkitInstallDir% set INCLUDE=%MSSDK%\include;%VCToolkitInstallDir%\include set LIB=%MSSDK%\lib;%VCToolkitInstallDir%\lib set PATH=%MSSDK%\bin;%VCToolkitInstallDir%\bin;%PATH% Now you can
  • Building Tcl/Tk with Mingw
    01 Sep 2018Building Tcl and Tk for Windows with MSYS2] ---- Note: ensure that your msys.bat file contains a '''set PATH=''' at the top or you will get coredumps. [RS] 2007-10-11: This
  • Building TclBlend with msys_mingw
    07 Oct 20135. make install '''NOTE''': In the Tcl Blend build the path /c/j2sdk1.4.2 is used. This is a unix style path alias for C:/j2sdk1.4.2. If your JDK ... TclBlend from a cmd.exe shell or from the Windows explorer via the jtclsh.bat batch file found in C:\msys\opt\tclblend\bin. These scripts will setup all the environment variables
  • Building tclkit in MinGW on WIndows
    27 Jul 2011on.net/johnson/resourcehacker/]. It alows you to change the icons and file descriptions embeded in a windows .exe file. The resouce hacker homepage refers to an open source resource editor at ... kit (v 1.15) see [tclbench] for details. '''2004-03-12''' update: fixed a hard-coded path bug in genkit. Tested today on WinXP using [MinGW] 3.1.0 using all the
  • Building TclMagick
    08 Jan 2014platform) == "unix" } { set auto_path [linsert $auto_path 0 [file join .. unix]] package require TclMagick } else { set buildtype debug set dll [file join .. win $buildtype TclMagick.dll] if {[file exists $dll]} { load
  • Building the Hello C Extension using Visual Studio 2010 express
    23 Feb 2016C1083: Cannot open include file: 'stdio.h': No such file or directory 5. Added the path to the c header stdio.h, to the system environment variable path and opened a new
  • Built-in VFS
    24 Aug 2011create a different absolute path. For example 'tcl://' is one interesting possibility. We could assume the existence of tcl://boot.tcl and define startup to source that file. But this would mean
  • Bundle o' Starkits
    03 Mar 2014library). A workaround is to set the complete path after cloning a new interp in function runSlaveKit: + $s eval [list set auto_path $::auto_path] $s eval [list set argv $args] [Brian ... description to a text file and adding a new .vfs directory for that game. The contents of a starkit bundle is applauncher.tcl - loads descriptions from applauncher text file into an outline
  • BWidget
    13 Jan 2018mode fixed * error if next widget is a ttk widget and has spaces in the window path * `ListBox` documented options '''-selectfill''' and '''-autofocus''' as read-only [https://sourceforge.net/projects/tcllib/files ... is in branch '''bwidget'''. Here is my recipe: * create a folder where you put the repository file and get the repository with the correct login, so you need it only once and
  • BWidget example: Drag and Drop Demo
    02 Sep 2013path [file join [file dirname [info script]] ..] package require BWidget ;# 1.9.1 # new options available since 1.9.1 (currently only available in CVS): # BWidget::use -package ttk \ # -themedirs [list [file
  • BWidget example: info organizer
    07 Mar 2005over the whole file. File: (optional) the absolute path and file name to 'watch' Example of such a .cfg file: Parent: root Node: Config Parent: Config Node: .bash_login File: /home/n00b3
  • BWidget::NoteBook - changing placement of arrowbutton
    01 Apr 2008x_page $path 0] + 6 > $w) || $permanent} { d1000 1 a1000 1 } elseif {!$permanent} { if you are working on a platform without patch, you can use the following: * create the file notebook.diff
  • bwise
    23 Feb 2016without any warning. File names can be name only for current global tcl dir, or an absolute path in normal unix notation, cut and paste works on the file name field with
  • Bwise blocks using exec maxima
    28 Jan 2013adding: MAXTkmaxima tkmaxima rename exit tkexit proc exit {{val "0"}} {tkmaxima exit "" $val} ## ADD (changing path to match your console script file): source /home/theo/Tcl/unixconsole.tcl ## tkmaxima install <<categories>> BWise
  • Bwise combined with Maxima
    26 Sep 2016032" $it] >= 0 && [regexp -indices "\032\032(\[^:]+):(\[0-9]+):\[^\n]*\n" $it junk file line] } { dblDisplayFrame [getMatch $it $file] [getMatch $it $line] append res [string range $it 0 [expr { [lindex $junk 0 ... to start # You'll have to adapt pths and filenames to suit your setup ########################################################################## append auto_path " c:/Theo/Tcl/lib/" cd e:/Theo/ source bwise343start_windows.tcl update cd e:/Theo
  • Bwise for Presentation
    24 Jan 2011with tcl code. See the currently latest version here: [Bwise version 0.34, all in one file, 8.4 compatible] I did a presentation on [FOSDEM 2004] open source conference, where I ... prescount 0} ; presp dis} bind . <Key-F2> {presp next} bind . <Key-F3> {presp prev} append env(PATH) ";c:\\cygwin\\bin" # I wanted to be able to use cygwin for the C image
  • Bwise on the Parallella
    13 Nov 2017example which compiles with the C-to-FPGA Vivado_hls (free) tools. For instance an automated path from a time function for audio waves, driving the whole compilation from a BWise graph ... in this case including the Vivado tool (also uses Tcl), and loading the resulting FPGA program file as part of one long automated run. But, new for me to try, I'll
  • bytecode
    28 Jul 2018output''': ======none ByteCode 0x0x55cfa663ae10, refCt 1, epoch 17, interp 0x0x55cfa660e980 (epoch 17) Source "\n\ton..." File "/path/to/script" Line 68 Cmds 1, src 6, inst 3, litObjs 1, aux 0, stkDepth
  • C code generators
    05 Mar 2013C codelets) and use these, together with some constant text, to produce a complete C source file in a (temporary?) directory, and mostly call the compiler to produce an executable, and generate ... in C... It makes a tiny main around the cbody, and the wrapper just says ''exec /path/name $args'' ====== cproc strrev {s} { /* Revert a string */ char *cp = s+strlen(s); while(cp
  • C compiled image processing on an interactive Bwise canvas
    02 Sep 2015out [file rootname ${Proc1.in}] } { set Proc1.out $r } ====== The compile command is caught for errors and called with the Proc1.in variables' content as C source file, while the output file ... right to gcc. On windows, you may have to set (depending on your configuration): ====== append env(PATH) ";c:\\cygwin\\bin" ====== I made this and some more examples first on linux (Redhad 9
  • C++/Tcl
    27 Sep 2018the load command. This is more generic then having to put the file path to where the actual library file is located. 2. Support for Tcl stub libraries. This will make any
  • C-like include in tcl
    11 Nov 2006if {[file readable $fileName]} { return [source $fileName]; } error "script file \"$fileName\" not readable"; } default { error "too many files matching \"$scriptFileName\" found"; } } } error "script file \"$scriptFileName\" not found, check your path"; } # build path
  • Caching Dynamic Libraries and Fixing Dependencies
    22 Sep 2018libpath [glob -nocomplain -directory [file dirname $fname] -- *[file extension $fname]] { set dst [file join $dir [file tail $libpath]] if { ![file exists $dst] } { Log debug "Copying $libpath to $dst" file copy -force -- $libpath ... global directory, exit program on failures. # # Side Effects: # Uses the NP global table to store the path to the temporary directory proc ::dynloader::TmpDir { } { if { $vars::tmpdir eq "" } { set vars::tmpdir [location
  • Caching VFS
    02 Jun 2014foreach mp $mps { set shadow [file join $mp $name] if {[file exists $shadow]} { return [file delete $shadow] } } error "No such file" } proc vfs::add::fileattributes {mps path args} { ::vfs::log "fileattributes $args
  • calling Fortran routines in a DLL
    08 Nov 2014to "/path/to/ffidl/source/code" and run "./configure --with-tcl=/path/to/tcl/source/code/unix", then run "make". This will generate libFfidl0.6.so. (Make sure that the path to ... in a module, and using a GCC compiler directive that includes STDCALL. The resulting tcl.f90 file should thus look as follows: ====== SUBROUTINE doublevector(vector) !GCC$ ATTRIBUTES STDCALL :: doublevector DOUBLE PRECISION , DIMENSION
  • can2svg
    19 Oct 2016SVG, # and puts it on a file. # # Arguments: # wcan the canvas widget path # path the file path # args: -height # -width # # Results: # proc can2svg::canvas2file {wcan path args} { variable confopts variable defsArrowMarkerArr variable
  • CANTCL URL interface
    11 Oct 2012socket # add remote library to auto_path package require vfs::webdav set ::webdavdir [vfs::webdav::Mount username:[email protected]/webdav/ mydav 1] lappend ::auto_path mydav/lib # unmount with the ... which helped a lot, but webdav seems painfully slow when Tcl starts another round of pkgIndex file searches. You may also notice I added an ugly hack to the vfs::webdav::Mount
  • Canvas Buttons in 3-D
    16 Feb 2014nice [canvas buttons]. I took Kevin's buttons and added a 3-D appearance. Kevin's file, slightly altered, appears here. The 3-D effect is achieved using routines from the 3 ... buttoninfo namespace export canvasbutton } # ---------------------------------------------------------------------- # # canvasbutton::canvasbutton -- # # Create a button-like object on a canvas. # # Parameters: # w Path name of the canvas # x0 Canvas X co-ordinate of left edge # y0 Canvas Y
  • canvas2mvg
    04 Sep 2010file. Usage: === % canvas2mvg .c viewbox 0 0 342 240 stroke none fill #ffffff rectangle 0 0 342 240 stroke-width 10.0 fill #ffff00 stroke #0000ff stroke-linejoin miter # polygon ... current path
  • Capture a window into an image
    15 Jun 2018of the canvas2photo techniques from the [Img] page. The 'captureWindow' function can be passed any widget path, including that of a [toplevel] window. The image of the window/widget will contain white ... a demo for above the above that creates a window and saves the screenshot to a file, when the user presses the 'x' key in the window. ====== proc windowToFile { win } { set image
  • castle
    02 Sep 2015ext [file extension $path] set data(filter) "" catch { set data(filter) $filtertypes($ext)} if { [info exists filtertypes($ext)] != [info exists servicetypes($ext)] } { regsub "$ext\$" $path "" path } set nextext [file extension $path] if
  • catcom
    08 Jun 2016file_name $new_file_name file delete -force $export_file_name } } ====== Package might be used e.g. such as: ====== # catcom_test.tcl # where to find twapi lappend auto_path [file join [file
  • CC.tcl
    08 May 2010Tcl. # NOTE: ldAix was copied from Tcl into a directory in the PATH. # It might make sense to stuff this file into critcl and then copy it out when # needed, either into
  • Centering a window
    16 Aug 2012t ; wm deiconify .] after [expr {$time*1000}] "destroy $t ; wm deiconify ." } # # Test code # if { [file tail [info script]] == [file tail $::argv0] } { namespace import ::tkmisc::* showTransientWindow 3 {} {$w create rectangle 10 10 30 ... my try, a kind of combination of what I've read here and there: #------------------------------------------------------------------------------- # - takes the path of a window as the only optional arg # - returns 6 elements which are either 0
  • CGI Configuration
    21 Aug 2014naviserver/contributors%|%Developers %|% ** NaviServer config for CGI ** A simple NaviServer configuration file example to enable CGI. ======tcl set package naviserver # Absolute path to the installation directory set homedir /usr/lib/${package} # Log
  • CGI script for directory listing, simple posts and templates
    18 Oct 2013a .htaccess file on my docroot folder Windows: C:\xampp\htdocs Ubuntu: /var/www with the following contents: ======none # Enable URL rewriting. RewriteEngine on # Just let Apache send/process the file if ... 1356737274 "some content"} {titleB 1356737274 "some content"} {titleC 1356737274 "some content"} ====== Key Paths on ubuntu: %|Description|Path|% &|Apache configuration|/etc/apache2|& &|DocumentRoot|/var/www|& &|ScriptAlias|/usr/lib/cgi-bin|& &|Tcl|/usr/bin
  • CGI script to edit csv file
    23 Mar 2017g. /cgi-bin/data * point your browser to '''.../cgi-bin/csvedit.tcl?file=[[path/]]yourcsvfile''' (file relative to script path!) (optional args may follow, like '''sort'''...) * of course, your webserver must be
  • cgi.tcl
    25 Jan 2014entire # path of the client file) set client [file tail [cgi_import_file -client the_file]] # Make sure the uploaded file has an acceptable filename regsub -all {([^\w.-])} $client - safe_file regsub
  • Chaining things
    07 Sep 2013names does not exist any longer ... 4. '''didactical changes''': I thought it interesting to restructure the file so that the properties of ''thing'' are defined using a minimal infrastructure and defining new ... right here: ---- '''NOTES ON USAGE AND CAPABILITIES''' Remark that the ''is-a'' list controls the search path for ways and variables; you can actually do anything you want with it - at your
  • Changes in Tcl/Tk 7.6/4.2
    02 Sep 2013commands''' * [event] * [tk_chooseColor] * [tk_getOpenFile] * [tk_getSaveFile] * [tk_messageBox] '''New Tcl subcommands''' * [file] copy * file delete * file mkdir * file rename '''New Tk subcommands''' * [grid] remove '''Expanded syntax/new options''' grid bbox ... behavior''' The default ''package unknown'' command now searches two directory levels below the directories in $auto_path, not just one. On Windows, tclsh sets tcl_rcFileName to ~/tclshrc.tcl instead of ~/.tclshrc
  • Changes in Tcl/Tk 8.3
    12 Mar 2015event'' ... ?-[warp] ''booolean''? ... [fconfigure] ''serialPort'' ?-lasterror? (''Windows'') [file] atime ''name'' ?''time''? file attributes ''name'' ... ?-permissions ''symbolic''? ... (''Unix'') file mtime ''name'' ?''time''? [glob] ?-directory ''directory''? ?-join? ?-path ''pathPrefix''? ?-types ''typeList''? ''pattern'' ?''pattern'' ...? [linsert
  • Changes in Tcl/Tk 8.5
    06 Apr 2016201%|%201] tcl::mathop::[ni]: [tcl::pkgconfig]: [TIP] [http://tip.tcl.tk/59%|%59] [tcl::tm::path]: [TIP] [http://tip.tcl.tk/189%|%189] [tcl::tm::roots]: [unload]: [TIP] [http://tip.tcl ... tk/299%|%299], [http://tip.tcl.tk/255%|%255], and [http://tip.tcl.tk/255%|%255] '''[file attributes]''' '''-readonly -creator -type -hidden -rsrclength''': [TIP] [http://tip.tcl.tk/118%|%118] '''[format]''' '''%lld
  • Changes in Tcl/Tk 8.6
    21 Sep 2017TIP #343]]] * [tcl::tm::path add] (''zero pathnames'') [[[TIP #323: Do Nothing Gracefully%|%TIP #323]]] * [tcl::tm::path list] [[[TIP #323: Do Nothing Gracefully%|%TIP #323]]] * [tcl::tm::path remove] (''zero pathnames ... dict type'' ''pattern ...'' [[[http://tip.tcl.tk/341%|%TIP #341]]] * [file delete] (''zero pathnames'') [[[TIP #323: Do Nothing Gracefully%|%TIP #323]]] * [file mkdir] (''zero pathnames'') [[[TIP #323: Do Nothing Gracefully%|%TIP #323
  • Changes in Tcl/Tk 8.6.2
    26 Aug 2014act on wide ints * [dict replace], [dict remove] return canonical dicts. * [[file attributes -readonly -archive -hidden -system] on Cygwin * Extended filesystem path support on Windows '''Updated packages''' * [TclOO] 1.0.2 * [http
  • Chess in Tcl
    05 Mar 2013proc sgn x {expr {$x>0? 1: $x<0? -1: 0}} #------------------------------------------------testing demo: if {[file tail [info script]]==[file tail $argv0]} { chess::new game frame .f label .f.e -width 30 -anchor ... incr y [sgn $dy]} { if {($x!=$x0 || $y!=$y0) && $board([square $x $y])!="."} { return 0 } ;# planned path is blocked } } switch -- $fromMan { K - k {expr $adx<2 && $ady<2} Q - q {expr $adx
  • Chinese Horse Race Problems from Suanshu, DFP, and example eTCL demo calculator, numerical analysis
    10 Mar 20171.0.1 # gold on TCL WIKI, 20feb2017 package require Tk package require math::numtheory namespace path {::tcl::mathop ::tcl::mathfunc math::numtheory } set tcl_precision 17 frame .frame -relief flat -bg ... one, the number of days. Not the other, in addition to the number of #end of file English paraphrases marked with brackets {} paraphrased translation of race horse problem 19/20 from Suanshu
  • CHMvfs
    09 Apr 2015filesystem posixerror $::vfs::posix(ENOENT) } return 1 } proc vfs::chm::matchindirectory {chm path actualpath pattern type} { set pattern [file join $path $pattern] set biggest [array name ::vfs::chm::tree${chm} $pattern] set
  • ChooseDir
    29 Jun 2012path} { variable S if {! [winfo exists $w]} return set path [file nativename $path] set S(path) $path set S(entry) $path if {$path ne [lindex $S(undo) end]} { lappend S(undo) $path
  • Classy YAO
    12 Sep 2018set ::argv {} if {![run $argv]} { exit 1 } } else { set file [file tail [info script]] puts stderr "usage: $file test \[test1 test2 ...\]" puts stderr " $file benchmark \[max \[times\]\]" if {$verb in {help -h ... field args} { uplevel 1 [list [namespace current]::! class me $field {*}$args] } namespace eval cyao::test { namespace path [namespace parent] variable clsCounter { i 0 incr {{{n 1}} { self! i [expr { [self! i] + $n
  • clock
    16 Oct 2013specific file? Try clock format [file mtime "/path/to/my/file"] where you replace /path/to/my/file with the path you want. Or replace it with a variable containing the path
  • clonerun
    16 Jul 2010starkit/pack cannot copy itself with 'file copy' etc. without # first unmounting its own virtual file system # Programs locating profiles only in their own load path may fail; # they can use autoCloneOrgPath
  • CloudTk
    18 Feb 2018file. proc ::cloudtk::AccessHook {sock url} { global Doc upvar #0 Httpd$sock data variable Target if {![string equal [file mtime $Target(AuthTargetFile,file)] $Target(AuthTargetFile,mtime)]} { ::cloudtk::AuthTarget } # Make sure the path
  • Cloverfield
    19 Feb 2016least the parser fails close to the problematic code, and not at the end of the file when it cannot find the 'missing' close-brace. Hunting for missing braces has sometimes driven ... t much alternative to a word-modifier-like syntax enhancement. The Jim patch follows the same path as Cloverfield by modifying the brace matching rules. ---- [KJN]: Is Cloverfield compatible with [EIAS]? ''- [FB
  • Cmake
    19 Apr 2011does this have to do with Tcl?" you may wonder...'' Here is a simple CMakeLists.txt file that you can use to build a stubs-enabled Tcl extension on any platform that ... definitions (-DUSE_TCL_STUBS) target_link_libraries (my_extension ${TCL_STUB_LIBRARY}) include_directories (${TCL_INCLUDE_PATH}) ====== For more information on stub-enabled extensions, see the [Stubs] page. ---- ''[Twylite] 2011-04-19
  • Colibri
    23 Jan 2016as well as a comparison point with the official Tcl core, and will possibly open the path to Tcl9. This most likely involves a lot of work. ***Where can it be found ... t * moved platform-specific code to platform/* subtree * Linux version uses mmap and pthreads 3. Test app overhaul. * each test has its own C file * multithreading support <<categories>> Category Data Structure | Cloverfield
  • colorChooser for pocketPC/etcl
    07 Jan 2018be -initialcolor, -parent, or -title.} {Must be -initialcolor, -parent, or -title.} {Bad window path name %1\$s} {Bad window path name %1\$s} {Ok} {Ok} {Cancel} {Cancel} {Add color} {Add color} {Red ... Have this command completely forget. Changed it above. Know the file size is more pocketPC like :-) ---- [EH] Let's make the file size even smaller, but also display a truecolor Hue-Saturation
  • Colors in Unix Shells
    19 Feb 2013the 'tput' program does not exist or the shell does not seem to support colors # if {![file exists "/usr/bin/tput"] || [catch {exec /usr/bin/tput setaf 1}]} { # The tag letters will ... namespace] (::) everything will work. But if your [namespace] is ever loaded inside another [namespace] (so the path becomes anotherNamespace::ccolor::bold) the variable look-up will fail. [rui] (2012-11-13): Thanks
  • Combo -A simple Combobox widget with entry history.
    30 Aug 2013Drop].entry cget -vcmd ] [[string trimright [winfo parent %W] Drop].entry get] } # Step 4) completed, return path to widget return $w } #--------------- # position and display the droplist #--------------- proc combo::droplist {w} { set p ... error at execution time Error in startup script: invalid command name "console" while executing "console show" (file "dev/combo.tcl" line 159) Are your sure of this bunch of code ? [WJG] (15
  • COMet
    29 Oct 2008bad window path name ".m.frame.3.pm.fWord" bad window path name ".m.frame.3.pm.fWord" while executing "frame $path.f$page -relief flat -background [Widget::cget $path -background] -borderwidth ... be loaded manually. A log of COMet actions is maintained, and can be written to a file for further development. COMet was written by [TP] because of sadly lacking and confusing COM
  • Coming to Tcl/Tk from an IDE environment
    07 Jun 2014file ====== Rem This program will run any TCL file in the "Programs" folder through a DOS IDE of the ActiveTCL machine Rem Note: Filename must be hard coded into this BATCH file ... only make them furrow their brows, and they sincerely want to help you to a happier path." And so on. Me, I edit more files with "cat >..." than Word and its relatives
  • Command Option Parsing
    26 Oct 2017and others are simple toggles: : '''glob''' ?''switches...''? ''pattern'' ?''pattern ...''? Supported ''switches'' are: : '''-directory''' ''directory'' : '''-join''' : '''-nocomplain''' : '''-path''' ''pathPrefix'' : '''-tails''' : '''-types''' ''typeList'' : '''--''' ---- ***without optcmds*** In order to handle this syntax today, we will ... a source of errors and # more verbose code required. # have to be careful that the globed file isnt something like -directory # without the user passing -- first! break } } } set args [lrange $args $index
  • Commands pipe
    04 Jan 2017open $file r] set _ [split [read $fp] "\n"] close $fp return $_ } proc > {{file ""}} { if {[string length $file] == 0} { puts {Save the list $_ to a file.} | return } upvar 1 _ _ set fileId [open $file ... of the things that make Python programming fun is just that: Think and program the same path. The following procedure makes this possible in Tcl, and I call it a ''Commands pipe
  • Commenter
    14 Nov 2007contents of a file proc parseF {path} { return [parse [::fileutil::cat $path]] } namespace export -clear * namespace ensemble create -subcommands {} } if {[info exists argv0] && ($argv0 eq [info script])} { set path [info script] puts
  • Common problems when linking Tcl or Tk related applications
    11 Nov 2006cc file.c -L/path/to/libraries -lBLT2.4 -ltk8.4 -ltcl8.4 -lm -lc -o executable On Linux, Solaris, and a few other systems, you probably will even need: cc file
  • Common Tcl Error Messages and Possible Explanations
    10 Aug 2011So, something like this will fail: #! /usr/home/homedir/very/long/path/tclsh # rest of script You can either shorten the path by moving the tclsh executable to a different directory or ... into a script file the same commands they typed in during interactive mode. This results in the user getting the error: invalid command name "ls" while executing "ls " (file "/tmp/t.tcl
  • Compact data storage
    06 Feb 2016rand()*$x)}] } set fd [open tempfile w] mk::file save db $fd close $fd puts " [file size tempfile] bytes" file delete tempfile mk::file close db } ====== The output is: ======none 100,000 ... was easiest to program for, but drastically increased memory requirements. My initial prototype used something like: ====== $path lines [list [list line1Width [list [list contextId "text with context"] [list anotherContext "more text"]]]]. ====== Where
  • COMPANY: AccuRev, Inc.
    03 Apr 2015set file_list {} foreach line $stat_result { foreach {path stream version state} $line { lappend file_list $path } } return $file_list } proc tcl_acrev::updatepath {path} { if {![file isdirectory $path]} { error "$path is
  • Comparing Tcl with Python
    01 Oct 2018item [lindex $lst $args] set list_path [lrange $args 0 end-1] set i [lindex $args end] lset lst $list_path [lreplace [lindex $lst $list_path] $i $i] return $item } proc transfer ... because ActiveTcl is a single file release of Tcl, which includes the tcl interpreter and extensions. And what one downloads from python.org is a single file download of Python, which includes
  • Compile Tcl on ARM Linux
    14 Sep 2016will install gcc4.9 and more * add this to file `.bashrc` and do `source .bashrc` ====== set +h umask 022 LC_ALL=POSIX PATH=$PATH:./ CFLAGS="-pipe -march=native -mfloat-abi=hard -Wa
  • Compiling TCom
    03 May 2012released version of tcom (without CMake) you'd open the solution file, select the release build and possibly adjust the path to Tcl in the project settings for Preprocessor includes and the
  • Complete Config File
    16 Feb 2015a file path/foo.ext is requested, and there # exists a file path/foo.ext.gz, and the timestamp of # the gzip-ed file is equal or newer than the source file
  • Complex data structures
    03 Jan 2016have a 15GB text file that I want to index by creating a trie of all the words in it to record at which offset in the file this word first occurs ... into the dict (similar to the previous "con"). Example: [[[dict incr]]] does not allow a key "path" whereas [[[dict get]]] does. * Minor con: although dictionaries implement the theoretical concept of a "map
  • Complex Pure Tcl Starkit Example
    02 Jun 2014file structure, here's a sample of how the original application would be organized. The executable program is myApp.tcl. myApp.tcl has a line in it to set up auto_path
  • Configuration Language using parsetcl
    06 Mar 2016tcl-like config files if {[info exists argv0] && ($argv0 eq [info script])} { lappend auto_path ~/Desktop/Work/Wub/ [file dirname [info script]] } if {[catch {package require Debug}]} { #proc Debug.config {args} {} proc
  • Configuration Language using Unknown
    29 Jan 2011tcl-like config files if {[info exists argv0] && ($argv0 eq [info script])} { lappend auto_path ~/Desktop/Work/Wub/ [file dirname [info script]] } if {[catch {package require Debug}]} { #proc Debug.config {args} {} proc
  • Considerations when adding extensions to Kitten
    02 Feb 2004understand it, if all you want to do is put in a module for ''signing'' some file (as opposed to encrypting it) then the US Govt isn't too worried. Probably because ... what it is that you are looking for? What would you like to see documented? Auto_path? The package system? Stub-enabled extensions? Loading shared libraries? None of these issues is really
  • Constant String Hack
    06 Nov 2015VALUE)]} { set ::literal($VALUE) $VALUE } return $::literal($VALUE) } # When you build your dict: # dict set result {*}$path [literal $key] [literal $value] # # The technique allows a single Tcl_Obj* to represent every instance ... http://fossil.etoyoc.com/fossil/odielib/artifact/4d1b9cbb39dabc07%|%can be found in odielib%|%. The linked C file (quoting the toad) "is self contained and well behaved, so it should drop into anything
  • Context A nice editor for TCL. You can alter it to run TCL
    18 Aug 2012know anything about SDX or Starpacks. But you can tell it how to run a .tcl file. This is what it looks like: [http://www.geocities.ws/thezipguy/tcl/context/context_1 ... this: [http://www.geocities.ws/thezipguy/tcl/context/context_5_execute2.jpg] You should enter your path to tclkit as necessary. All the other commands should be entered as seen. If you
  • Controlling I/O Peripherals
    03 Feb 2016in the know, the USB interface can act as a subblock in a more complex communication-path and is therefore not a showstopper if one requires wireless communication... As a tcl/tk ... who have the same interest and vision, I would like to share the Ffidl-DLL header file with you. It will also be available as a plugin in the next release of
  • Convert Nokia VMG to plain text
    04 Oct 2008if {$directory == ""} { puts "usage: $argv0 path-to-vmg-files" exit -1 } set count 0 foreach file [glob [file join $directory *.vmg]] { # read file set in [open $file] fconfigure $in -encoding unicode set
  • Convert pre-ANSI C files to ANSI C files
    18 Jan 2013gcc.gnu.org/onlinedocs/gcc/Running-Protoize.html] ====== set filein {C:\path\to\file.c.old} set fileout {C:\path\to\file.c} set fin [open $filein r] set contents [read $fin
  • Convex hull
    12 Apr 2017points, in order on the path. Each point is # a two-element list comprising abscissa and ordinate. # Additional list elements are ignored. # # Results: # Returns 1 if the path p0-p1-p2 proceeds ... that I've needed such a calculation is simply to write the point list to a file, execute the '''qconvex''' program from the '''qhull''' library [http://www.qhull.org/] on it, and
  • Copy image to and from the Windows clipboard
    08 Mar 2017set bitmap_file_offset [expr {$filehdr_size+$size+($color_table_size*4)}] set filehdr [binary format "a2 i x2 x2 i" \ "BM" [expr {$filehdr_size + [string length $clipData]}] \ $bitmap_file_offset] append ... Img1.3/tkimgwindow13.dll": this library or a dependent library could not be found in library path while executing. [PO] 2006/09/19 The Img package available from my homepage is dependent
  • Core VFS support
    02 Sep 2013be to provide a new 'encoding path' command). So, required additions to Tcl's core: * in memory channel (memchan/rchan) * zlib/mk4 * tclvfs * new 'encoding path' command ---- I don't see any ... mapped file (as Metakit does). There's a bootstrap problem when "/" is the center of everything, just as there is for a CPU trying to figure out how to boot a "file
  • Countdown program
    15 Apr 2015it, it's best to look first at the main program (at the ''bottom'' of the file, below the '''countdown''' procedure. It does two things: it initiates the countdown by calling '''countdown ... version of the program that handles several countdowns launched from the same script. (Hint: Pass the path name of the label widget as a parameter to the '''countdown''' procedure.) 1. How difficult
  • CRC32 Self-checking file
    12 Aug 2013file path. The file must be writable and not open for writing when this is run. ====== package require crc32 set c32 [crc::crc32 -filename $file] ;# its original 32 bit crc puts "$file
  • Create base64 encoded images - CreateImageLib.tcl simplified version
    03 May 2016lappend auto_path [file join [file dirname [info script]] ".."] package require base64 namespace eval ::CreateImageLib:: { variable defaults # by default, take this sub-directory and image library file: set thisDir [file dirname [info
  • Create starkit.ico for windows starpack
    08 Jan 2012and color depths. ====== #! /usr/bin/env wish package require Tk lappend auto_path "." "lib" package require ico # the original graphics file must be a GIF with dimen 48x48 # (PNG doesn't work
  • Creating a BWidget Widget
    10 Mar 2005proc BWframe::cget { path option } { return [Widget::cget $path $option] } To use this new BWidget widget, add the following line to the tclPkgSetup command in the BWidget pkgIndex.tcl file: {bwframe.tcl
  • Creating a simple Windows .bat launcher
    06 Nov 2008list [file attributes $filename -shortname]] $args } ---- [LV] 2008 Nov 03 So, this past Friday, a developer contacted me about just this issue . From an Windows XP "run ..." window, he types ====== C:\path
  • Creating an OpenOffice Spreadsheet in pure Tcl
    20 Sep 20180"> <manifest:file-entry manifest:media-type="application/vnd.oasis.opendocument.spreadsheet" manifest:version="1.2" manifest:full-path="/"/> <manifest:file-entry manifest:media-type="text/xml" manifest:full-path="content.xml
  • Creating Temporary Files
    13 Oct 2016set path /tmp/tcl_ for {set j 0} {$j < 10} {incr j} { append path [string index $chars [expr {int(rand() * 62)}]] } if {![file exists $path]} { file mkdir $path file attributes $path -permissions
  • creating zip file archives from tcl with zlib
    05 Apr 2014proc zip::mkzipfile {zipchan base path {comment ""}} { set fullpath [file join $base $path] set mtime [timet_to_dos [file mtime $fullpath]] set utfpath [encoding convertto utf-8 $path] set utfcomment [encoding convertto
  • Creation of multi-platform Starkitted binary packages
    24 Jul 2008set lib $package[info sharedlibextension] return [file join $dir [platform] $lib] } package ifneeded snack 2.1 "[list load [loadlib $dir snack 2.1]];[list source [file join $dir snack.tcl]]" package ifneeded ... main piece of code might then ensure that only that tree is included in the auto_path. One could even have things broken down so that the directory structure was something like
  • Critcl
    11 Jul 2018cd /path/where/four.tcl/lives/ $ tclkit /path/to/critcl -pkg four.tcl Source: four.tcl Library: four.so Package: /path/to/lib/four/ ====== Test it: ====== #! /bin/env tclsh lappend auto_path ... just drop me a mail ---- [jcs] 2003-04-29: Here's a trick to make a file work both as Tcl script and as C source: ====== #undef _ /* this is mixed-mode C
  • Critcl FAQ
    27 Dec 2011specify the path in the 'file join' statement) * make the file app-critcl/critcl.tcl executable and symlink it from a directory in your PATH, e.g. ln -s /path/to/tcl
  • Critcl image processing
    24 Aug 2010by [AK]. ---- ====== #!/bin/sh # The next line restarts with tclsh.\ exec tclsh "$0" ${1+"$@"} lappend auto_path C:/msys/home/andy/critcl.vfs/lib package require Tk package require critcl critcl::config ... y - 1][x] = swap; } } Tcl_SetObjResult(interp, imageObj); return TCL_OK; } } set photo1 [image create photo -file $tk_library/images/lamp.png] set photo2 [image create photo] set photo3 [image create photo
  • cron
    05 Sep 2017that presets the operational environment What kinds of variables might be needed? Well, for instance, special $PATH values, database pointer variables, printer names, etc. all may need to be set up. What ... records, login messages, services, NIS records, syslogd, syslog files, routes, processes, lastlog, disk space, and exported file systems, as well as network connectivity, required processes, disk usage, CPU usage, run queues, logins
  • cron and Tcl
    22 Sep 2015to get to the #! ...) ENAMETOOLONG: The length of the file or path argument exceeds PATH_MAX, or the length of a file or path component exceeds {NAME_MAX} while {_POSIX_NO_TRUNC
  • Cross-compiling Tcl packages
    29 May 2016a) === * Assuming the toolchain file is saved in /home/foo/crosscompile/toolchain.cmake, the extension can be compiled with: === $ cmake -DCMAKE_TOOLCHAIN_FILE=/home/foo/crosscompile/toolchain.cmake ${path_to_source_dir
  • CrowTDE
    01 Sep 2013opened script file lead to nothing - no error messages from the erroneous script, nothing. What prerequisites must be full filled, to run a single opened file (not a project member file)? * the ... tree {{colFileTree style txt}}" (procedure "::fmeProjectManager::tree_init" line 24) invoked from within "::fmeProjectManager::tree_init $path" (procedure "::fmeProjectManager::init" line 8) invoked from within "::fmeProjectManager::init $fmePrjMgr.body" (procedure "::fmeTabMgr::init
  • Cryptkit
    09 Jul 2017directory. package ifneeded cryptkit 1.0 \ "source [file join $dir cryptkit.kit];\ source [file join $dir cryptkit.kit lib cryptkit critcl.tcl];\ critcl::loadlib [file join $dir cryptkit.kit lib cryptkit] cryptkit ... does nothing but mount and add (all packages in) the starkit's lib area to auto_path -[jcw]'' [LV] There was/is a TIP that [aku] I think proposed that described tcl
  • CryptoAid
    14 Oct 2009plain ne $C(plain)} return set C(solved) 1 Highlight 1 catch { set fname [file join [pwd] [file dirname $::argv0] solved.txt] set fout [open $fname a] puts $fout "$C(sample,idx ... CORPSE OF MILK. JAMES JOYCE} {WITH BOYS YOU ALWAYS KNOW WHERE YOU STAND. RIGHT IN THE PATH OF A HURRICANE. ERMA BOMBECK} {I WANDERED LONELY AS A CLOUD .. THAT FLOATS ON HIGH
  • cshrc processing
    10 Jan 2003etc ) set path = ( $path /usr/ccs/bin /opt/SUNWspro/bin ) set path = ( $path . ) setenv LD_LIBRARY_PATH /solar/lib:/solar/X11R5/lib:/usr/lib:/usr/local/l setenv SC_LICENSE_FILE /opt
  • cursors
    24 Dec 20146} { eval grid $labels set labels "" set i 0 } } } } main ====== Path for Solaris: /usr/openwin/include/X11 [RS] [MAKR] 2009-02-06: path on newer [Linux] and [HP-UX]: `/usr/include/X11 ... Defining a new cursor on UNIX/X via scripting currently requires creating an XBM-format temporary file (or two if you want a mask as well), though in 8.4 these may
  • custom cursors
    18 Jun 2012xbm files. set dir /path/to/cursor/files switch -- $tcl_platform(platform) { unix { set file [file join $dir cursorfile.xbm] set cursor [list @$file black] } windows { set file [file join $dir cursorfile
  • CVS Best Practices
    16 May 2010RCSfile$''' - The name of the RCS file without a path. * '''$Revision$''' - The revision number assigned to the revision. * '''$Source$''' - The full pathname of the RCS file. * '''$State$''' - The state assigned to the
  • cwind on avi2vcd
    03 Apr 2014subdir # called pal. Fix path to avi2vcd below. proc do_conv {fn} { if ![file exists $fn] { puts "Error Can't find file $fn" } set target [file join pal [file root $fn].mpg
  • Cygwin
    04 May 2017or newer) and a large number of packages under Cygwin. ** File Names Differing in Case Only ** By default, Windows does not treat file names in a case-sensitive manner. This can cause ... prefer [ActiveTcl]. My $PATH has 21 paths, but when I use it from Cygwin/rxvt, I get 25 paths. Inspection revealed that Cygwin prepends 4 paths to one's $PATH, and if
  • Dandelion
    16 Sep 2017ext [file extension [dict get $headers SCRIPT_NAME]] if {[dict exists $mime $ext]} { set mime_type [dict get $mime $ext] } else { return 0 } #normalised request path set path [file normalize [file join
  • dartscript
    06 Jul 2016topdir : [file dirname [file dirname [file normalize [info script]]]] } ] set App(Path,BinDir) [file join $App(Path,TopDir) bin] set App(Path,LibDir) [file join $App(Path,TopDir) lib] # auto_path if
  • Data Driven Tk GUI Construction
    10 Mar 2012the field name and record type into the widget name path. 1. I can construct a table that maps the widget name path to a value that contains the field name and ... editing values I can see where a front-end/back-end system of reading and interpreting file contents or user gestures then calling constructors to build the interface might make some sense
  • data is code
    29 Jun 2012their structure and their geometrical data: 1. Read the file data 2. Convert the file data to a valid list 3. Reorganize the file data list to have all VRML node attributes ... there is no way to stop Tcl from looking outside the namespace for command definitions: [namespace path] can be used to make Tcl look in additional namespaces, and [namespace unknown] can be
  • Data selection in plotchart
    25 Jul 2017bars in order to export the data. This is my first start. ======tcl lappend auto_path [file join [pwd] plotchart] package require Plotchart set TMP [list 24.3 25.1 24.6
  • Database access for options of all widgets in an application with Bwise
    24 Jan 2011prototyped UI back in the next session by sourcing the result with all options from a file. At some point, it become unclear to me how the options actually held together, because ... so you may want to -borderwidth 1 or even zero in the '''onefield''' procedure where 'entry $path.e ..' is defined. Also, because of this the label grays are no longer uniformly adjacent
  • Database routines for in core
    12 Jul 2011file name under the 'New Entry' button in the editable field. Either a file name without a path (which will end up in the global current tcl directory), or a full path
  • davkit
    07 Jun 2014mysite.org/some/path/] puts [$dav get foo/bar] $dav close 3) As a mounted VFS file system: package require vfs::dav vfs::dav::Mount http://mysite.org/some/path/ mydav set
  • dbus-intf
    19 Jan 2018Another example: The code below will add a dbus interface to [tkchat]. Save it in a file called ~/.tkchat_plugins/tkchat_dbus.tcl and the next time you start tkchat you can ... via the dbus. ====== package require dbif dbif connect tk.tcl.tkchat namespace eval tkchat::dbus { namespace path ::tkchat variable signal # General methods and signals dbif method / quit { saveRC dbif return $msgid exit
  • dbus-tcl
    19 Jan 2018the dbus session bus and implements the org.freedesktop.Notifications interface on an object with the path "/org/freedesktop/Notifications". The method to use to popup a notification is called "org.freedesktop ... when another application calls a method on the dbus name belonging to our application. Create a file with a .service extension under /usr/share/dbus-1/services, with the following contents (assuming
  • dde
    15 Sep 2013just a case of setting up the file extension settings in Windows. In any folder, go to Tools -> Folder Options -> File Types, select the file type/extension you want, and change it ... changed the "Application used to perform the action" to be something like "c:\path\to\wish.exe" -- "c:\path\to\tclscript.tcl" though I've not tried it. ''Updated a bit later
  • Debug tcl core with MS VC10 Express
    06 Mar 2014VC10 Express IDE * Menü File->New->Projekt (Datei->Neu->Project) * Choose "Win32-Konsolenanwendung" ("Win32-Console application") * Enter a Name behind "Name": tclsh86 (as you like) * Enter a path in "Ort" ("Location"). I
  • deployment
    26 May 2018that this stuff of putting an application on a desktop is non-trivial. ** Deployment Goals ** * One file to distribute instead of dozens of runtime scripts, shared libraries, etc. * Decrease probability that the ... executable is actually a short shell script which sets some environment variables (e.g., LD_LIBRARY_PATH) and then execs the binary shell." *** Building Scripts into Tcl *** Simply compiling the scripts into
  • Determine whether an ftp URL is valid
    31 Jan 2011unable to open %s\n" $current(host)] continue } set ftp_dir [file dirname $current(path)] set ftp_file [file tail $current(path)] if { [ catch { set result [ftp::Cd $fdc $ftp_dir] } returncode
  • Determining the Applications Root Directory
    02 Jun 2014PATH. Anyway, this is my more compact version: ====== set resolved_path [info script] while {![catch [list file readlink $resolved_path] target]} { set resolved_path $target} source [file join [file dirname $resolved_path
  • DGA usage examples
    16 Jul 2002the .dot file is saved as test1.dot and the following script is run: tclsh test1.tcl test1.dot a0 b3 Then the colored.dot file will display the shortest path between
  • dgsqlite
    22 Nov 2017having the dqlite3.dll in its VFS (a '/' missing from the path?): could not find interpreter "sqlite3" while executing "load (path snipped)/dgSQLite3.exe/lib/tclsqlite3/Windows/libtclsqlite3.dll sqlite3" ("package ifneeded ... create SQL Lite databases, I am sure. [Detlef Groth] Creating a new empty Database is easy: File -> New Database. You can then either fill the database via standard sql or via importing
  • dgw::combobox
    11 Oct 2018the file with the source code somewhere in a directory like /home/username/tcl/dgw/combobox-0.1.tm In your code you would now have to write: ====== tcl::tm::path add
  • Diagram
    04 Jan 2016Diagram demo file" {.ddf}}} set save_file [tk_getSaveFile -initialdir "." \ -filetypes $filetypes -title "Save diagram"] if {$save_file == ""} then { return } ;# Output the diagram as xml set fout [open $save_file w] puts ... example (double click on the connector lines ;)): ====== # This code is in the public domain lappend auto_path . package require BWidget package require diagram ### Global Variables set object_counter 0 set connector_counter
  • dict
    22 Jul 2018set d [file tail $dir]/ [dictdir $subdir] } foreach fname [lsort [glob -directory $dir -nocomplain -types f *]] { file stat $fname fstat # unsorted but faster: # dict set d [file tail $dir]/ [file tail $fname ... dict var]`''': Link a variable to a path in a dictionary. '''`[ycl%|%ycl dict varu]`''': Like `[ycl%|%ycl dict var]`, but also delete the path in the dictionary when the variable is
  • dict discussion
    13 Jun 2015proc myproc {widget-path args} { set bg [dict get -default white $args -bg] set dir [dict get -default . $args -homedirectory] # etc .. } But thanks, anyway! I guess I'll just file two separate
  • dictutils
    02 Jul 2018control construct for looping over the lines in a file: ====== proc foreachLine {varName file body} { upvar 1 $varName line set chan [open $file] while {[gets $chan line] >= 0} { uplevel 1 $body } close ... the given # dictionary at the path of keys specified in $keyList. If $keyList # specifies a non-existent path of keys, nlappend will behave as if # the path mapped to an empty list
  • Dijkstra algorithm as a route SPF TCL implement
    27 May 2017as Routing SPF(Shortest Path First) algorithm in CT. #Reference Details: <Routing TCP/IP Volume I 2nd.Edition> Chapter 4, Dynamic Routing Protocols: Link State Routing Protocols #This file was originally written
  • Directory entry megawidget
    19 May 2018adjusting my file/directory choosers to use the routines made available here to display the localized names. Ideally, I would like a `file normalize -keepsymlinks` function so that the entered path stays
  • Directory recursion
    16 May 2018iter {path cmd} { set origpath $path set orignormalized [::fileutil::fullnormalize $path] set cursor [list $path] while 1 { if {$cursor eq {}} { break } set path [join $cursor /] set descend 1 if {[file type $path
  • directory size
    10 Nov 2011on any OS, without having to edit the script every time to enter the path they want to check. ---- See also: * [file size] * [Tktreemap] * [Directory, General Questions] * [Directory recursion] <<categories>> Application | File
  • dislocate
    05 May 2010to have your PATH to expect) #!expect puts {Content-type: text/html } log_user 0 # Add expect to PATH, for use by dislocate set env(PATH) "$env(PATH):YOUR_PATH_TO_EXPECT ... run a program that doesn't exist, you might get some flaky behavior. See your .dislocate file and remove the flaky program because something weird happens. But hey. All in all, dislocate
  • Display System Info
    24 Aug 2018arg } puts "Libaries:" foreach lib $::tcl_library { puts $indent$lib } puts "Package Path:" foreach path $::tcl_pkgPath { puts $indent$path } parray ::tcl_platform } ====== ---- As always: comments, tips and questions are appreciated. [APN ... dcblUtilities::displaySystemInfo {} { set indent " " puts "TCL Version: $::tcl_version" puts "Patch Level: $::tcl_patchLevel" puts "Startup File: $::tcl_rcFileName" puts "FP Precision: $::tcl_precision" puts "argv0: $::argv0" puts "argc: $::argc" puts "argv
  • Displaying Tree Hierarchy with Incremental Node Numbering
    18 May 2018res [list "" ""] } return $res } #--------------- # Covert tree path to node #--------------- # Arguments: # path path # separator default = . # Returns: # node # proc pkg::path2node { path {separator .}} { foreach n [split [lindex $path 0]] { if { [incr n] < 10 } {set ... pkg::create HTC_.tcl] -setSize 0.5 -title "Hierachy Numbering" } main ====== Here’s a representative node list, file HTC_.tcl. ====== set htc { 01 {England} 01.01 {London} 01.01.01 {Westminster} 01.01
  • Distribution Mechanisms
    13 Apr 2014shared library (DLL or SO file) * [auto_load] - load a command using the tclIndex files in the auto-load path * [source] - command to load a Tcl source file [Neil Madden] pointed out
  • Division into Parts by Multiple Ratios and eTCL demo example calculator, numerical analysis
    10 Mar 2017or large to be solved? pseudocode: limit to size of eTCL list, ref versions. } #end of file ====== ***Testcases Section*** In planning any software, it is advisable to gather a number of testcases ... 1.0.1 # gold on TCL WIKI, 2mar2017 package require Tk package require math::numtheory namespace path {::tcl::mathop ::tcl::mathfunc math::numtheory } set tcl_precision 17 frame .frame -relief flat -bg
  • dllfix
    22 Apr 2013dll path to the search path add_dir_to_dll_search_path $dllpath } # # remove any DLLs we've copied into env(temp) # proc ::dllfix::cleanup {} { variable dlls variable dllpath # remove .. file delete
  • dns_auditer
    29 Jul 2012proc server_load { path file } { if {[catch {open $path/$file r} result]} { error "could not open file for reading : $result" } return [split [read $result ] \n] } proc items_load {path file} { set result
  • Documenting Tcl's warning/error messages
    09 Mar 2011should be "{command} {arg1} file" wrong # args: should be "{command} active file" wrong # args: should be "{command} display file" error accessing {file} wrong # args: should be "{command} onexit file" wrong # args: should ... path}": that path already exists could not create new link "{path}" using target "{path2}" doesn't exist could not create new link "{path}" pointing to "{path2}": {posixerror} could not read link "{path
  • Dodekalogue
    03 Jul 2018training.) '''end of file''' - An end of file is a command terminator. Perhaps this was not thought to be worth mentioning, but I was experimenting to see if a file that ends ... the variable name in the word. '''`$`'''''name'''''`(`'''''path'''''`)`''': When ''name'' is immediately followed by `(`, it names a variable. Subsequent characters up to the matching `)` constitute ''path'', which is subject to command substitution
  • DOS Backup/Restore
    18 Jan 2012file_cidx \ $file_coffs $file_clen $file_attrib \ $file_dtime \ ] if {$do} { seek $stfd $file_coffs start set file_cont [ read $stfd $file_clen ] puts stderr "trying: open [ file join $dir_path
  • DOS BAT magic
    18 Oct 2013whole file name to handle spaces -- NT4+ cmd.exe only! NOT DOS. May also handle the path problem below. -- [AET]. --- [Randolf Schultz] What happens if the script is located in a path
  • Download Accelerator
    06 Mar 2017split $url] set fname [lindex [split $www(path) /] end] set fname [format {.%s-%d} $fname $seq] # resume if { [file exists $fname] == 1 } { set size [file size $fname] if { $size >= [expr $p1-$p0
  • dqkit
    15 Sep 2013VFS] kit file? Thanks in advance. S Nichols. [Wojciech Kocjan] I think it doesn't set auto_path correctly. The easiest thing to do is simply set the right auto_path upon
  • Drawer Example
    13 Dec 2017pw %W" } ====== * sashmanager_test.tcl Original demo code, slightly modified: ====== set dir [file dirname [info script]] lappend auto_path [file join $dir "."] package require sashmanager # demo code: wm withdraw . update frame .x
  • Drawing Into Foreign Windows
    29 Jul 2012tgz ====== #include <stdio.h> #include <stdlib.h> #include <tcl.h> #include <tk.h> /*Include this canvas file so that we can convert *the canvas struct pointer to a TkCanvas pointer */ #include "tkCanvas ... Tk_NameToWindow (interp, Tcl_GetString (objv[1]), wmain); if (canvas == NULL) { Tcl_SetResult (interp, "invalid window path", TCL_STATIC); return TCL_ERROR; } Tk_MakeWindowExist (canvas); if (Tk_IsMapped (canvas) == 0) { Tk_MapWindow
  • Drive Disconnect/Connect Tool
    14 Mar 2018close $fileid puts "File saved: $file" } else { puts "File Not Saved." } } # Mount Drives proc MountDrives {paths} { puts "--proc MountDrives-----------------" foreach line $paths { set drive [lindex $line 0] set path [lindex $line 1
  • Drive OpenOffice Calc with tcluno
    08 Aug 2011Carsten Zerbst] ====== #!/bin/sh # # Beispiel für TclUno # \ exec tclsh "$0" "$@" lappend auto_path [ file join [ pwd ] tclurtp ] lappend auto_path [ file join [ pwd ] tcluno ] # damit wird die Skriptlösung angefordert # setting the argv
  • Dropbox
    20 Sep 2018Assuming that $file is the URL-encoded path to the file in your Dropbox and $content is the data you would like to upload, this then looks like: set file "/test.txt
  • Droplets
    04 Jul 2011examples, ---- 2clip.bat This simply lets one drag/drop a file onto the batch file and the full path to the file is placed into the clipboard. It will put up a
  • Droptree -Enhanced BWidget Tree Operations
    10 Dec 2011path.tnodes 0 set data [read $fp] foreach i $data { catch { eval $path insert $i } incr ::$path.tnodes } #set ::$path.tnodes $i } } } #--------------- # #--------------- proc SaveTree {path args} { set channel "" set filetype "" set file
  • dtp
    26 Jan 2016First the path to the input file, followed by the path to the output file. The name of an output file is derived from the name of the input file by the
  • Dump a file in hex and ASCII
    12 Nov 2010binary file whose name is specified on the command line. ---- package require Tcl 8.3 #---------------------------------------------------------------------- # # dumpFile -- # # Produce a hex/ASCII dump of a file. # # Parameters: # fileName -- Path name of the file # channel
  • dxf
    04 Nov 2010me mail at [email protected] # # DXF format is copyrighted by Autodesk, Inc. # ========================================================================= set auto_path ". $auto_path" set gvar(unit) p set gvar(scale) 1.0 proc _gettuple {fd} { # read in ... if {$t1!=""} {.c.c configure -scrollregion "$t1"} } proc _dumpobj {c tag} { global argv set fname [file root [file tail $argv]] set fd [open $fname.tkobj w+] foreach j [$c find withtag $tag
  • dynnotebook
    04 Nov 2017gui test - # ------------------------------------------------------------------------- if 1 { # specify, where to find BWidget library (if required): lappend auto_path [file join [file dirname [info script]] ".."] package require BWidget package require dynnotebook font configure TkDefaultFont -size 12
  • e: a tiny editor plugin for eTcl
    12 Nov 2008m not sure how the file selector would handle directories ../foo/bar and ../grill/bar on the same device. In [iFile 1.1] there's a hierarchic path browser, and I'm
  • Easy Ctext Commenting
    08 Jan 2013end] if {$::oLs != $::lineSelected} { set ::oLs $::lineSelected if {[[file rootname %W] get $::oLs.0 $::oLs.1] != "#"} { [file rootname %W] insert $::oLs.0 # } else { [file rootname %W] delete $::oLs.0 $::oLs.1 } } } } } } # ------------------------------------------------------------------------------ # Test ... idea : Sedat Serper [SeS] # Related wiki pages: http://wiki.tcl.tk/24080 # Implementation: easyCtextCommenting <ctext widget path> # Usage : click with button-3, drag along the line numbers to toggle hash character # Note
  • easywin - simplified toplevels
    01 Dec 2015Whether to display the statusbar (and progressbar). -document: Use this to set the full path name of the file currently being viewed in the window (if it is being used in that
  • Eclipse
    02 Sep 2012tkcon) failed parsing $file" } else { puts "tkcon ($tkcon) parsed $file" } } } else { puts "no command line argument passed" } ====== Configure a new external tool in Eclipse as following: name: '''> tkcon''' location: ''/path/to/send
  • Eclipse Europa TCL Editor (DLTK project)
    06 Feb 2013been more specific.. but that video shows how folders nest *only if they contain a .tcl file*. If like me, you happen to use a few tcl extensions, (eg .tk,.tm,.cgi ... download the Tcl Remote Debugging package for the appropriate OS, then store this and specify the path of the External Debugging Engine. My first experience is that this works! I'm still
  • eDictor
    22 Dec 2012return } # ############################################################################# # FILE I/O # ############################################################################# # File_Load_Raw # Loads a file as a raw string. # ARGUMENTS: "path" is the file to be read # RESULTS: Returns the data read from the file. proc File
  • Edit and run a Fortran program
    26 May 2014program works quite satisfactorily, at least to me. ''One caveat:'' I extend the PATH environment variable with the path to my gfortran installation. That may not be the same as on your ... 2014) Typically, when programming in Fortran (or C or C++ or ...) you first edit the source file, store it, run it through the compiler and linker and then you are ready (modulo
  • eDonkey
    05 Aug 2006switch $stag { 1 {format Name} 2 {format {Size of file}} 3 {format Type} 4 {format Format} 5 {format Collection} 6 {format {Part Path}} 7 {format {Part Hash}} 8 {format Copied} 9 {format
  • Einfach Tcl
    26 Jan 2016readfile $filename] \n] } ---- '''Beispiel: Textausgabe in Datei, mit Sicherheitskopie''' proc text2file {text filename} { if [file exists $filename] { file rename -force $filename $filename.bak } set fp [open $filename w] puts $fp $text close ... Interpreter nicht in die Script-Datei einbauen. Er wird immer gefunden, sofern er im Pfad (Variable PATH) enthalten ist. ---- Tcl hat eine kleine, aber qualifizierte weltweite '''Anwendergemeinschaft''', die vor allem auf folgenden
  • eltclsh
    04 Jun 2017like the following to your [tclshrc]: ====== if {$tcl_interactive} { if {![file exists /usr/local/share/eltcl/pkgIndex.tcl] || [catch { lappend ::auto_path /usr/local/share/eltcl package require eltclsh set ::el::prompt1
  • emacs package to insert templated code interactively
    20 Nov 2007and put that either in your .emacs.d directory or any directory in your load path. The file is well commented and will inform you on how to create templates. What I
  • Embedded TCL Web Server
    07 May 2014that says : unable to set certificate file server-public.pem: No such file or directory unable to set certificate file server-public.pem: No such file or directory while executing "tls::import ... uri # request - parsed uri in array format, with the following relevant elements # request(path) # request(query) - query string after path? set actionList { "" { respond $sock 200 {Want to know the <a href="/time
  • emscripten
    03 Jul 2017to compile a simple hello world or equivalent, and have the emscripten commands available on your PATH. See https://github.com/kripken/emscripten/wiki/Emscripten-SDK%|%Emscripten-SDK%|%. I cloned the jimtcl ... bc -o jimsh.html ====== Now load up the jimsh.html page in your browser (e.g., file:///home/user/jimtcl/jimsh.html). This page has a rudimentary dialog box for standard input
  • Enabling mousebutton sensitivity to a ctext widget's highlighted texts
    04 Aug 2012described here, # provided that the new terms are clearly indicated on the first page of # each file where they apply. # # IN NO EVENT SHALL THE AUTHOR OR DISTRIBUTORS BE LIABLE TO ANY ... click on ctext highlights and process the # string underneath the pointer # Usage : ctext::binding4Tag <ctext widget path> <list of tags> # ------------------------------------------------------------------------------ proc ctext_binding4Tag {w tags} { foreach tag $tags { $w tag bind $tag
  • Enabling Tcl in Microsoft IIS
    01 Sep 2009to run. Wonderfully undocumented. Click "Script Engine". Set the verbs if you want. Click "check that file exists" if you want. http://localhost/Scripts/xyz.tsh will now invoke xyz.tsh in ... wikit under IIS I found out that at least my version of IIS did not support PATH_INFO variable which is essential for wikit application (and propably to many other script application
  • Enhanced photo image copy command
    10 Nov 2015release and the merged version of the file as well. For Windows users also included is ''xphoto.dll'' that after executing the '''load {'''< ... directory path ... >'''\xphoto.dll}''' command provides the same functionality
  • ensemble extend
    20 Oct 2016body }] } ====== Example use: ====== extend file newer {a b} { return [expr {[file mtime $a] > [file mtime $b]}] } extend file newerthan {mtime path} { return [expr {[file exists $path] && ([file mtime $path] > $mtime)}] } ====== ** [DKF]'s
  • env
    06 Dec 2016will typically find keys like * `PATH`: series of file system directory ''prefixes'', typically separated by :, which the operating system will apply when asked to execute a file with an incomplete pathname. * `HOME
  • EpubCreator
    31 Aug 2018dirname path} { if {[file pathtype $path] eq "relative" && [llength [file split $path]] > 1} { WARN "skipping $type: directory not allowed in path: $path" return "" } set full [file join $dirname $path] if {[file exists
  • EpubDump
    14 Mar 2014container [ReadAllData [file join $::epubMount META-INF container.xml]] ; list dom parse $container doc set root [$doc documentElement] set opf_file [[$root selectNodes -namespace $::meta_namespaces //mm:rootfile] \ getAttribute full-path] unset
  • Errors management
    28 Sep 2018written to a file - for instance, there are times when a [GUI] application might not have easy access to [stderr] for error traces. Writing information to a log file, which is available ... machine-readable: an even-sized list of code words and sub-lists that describe the calling path to the point where the exception was raised|& (I've heard rumours (e.g. on
  • eTcl
    07 Jan 2018do menu/file/source and immediately cursor down to the tcl script, it will create the path as "\/\My Documents" and reply "no such file". However, if you do menu/file/source
  • eTcl bugs and comments
    07 Jan 2018find the path of '''p.etk''' in a script in '''p.etk'''? In a starkit, the kit is mounted under its name and thus the path may be found by '''[file dirname
  • EU-Commander
    19 Feb 2016A [Tcl/Tk]-based [file manager] http://sourceforge.net/projects/eu-commander/ License: GPL v2 or (at your option) any later version. ** Screenshot ** [https://sourceforge.net/p/eu-commander/screenshot/51477.jpg ... crashes with a dump... * On Windows, it would be fine if one could navigate to a path in UNC notation, that is something like '''\\server\share'''; not everything is mapped to a
  • eval
    08 Sep 2016warning: this is not recommended set filepath [list path to the file] eval file join $filepath ====== use: ====== set filepath [list path to the file] file join {*}$filepath ====== ---- Another similar example ====== #the old
  • Event generation has limits
    28 May 2012you can't just say "type into the dialog". You need to figure out the widget path name of the widget that should have the focus (and you may need to set ... very good way to do things... An example of this might be something like "event generate . <<ShowStatus>> -data "loading file..."" (a contrived example, but somewhat illustrates the point). <<categories>> Internals | Event Loop
  • Event tutorial
    30 Apr 2013created a lot of flexibility. The user is now pretty much free to take his own path through the application instead of having to follow the predefined steps as in the earlier ... first and then press a button or vice versa). '''How does Tcl use event based programming''' * file events * eventloop * callbacks * [after] * event sources '''Events in Tk''' '''Common pitfalls when using events in
  • eWidgets Toolkit
    06 May 2010collapsible drop-frame widget * '''entry::file''' - file/path-completion for an entry widget * '''entry::history''' - history for an entry widget * '''filelist''' - listbox file browser widget * '''filetree''' - tree file browser widget (using tree
  • example
    05 Jul 20140 } { puts stderr "Unable to find package Tk ... adjust your auto_path!"; } # make sure to save the callib code in a file and source it . source ./callib.tcl proc setMonthYear { cal } { global
  • Excel VBA to OpenOffice Basic converter
    16 Mar 2015Export modules` sources from Excel (OpenOffice had a bug with exporting modules > 64K). 2. Process exported file with convmodule.tcl: > tclkit.exe convmodule.tcl module1.bas module1_out.bas 3. Process module1 ... Public|Private) (?!Sub|Function)(.+,.+ As .+)$} {[CDim \1 {\2}]} AddSubst {ActiveWorkbook.Name} {FileNameOutOfPath(ThisComponent.getURL)} AddSubst {ActiveWorkbook.Path} {ConvertFromURL(DirectoryNameoutofPath(ThisComponent.getURL, "/"))} AddSubst {\.Visible} {.isVisible} #Databases: AddSubst {conn\.Open (.+)$} "DataSource = createUnoService(\"com.sun
  • exec
    10 Oct 2018set paths [list ~/path/number/1 ~/path/number/2 ../path/number/3] set success 0 foreach x $paths { if {[file exists [file join $x $fileToExec]]} { set success 1 exec [file join $x
  • exec ampersand problem
    16 Oct 2013and there is no trivial way to escape this. ''[Lars H]: For file names, you might try including the path (e.g. `./<filename` if you really want it to be relative). That
  • exec magic
    01 Mar 2015program as: ====== /path/to/weird/tclsh yourscript.tcl ====== The [starpack] technology is a way to take a tcl script, merge it with a tcl interpreter, and create a stand-alone file that
  • exec quotes problem
    04 Feb 2016does not require quoting of whitespace in the filename portion of the `/select,c:\path to some/file` flag. Because `cmd /c` results in a non-interactive `CMD.exe`, it's a
  • Executing programs which are shipped within starpacks
    02 Apr 2014to find file name in cache list: foreach f $_dirCache { if { [file tail $f] == $fileName } { set _fileFind $f return $_fileFind } } foreach item [glob -nocomplain -- [file join $searchDir "*"]] { # puts $item if { [file isdirectory ... own wish binary executable # default = "", in this case, wish needs to be part of your # current PATH environment variable! # # exec_command a list, to specify system command + arguments # which is going to
  • execx
    31 Aug 2014gefunden!" } } set dest [file join $::env(temp) [file tail $match]] # Datei ODER Ordner kopieren... if {![file exists $dest]} { # ...wenn noch nicht im Ziel vorhanden if {[catch {eval [list file copy -force -- $match ... clear if the machine the script is later running on has such tools installed in the path or if the tool-versions are correct. So it's safer to deliver the tools
  • Expect
    30 Aug 2018http://expect.sourceforge.net/doc/sysadm.ps%|%Using expect to Automate System Administration Tasks]: the postscript file seems to be collated in reverse order. Anyone who sees this note and has the ... The above question is old and the user likely found the answer however for reference, the PATH environment variable needs to have the location of the autoexpect program appended to it. ---- '''[Matt
  • Expect and Tclkit
    22 Jul 2009sourced, the variable $dir must contain the # full path name of this file's directory. package ifneeded Expect 5.38.0 [list load [file join $dir [format "%s%s" $::tcl_platform(os
  • Experiences with a custom tclsh
    01 Jun 2014the generated C source file. I renamed the file to "glue.c", this being the (unimaginative) name of the package I wanted. The second step was editing the file "tclAppInit.c", so ... and auto-loadable files. ---- For the '''LD_LIBRARY_PATH''' point, there is an easier way: Use the linker's ''rpath'' directive. rpath means runtime path, and you can specify a colon separated
  • Extending Tcl in C from Tcl
    05 Mar 2015name) eq {}} {set a(-name) cxtclsh} set i tcl; set main Tcl_Main } set nname [file nativename [file join $a(-dir) $a(-name)]] set fp [open $nname.c w] puts $fp "/* $a ... bash'' (makes a slim 3.5K executable with the -s option), not from inside Tcl. Lib-path specification problems. Worked alright on Sun after I added platform-specific defaults: ====== if {$::tcl_platform
  • Extending the DLL Search Path on Windows
    30 Nov 2005can extend the DLL search path. This uses the great [ffidl] extension. ffidl::callout dll_SetDllDirectory {pointer-utf8} int [ffidl::symbol kernel32.dll SetDllDirectoryA] set imgdir [file join $dir lib Img124] dll
  • Extending the eTcl console
    05 Jan 2013console. On my etcl rc30 for Windows CE, the above scripts does not work because the path of the widgets have changed since 2006. The following startup script works for me. The ... bg #C0C0EE -relief groove\ -highlightthickness 0 \ -command runapp pack $tb.home -side left .frames.app1.menubar.file add command \ -label "bla" \ -command runapp proc runapp {} { cd ~ puts [pwd] } } proc ls {{dir .}} { foreach
  • Extension Stubs Tables
    21 Dec 2015the `extension1.h` file. Next, add `-DUSE_EXTENSION1_STUBS` (or whatever macro extension1 prescribes) to the compiler flags for extension2. In the makefile, add something like ======none -L/path/to/your/extension1
  • ezsdx - a small frontend for sdx
    17 Oct 2015Daily Build site>%|%]. It is interesting that the date on the file was "21-Dec-2012 09:45" and the file size is 1.4M. This release, 8.6.0, is also ... hard time getting it to work because it apparently doesn't like spaces in the directory path. As soon as I put it in a location that didn't have spaces in
  • Ffidl
    21 Jun 2018lib Ffidl] #HORRIBLE HACK goes here <<<: set CopyTo [file dirname $::starkit::topdir] file copy -force $ffidl_lib $CopyTo set ffidl_lib [file join $CopyTo [file tail $ffidl_lib]] unset CopyTo #>>> ====== ---- '''[Boltar] - 2015 ... that a little BUG has been fixed ("Ffidlrt.tcl does not work if installed in a path name with whitespaces"). Ffidl either uses unmodified [http://www.haible.de/bruno/gnu/ffcall-1
  • file
    02 May 2018target} { # Try and make a relative path to a target file/dir from base directory set bparts [file split [file normalize $basedir]] set tparts [file split [file normalize $target]] if {[lindex $bparts
  • file and directory change notifications
    08 Aug 2015glob -nocomplain -path $dir/ *]" foreach file [glob -nocomplain -path $dir/ *] { if {[file isdir $file]} { dputs "Recurse into $file" set new [concat $new [addDir $id $file]] } else { lappend new [add $id $file] } } return
  • file attributes
    12 May 2015clears the archive attribute of the file. '''-hidden''' gives the value or sets or clears the hidden attribute of the file. '''-longname''' will expand each path element to its long version. This
  • file dirname
    03 Jul 2011file dirname''' ''name'' Returns a name comprised of all of the path components in ''name'' excluding the last element. If ''name'' is a relative file name and only contains one path element
  • file forward compatibility
    18 Jan 2013proc file_normalize {sp} { set sp [file split $sp] # Conversion of the incoming path to absolute. if {[string equal [file pathtype [lindex $sp 0]] "relative"]} { set sp [file split [eval [list file
  • File HTTPS Upload
    18 Oct 2014script on $host set cert /client_path_to/self-signed-certificate.pem set bound "--HARD_TO_STUMBLE_ON_0123456789" ;# multipart separator set file "junk.dat" ;# client file to be uploaded set new
  • file join
    27 Jul 2018file join //host/location file //host/location/file ====== A disconnected host specification is not a UNC path, and file join will treat it as a file location: ====== % file join //host location file
  • file link
    15 May 2015but creating symlinks that `file link` can't be sure exist. For example: ====== file link -symbolic /path/to/linkname ../../../target ====== If `[pwd]` is not `/path/to/linkname`, `file link` will refuse to
  • file nativename
    03 Jul 2011path [file join .. .. windows] ../../windows (Griffiths) 4 % file normalize $path C:/WINDOWS (Griffiths) 5 % file nativename $path ..\..\windows (Griffiths) 6 % file nativename [file normalize $path] C:\WINDOWS (Griffiths) 7 % file normalize [file
  • file normalize
    12 Feb 2016the Wibble-specific [[dehex]] command: ====== regsub -all {(?:/|^)\.(?=/|$)} $path / path while {[regsub {(?:/[^/]*/+|^[^/]*/+|^)\.\.(?=/|$)} $path "" path]} {} regsub -all {//+} /$path / path ====== ---- [MHo] 2016-02-12: Just realized that '''file normalize''' does not work as expected in
  • file pathtype
    03 Jul 2011file pathtype''' ''name'' Returns one of '''absolute''', '''relative''', '''volumerelative'''. If ''name'' refers to a specific file on a specific volume, the path type will be '''absolute'''. If ''name'' refers to a file
  • File selection dialog for Tile
    21 Jan 2016if {$data(type) eq "save"} { if {$data(-mustnotexist)} { if {[lindex $path 0] ne [file join $data(-initialdir) $data(-initialfile)]} { set str {File "%s" already exists. Choose another name} set reply [MessageDlg .fsdialog
  • file separator
    17 Apr 2013Summary ** '''`[[file separator]`''' is used to determine the character used to separate file path elements for the current platform ** Synopsis ** : '''file separator''' ''?name?'' ** Description ** If no argument is given, returns the character
  • file size
    03 Jul 2011compare "1.0 MiB" "1.0 KiB" -unit binary] } {1} ::tcltest::cleanupTests ====== ---- <<discussion>> **See also** * [file] * [file exists] * [file stat] * [directory size] * [Narrow formatting] * [hrbytesize] <<categories>> Tcl syntax help | Command | Introspection | File ... integerpackage "bigfloat" ====== And here are the tests. ====== package require tcltest namespace import tcltest::test lappend ::auto_path . package require hrfilesize 1.0 # # Caution ! # Use constant string values instead of using Tcl expr
  • file split
    10 Apr 2017to discard double "//" within the specification: ====== file join {*}[file split $Path] ====== Example: ====== % file split //a//b/c//d.txt //a/b c d.txt % file join {*}[file split //a//b/c//d
  • file system
    03 Jul 2011a [Tcl_Obj] representation of a path, and return a Tcl_Obj containing a string with the system type. (see TclpFilesystemPathType in tcl(Unix|Mac)File.c) ---- What's the meaning of
  • file tempfile
    15 May 2018temporary file (otherwise tries to delete the file at the first opportunity). If ''template'' is given, use it to guide the filename generated. Template is in form of a file path and
  • filesystem
    06 May 2018Staplin]: ** Path ** [Making a Path Absolute]: [Relative File Paths]: [Tcl File Renamer]: [Rename and redate photo-files]: ** Replicate ** [Directory Tree Synchronization], by [George Peter Staplin]: `[ycl%|%ycl dir copynode]`: Copy a file
  • filesystem benchmarking
    03 Jul 2011008 FILE exec interp: pkg require 38329 67561 29940 009 FILE exec interp: pkg require+ 49142 93147 46400 010 FILE exec interp: pkg require+auto_path 53856 78622 43400 011 FILE exists
  • FileSystem-Watcher
    06 Mar 200828.2.2008 MHo lappend auto_path ./; package require watch 1.0 if {[llength $argv]==0} { puts "watchtest <fileOrDirectory>\n" puts " In parallel, alter the specified file or dir to see what
  • fileutil
    11 Dec 2013fullnormalize path * ::fileutil::test path codes ? msgvar ? ? label ? * ::fileutil::cat ( ? options ? file)... * ::fileutil::writeFile ? options ? file data * ::fileutil::appendToFile ? options ? file data * ::fileutil::insertIntoFile ? options ? file at data * ::fileutil::removeFromFile ? options ? file
  • Finding out tclConfig.sh
    23 Aug 2014auto_path [ list [file dirname $tcl_library] [ file dirname [lindex $tcl_pkgPath 0]] [ file dirname [file dirname $tcl_library]] [ file dirname [file dirname [lindex $tcl_pkgPath 0]]] [ file dirname [file dirname [file
  • FindProcs utility
    03 Jan 2012the /Configure/Preferences menu add a new tool with: - Commands = <the path of wish> - Parameters = <the path of this file> $File - Initial folder = $FileDir - Rename this tool: FindProcs - Modify FindProcs.cfg keys
  • FindWords utility
    28 Sep 2018the /Configure/Preferences menu add a new tool with: - Commands = <the path of wish> - Parameters = <the path of this file> $File "$Sel" - Initial folder = $FileDir (see example below) - Rename this tool: FindWords
  • FireTcl
    08 Feb 2016tcl scripts passing parameters - browser detection - powerful configuration file - debugging tools: tcl editor, firebug lite and js console of firefox - independence of the path of the projects. The only requirement is to
  • firewall
    21 Jun 2017interpreter. The path is fully normalized before testing # against the islands, which themselves are fully normalized. # # Arguments: # slave Identifier of the slave under out control # fname (relative) path to the file to
  • Flow Colors
    18 Jun 2015path,$oldClr)] lappend L(stolen,$oldClr) [list $row $col $L(done,$oldClr) $L(path,$oldClr)] set L(delete,$oldClr) [lrange $L(path,$oldClr) $n end] set L(path,$oldClr) [lrange $L(path ... S(rcFile) [file join $::env(HOME) Library Preference flowColors.rc] } elseif {$tcl_platform(platform) eq "windows"} { set S(rcFile) [file join $::env(HOME) flowColors.rc] } else { set S(rcFile) [file join $::env
  • Flow tracing
    06 Dec 2011saved the file # in path ./lib relative to my sample file (called flowUsage.tcl ) # # Update the auto_path variable to contain the new ./lib path lappend auto_path [file join [file dirname
  • for_recursive_glob
    26 Jan 2015code'' for each file in a directory in/below those listed in ''dirlist'' that matches one of the patterns in ''globlist'', setting ''var'' to the path to the file. The [break] and
  • Formatting ls information in XML
    14 Nov 2012it's on the path - also this could probably be rewritten to be more portable by removing the call to exec ls and retrieving info using 'file stat' etc. <<categories>> XML | File
  • FORTRAN via open pipe
    04 Oct 2002source [file join $dir runExe.tcl]]; ---- Here the package runExe code: uplevel #0 { global auto_path env; if {[lsearch -exact $auto_path [file dirname [info script]]] < 0} { lappend auto_path [file dirname
  • Forward compatibility
    19 Sep 2018this is [glob forwards compatibility]. The code on that page is about the new ''glob -dir path *'' idiom which was introduced in Tcl 8.3. A useful change, and there are so ... are plenty of little features which can simplify scripts just a tad more (unset without complaining, file attr changes, glob, info, not to mention Tk changes), but which I have to avoid
  • forward-compatible dict
    28 Jun 2017in the dict.tcl file that the code in that file is not copyrighted to me, and put a link to this page. If my including this file is an issue, let ... to insert or replace. ::set path {} ::set sub $var ::for {::set i 0} {$i < [llength $keys]} {::incr i} { # Canonicalize each level of nested dicts. lset var $path [::set sub [get $sub]] # Search
  • framesets
    02 Aug 2015and a series of set statements to restore the structure of the associated array. file name=frame name file contents: frame,start code frame,state <state> frame,slots {slot name ..} slot,facets ... packed list of the frame if successful return an empty list if this fails fpathr (get path of references) invoke: fpathr <frame> <slot> result: return a list of frame names for each
  • ftruncate
    13 Feb 2012fileid''']] ''file newsize'' Truncate ''file'' to have a length of at most ''newsize'' bytes. If the option '''-fileid''' is specified, ''file'' is an open file identifier, otherwise it is a file path
  • Functional Programming
    27 Nov 2017Multiplication tables]: [Tacit programming]: [Demand-driven computation]: http://openacs.org/api-doc/procs-file-view?version_id=2967965&path=packages/acs-tcl/tcl/ad-functional-procs.tcl%|%Functional programming procedures from OpenACS
  • fuse
    18 Jan 2012boilerplate code instantiates a socketpair, which creates two file descriptors (similar to a named pipe, but both file descriptors are fully read-write). One file descriptor value is stored in an environment ... case it's not obvious, the combination of fuse and Tcl virtual filesystems is the critical path to total world domination by Tcl. It has the potential to increase ease of development
  • Garuda
    31 Jul 2018tried this with the latest package from a 64bit Tclkit-Shell: ====== set auto_path [linsert $auto_path 0 [file normalize .]] package require Garuda ====== which results in that: ====== d:\home\Hoffmann\pgm\tcl
  • Gathering packages' ifneeded scripts
    27 Sep 2012of the directories in the search path for the possible [pkgIndex.tcl] files. Search path is comprised of the directories mentioned in [tcl_pkgPath] and [auto_path] variables. Given they're usually ... easily could be a hundred of places where '''pkgIndex.tcl''' will be sought. A [pkgIndex.tcl] file typically consists of number of [package ifneeded] commands telling the package loader on how the
  • Gauss Approximate Number of Primes and eTCL demo example calculator
    16 Feb 20181 # gold on TCL WIKI, 15may2016 package require Tk package require math::numtheory #namespace path {math::numtheory} namespace path {::tcl::mathop ::tcl::mathfunc math::numtheory } set tcl_precision 17 frame .frame -relief ... is divergent. I don't see this in math::numtheory::isprime, but [TCLLIB] is a big file system. Also checking division by 2 would eliminate some steps. ---- ***Table for prime_zeta_function
  • Gdbm
    21 Nov 2017else { return path; } } static void noop() {} int main(int argc, const char *const argv[]) { static const char *const subcommandNames[] = {"export", "import", NULL}; enum {EXPORT, IMPORT} subcommand = EXPORT; GDBM_FILE database; FILE *stream
  • Gem Game
    27 Aug 2017find the location of the highscore file using borg/unix related env set is $env(HOME) ;# use INTERNAL_STORAGE here? same? if {[file isdirectory $is]} { ;# verify path exists set ::cff $is/$::ConfigFile
  • General Tianji' Horse Race Strategy from China and eTCL demo example calculator, numerical analysis
    12 Mar 2017or large to be solved? pseudocode: limit to size of eTCL list, ref versions. } #end of file ====== ***Testcases Section*** In planning any software, it is advisable to gather a number of testcases ... 1.0.1 # gold on TCL WIKI, 25feb2017 package require Tk package require math::numtheory namespace path {::tcl::mathop ::tcl::mathfunc math::numtheory } set tcl_precision 17 frame .frame -relief flat -bg
  • generating a playlist using itunesdb
    13 Feb 2006map {: /} $track(ipod_path)]" } close $::fp $::db destroy puts done } genlist ---- Simply change ::basepath to where your ipod is mounted, and run the script. The script will generate a file called playlist
  • Get browser information (path and version)
    13 Oct 2016directory $directory_of_program_files { set binary_path [file join $directory $browser_subpath] if {[file isfile $binary_path] && [file executable $binary_path]} { return $binary_path } } return {} } method get_windows_locale_ID {} { package
  • getfileordirectory dialog
    03 Oct 2017file dirname [info script]] set auto_path [linsert $auto_path 0 [file join $dir "."]] set auto_path [linsert $auto_path 0 [file join $dir ".."]] set auto_path [linsert $auto_path 0 [file
  • getfiles cached
    12 Jul 2016to write cache file." \ -icon "warning" \ -message "Unable to write cache file: $msg" \ -type ok set file_created 99 } } return $file_list } } ====== Demo Code: ====== lappend auto_path [file join [file dirname [info
  • Getting rid of the value/command dichotomy for Tcl 9
    18 Jan 2013requires the use of another command than '''set'''. If there was an '''interp define''': '''interp define''' ''path'' ''command-name'' ''lambda'' then ====== proc a {b c} { ... } ====== would rather be a shorthand for something ... for the sake of argument). Oh, and that's just half the story - how about unifying file names, package names, and namespaces? It's not far-fetched - Python did that from day
  • Getting started with BWidget
    11 Jan 2015auto_path. If you want to install BWidget in a non-standard location, you must then manually extend the auto_path to include that location. Tips for checking and updating [auto_path ... resides is called bwidget-1.7.0, or something else! The important thing is the pkgIndex file inside the bwidget-1.7.0 directory, but pkgIndex is out of scope for now
  • GIN
    26 Jan 2011contain the # full path name of this file's directory. package ifneeded gin 1.1 [list source [file join $dir gin.tcl]] package ifneeded util4gin 1.0 [list source [file join $dir
  • glob
    28 Sep 2018example above to use `[[[file tail] $item]]` instead of `$item`, as the `-directory` option causes `glob` to return paths rather than simple file names. ** The `-directory` and `-path` options ** (Note that these
  • glob forwards compatibility
    23 Aug 2014directory -path} # place platform specific file separator in variable 'separator's regexp {Z(.)Z} [file join Z Z] "" separator if {[info exists opts(-join)]} { unset opts(-join) set args [list [eval file
  • globfind
    12 Jul 2016native format for the platform and contains a final directory seperator set basedir [string trimright [file join [file normalize $basedir] { }]] set fileList {} # Look in the current directory for matching files, -type {f ... nocomplain -type {f r} -path $basedir $pattern] { lappend fileList $fileName } # Now look for any sub direcories in the current directory foreach dirName [glob -nocomplain -type {d r} -path $basedir *] { # Recusively call the
  • Glossary of terms
    18 Mar 2017Alphabetical listing of terms: **A** adminisphere: The rarefied organizational layers beginning just above the rank and file. Decisions that fall from the adminisphere are often profoundly inappropriate or irrelevant to the problems ... require foo". To use extensions without that the user has to explicitly set up the auto_path in his applications, which is error prone and not easily distributable. **R** regular expression: See
  • glyphs
    02 Jul 2018set ng [$fObj get numGlyphs] > puts "found $ng glyphs" > $fObj destroy ====== ** Inspecting font file's properties ** Reopen the .ttf file ====== > set fObj [Glyphs::new "arial.ttf"] ====== we already know how to get ... canvas-widget could be the following: ====== proc Paths2Canvas { cvs paths } { foreach path $paths { # first command should be M (MOVETO) foreach pCmd $path { set points [lassign $pCmd cmd] switch -- $cmd { M { ; } L { $cvs
  • gnocl
    13 Jun 2015t load file "/usr/lib/tcl8.5/gnocl-0.9.91/gnoclGnome.so": /usr/lib/tcl8.5/gnocl-0.9.91/gnoclGnome.so: cannot open shared object file: No such file or ... vte was not found in the pkg-config search path. Perhaps you should add the directory containing `vte.pc' to the PKG_CONFIG_PATH environment variable No package 'vte' found cc -c
  • gnocl::canvas
    25 Aug 2012bPath -coords {30 60 curveTo 50 20 110 20 150 60} -outline red -width 2 -tags "path t2" $canv create line -coords [lrange $coords 0 5] -fill blue $canv create line -coords ... name''' : type: ''string'' : Name of the widget, can be used to set options in an rc file. '''-onButtonPress''' : type: ''string'' (default: "") : Tcl command which (if non-empty) is executed if a mouse
  • gnuerr
    20 Aug 2006applications. Variable: program-short-name This variable holds the tail element of the program path, [argv0], i. e.: file tail $::argv0 It's put before the error message itself by the following
  • Godzilla Guides to tclquadcode
    19 Feb 2018SCM binary from * https://www.fossil-scm.org/download.html * Copy it to somewhere in your [PATH]. * Download the tcl, tk, and quadcode Fossil repositories. cd ~/your-dir fossil clone http://core ... for package "Tcl": have 9.0a0, need 8.2 while executing "package require Tcl 8.2" (file "./installer.tcl" line 10) * Make a directory for quadcode. I'm using a date-stamped
  • gold
    17 Mar 20185 4 3 2 1 78.0 console show package require math::numtheory #namespace path {math::numtheory} namespace path {::tcl::mathop ::tcl::mathfunc math::numtheory } set tcl_precision 17 proc square_root ... extra long comment lines. Recent dec 2017 errors 1.on initial startup 2. and also paste file 3. On my TCL WIKI files, I have some extra long comment lines, 4. which
  • Googie
    30 May 2013contribution to Tcl'ers wiki: * [VT100 terminal library for TCL] * [Tclmod] * [TclMixer] * [tdbf] - a [DBF] (dBASE file) reader/writer package * [tcl_scripting] - a Tcl Module for Kadu [http://www.kadu.net], Instant ... Subtitles (DivX) editor. * [mathematical set] * [Console Sqlite Manager] * [HSV and RGB] * [A-star] (aka A*) - a shortest path finding algorithm * [SQLiteStudio] * [TkClipper], also known under [Eclipse copy problem] * [String validation] <<categories>> Person
  • Google Code Wiki parser/help widget
    29 Aug 2015tree $path(tree) $tree delete [$tree children {}] array unset index list,* # If possible, we'll use the designated Table of Contents file. if { [info exists info(TOC)] && [file exists [set file [file
  • GPL Scripts
    13 Feb 2014immediately also 'machine-readable source code', it seems to me that distributing a pure Tcl source file under GPL does nothing but prevent someone byte-compiling it, or possibly obfuscating it (which ... applications statically link the Tcl interpreter to avoid the problems that can arise when $LD_LIBRARY_PATH fails to locate the interpreter's dynamic library or worse picks up the wrong version
  • Graph An Image
    07 Jun 2012the path for the analysis catch {$canv delete line} set lnp $sp lappend lnp $x $y $canv create line $lnp -fill orange -tags line } } } } proc showpic {f} { switch -- [string tolower [file extension
  • Greylisting
    12 Feb 2015or initialize the database sqlite greydb [file join $::confdir greylist.db] greydb timeout 60000 if {[greydb eval {Select name from SQLITE_MASTER}] == ""} { puts "Initializing databse [file join $::confdir greylist.db]" greydb eval ... greylisting engine based on the principles of # http://projects.puremagic.com/greylisting/whitepaper.html lappend auto_path lib package require sqlite #main test proc, returns PASS or FAIL to caller proc grey
  • gridLabels
    06 Jul 2016KJN optimized & enhanced version) # lappend auto_path [file normalize [file join [file dirname [info script]] .. lib]] package require Tk package require scrolledframe source [file join [file dirname [info script]] gridLabels.tcl] #------------------------------------------------------------------------------ # Main
  • GRIDPLUS2
    03 Oct 2018work: ERROR: Invalid file (C:/Programme/Tcl/lib/tcl8.5/tkIcons) [adavis] (11th November 2009): I'm assuming that "C:/Programme/Tcl/lib/tcl8.5" is your Tcl library path ([info library
  • Growing tree
    29 Apr 2018w path varName text from to resolution} { upvar 1 $varName var set qualVarName [namespace current]::$varName ttk::label ${path}_info -text $text ttk::label ${path}_value -textvariable $qualVarName ttk::scale $path \ -from ... 200)*$height}] $rdepth } # If this is the main script... if {[info exists argv0] && ([file tail [info script]] eq [file tail $argv0])} { bind all <Escape> {exit} growingtree::Main 400 } ====== <<categories>> Demo | Fractal | Tk
  • GSoC Idea: Build system for extensions
    11 Mar 2011only" very standard Unix tools are needed. But if doing development (e.g. adding a source file) you need autoconf to regenerate those files. Is Mo's point that the configure script ... build very simple extensions seems like a useful provision. Of course, the caveats for the simple path will include things like "your platform has to include the following tools" - since if J
  • GSoC Idea: Debugging tools for NRE
    22 Jul 2011stack''. But * Most debugging tools like [gdb] are designed for C * Bug analysis requires understanding the path that leads to failure, not so much what would have happened after that Tcl is ... enabled with special compile flags, that would maintain a ''who called me stack'' (in memory? on file?). A second step would then be to arrange for the tracing output to be inspected
  • Gub
    13 Jun 2018file browser. What we need: A treeview widget for directory names. A treeview widget for directory contents. A text widget for file contents. Panedwindows, scrollbars, etc. Layout: +--------------------------+ | dir names | dir contents | +--------------------------+ | file ... tcl in a directory in the ::auto_path. or Copy gub.tcl to gub-0.6.tm in a directory in the [::tcl::tm::path list]. or Install with SPITE: $ spite | sh
  • gush
    12 Oct 2012command can be forced by giving its path, eg. /usr/bin/file to get the Unix "file" command instead of the Tcl "file" command. Any file-matching patterns in the command line
  • HaJo Gurt
    08 Apr 2018here: * [Ask, and it shall be given # 12] * [A grep-like utility] - [A little file searcher] * [a simple file-viewing text widget] * [string] - [Additional string functions] - [Regular Expression Examples] - [regsub] * [A little ... double or triple * [Memory-Tape] - Remember the order of objects/pictures * [Pathfinder-Memory] - Memorize a shown path, and then follow it * [Symbol-Matcher] - Find and mark all matching symbols * [Task-Planner] / Sequencer
  • Half Bakery
    09 Oct 2012page has an 'Upload from file:' label at the bottom (underneath the text entry area), with an 'Upload' button and entry field for the path to the file to upload. I guess
  • Hard Archiving Strategy using Tcl as master control
    09 Nov 2011in progress) Step 1. Scan local path and select files for archival. Create cover sheet. hard_archive.tcl ====== set master "\n Hard Archive \"[pwd]\" Path Time: [file mtime [pwd]] Time this script
  • Harpy
    01 Dec 2017setkey $certificate $privateKey C:/path/to/your/script/file.eagle # # NOTE: This exports the signed certificate to a file. # certificate export -validate $certificate C:/path/to/your/script/file.eagle.harpy ====== ---- '''Example
  • Hello World as a C extension
    28 Nov 2017h'' and the ''libtclstub'' file (tclstubNN.lib on windows). The simplest method is to launch tclsh and examine the value of tcl_library. Below substitute TCLINC for the path that contains ''tcl
  • Hello, Widgets! (a rock-bottom basic tutorial in Tcl and Tk)
    10 Feb 2018file instead of an .exe file with this example? Is that even possible on Windows? [MG] Sure, as long as you have the file association set up. exec {*}[auto_execok start] $path
  • Help Widget using hv.tcl
    26 Sep 2012so that text anchors display. You must be registered for the mailing list to access the file at Yahoo. 3. The simplest way to use hv.tcl as a help widget is ... add a command like this to the end of hv.tcl, using the LoadFile procedure: LoadFile /path/to/index.html I'd be curious to see how others use help widgets. Hv
  • HelpViewer - based on Tkhtml2.0
    11 Feb 2017HelpViewer::HelpWindow $file } else { set HelpViewer::HelpBaseDir [file join [info script] help] } ====== * helpviewer_demo.tcl ====== set dir [file dirname [info script]] lappend auto_path [file join $dir ".."] lappend auto_path [file join
  • HelpViewer - based on Tkhtml3.0
    03 Oct 2017Thank you. # # ------------------------------------------------------------------------- # ------------------------------------------------------------------------- package provide helpviewer 3.0 # lappend auto_path [file dirname [info script]] set dir [file dirname [info script]] lappend auto_path [file join $dir "hvimages"] # requiring exactly 2.0 to
  • Herring
    08 Sep 2012in the '# Set paths here' chunk near the top of the file. * Start: TkChat. * Open: console from debug menu. * Type: source /path/to/herring.tcl * Hit: Enter, Return, CR, ^M or whatever
  • hidden cursor
    13 May 2011build one. The cursor file must be on a system path, not in a VFS path. ====== proc show_cursor {} { .c conf -cursor "" } proc hide_cursor {} { .c conf -cursor "@path_to_cursor/invisible
  • History of TCL_EVAL_INVOKE
    08 Apr 2014TCL_EVAL_GLOBAL'' is used for ''source'', ''history'', ''package'' ---- '''HISTORY''' ''Note: revision numbers refer to the file tclBasic.c'' '''1.65 (starting point)''' * TCL_EVAL_GLOBAL: resolves cmd and runs traces in ... turn implies the infeasibility of my own TIPs 283/284, and a reduced utility for [[namespace path]] and [[namespace unknown]] (as their functionality is not triggered for FQ command names). 2006-11
  • hkassem
    26 Jun 2018com - 2016 proc fforeach {fforeach_line_ref fforeach_file_path fforeach_body} { upvar $fforeach_line_ref fforeach_line set fforeach_fid [open $fforeach_file_path r] fconfigure $fforeach_fid -encoding utf-8
  • hoco an homogeneous coordinates package
    25 Sep 2011wireframe_draw_path { coords transforms element tag {tags {}} } { widget_canvas_draw line \ [uwp_math_transformation \ [concat [list $element] \ [uwp_hoco_instance_get_transform $transforms]] \ $coords] $tag $tags } ### end of file # Local Variables
  • Home, End and other formatting problems
    28 Jan 2012expected HOME to take me to the top of the file and End to take me to the last line of the file. Normally, I'd expect Control-A to take one ... it off, but not download, atm). Just copy both files down into someplace on your auto_path, then package require textbind ::textbind::setup 1 to use it. (Use ''::textbind::setup 0'' if
  • HOMEPATH
    04 Jan 2018you want independent partion file trees with overlapping dirs) * something like /bin, which refers usually to the c:/cygwin/bin or /cygdrive/<currentpartition>/cygwin/bin * drive-defined path /cygdrive/c/cygwin/bin
  • How can I calculate how much disk space is being used in a directory
    13 Aug 2011set path [file join $directory $element] if { [file readable $path] } { incr size [file size $path] } else { lappend noaccess $path } } if { [llength $noaccess] != 0 } { log::log debug $noaccess } return $size } proc isdir {path
  • How can I make effective use of the BWidgets toolset
    25 Mar 2014set menudesc { "&File" all file 0 { {command "&New" {} "New Hours Database" {} -command file_new} {command "&Open" {} "Open existing hours database" {} -command file_open} {command "&Save" {} "Save to hours database" {} -command file_save ... button that was pressed. Like most BWidgets you must use the "getframe" option to retrieve the path where you can begin stuffing your widgets. ====== set state(editDialog) [Dialog .d -side bottom -title
  • How did you discover TCL/TK
    27 Oct 2017better now. ---- [SYStems] Generally I wanted to learn how to program, and very early in my path I was introduced to the idea that learning more than one programming language, different languages ... maintained by a small team. TCL is a stable, cross platform scripting language that has single file executables, gui, flexible syntax, easy to read code, and an ecosystem of development tools all
  • How do I manage lock files in a cross platform manner in Tcl
    11 May 2015the type of file or on its existence shall be made.'' One cannot follow this approach in Tcl, however. If you try it you will get: % file link -sym /path/to/lockfile
  • How do I read and write files in Tcl
    18 Dec 2017com - 2016 proc fforeach {fforeach_line_ref fforeach_file_path fforeach_body} { upvar $fforeach_line_ref fforeach_line set fforeach_fid [open $fforeach_file_path r] fconfigure $fforeach_fid -encoding utf-8
  • How do I report a bug in Tcl, Tk, ...
    14 Dec 2014either a small piece of code, or a URL (e.g. ftp://ftp.myhost.com/some/path/stuff.tcl) to a small coherent example of code which demonstrates the problem. Either have ... projects, you'll need to install CVS. If you want to be a project admin, do file releases, manage your project's web pages, use the compile farm, and some other activities
  • How Tcl differs between Windows and Unix
    01 Oct 2013put temp files * $HOME is less prominent in [Windows] * how and for whom you install * file permissions * file volumes * registering as a mime type * making script executable (!# & chmod vs. assoc & ftype) * font ... apps to make them work more like Windows or not. Unfortunately, computer usage continues on the path of the ''lowest common denominator''. ---- [RJM] What adds to the above differences are also some
  • How to build for WinCE
    13 Jul 2011OSVERSION)\BIN PATH=$(CEPATH);$(PATH) ! INCLUDE=$(WCEROOT)/$(OSVERSION)/$(PLATFORM)/include ! LIB=$(WCEROOT)/$(OSVERSION)/$(PLATFORM)/lib/$(TARGETCPU) ###################################################################### --- 279,287 ---- #CEPATH=D:\Programme\Microsoft eMbedded Tools\EVC\$(OSVERSION)\BIN PATH=$(CEPATH);$(PATH) ! #mno INCLUDE ... type CEUX, value 01 00 to wish84.exe, e.g.: * Start Visual Studio (MS VC++ 6) * File -> Open -> select wish84.exe * From the Insert menu, select Resource... * Click the Custom... button * Enter
  • How to build good packages
    24 Jan 2017by Tcl are inside the text file. 5. Now, the next step is to create a sub-directory inside one of the tclsh's auto_path directories - or into a directory that
  • How to change a running system
    16 Oct 2013At startup of your application, just say lappend auto_path my/module/path ... ---- '''Modern way:''' Look at the [package] command. In your module file, write package provide mymodule1 1.5 Make sure
  • How to compile Tcl and related C extensions on Windows
    29 Jan 2016source file * create a directory where you plan on compiling the code * determine where you want to install the binaries * cd into the tcl top level directory * read the README file (and ... and Tk 8.6 on Windows for R]: Some notes by [adrian%|%Adrian Wadell]. ** Overview ** The path of least resistance for building and testing Tcl on Windows is somewhat different, at least
  • How to create a minimal Visual C++ install
    03 Jan 2012set LIB=%MSVCDir%\lib set PATH=%MSVCDir%\bin;%PATH% Title Minimal VC6 build shell You can now open a new command shell and run the batch file to setup a build shell
  • How to create and clean up a Wikit .tkd file
    28 Oct 2009next line restarts this file using a tcl shell \ exec tclkit "$0" -- ${1+"$@"} package require starkit starkit::startup lappend auto_path [file join $::starkit::topdir app] mk::file open db wikit.tkd
  • How to create mingw32 libraries from DLLs
    28 Sep 2018a static library from a dll" puts "usage: tclsh makedll.tcl <path/to/dll>" exit 0 } set dllroot [file tail [file rootname $dll]] set dlldef $dllroot.def if {[regexp {^lib} $dllroot]} { set
  • How to create my first Starpack
    30 Jul 2018re-assemble taking current dir into account: set libDir [file join $dir $libDir] if {[lsearch -exact $::auto_path $libDir] == -1} { lappend ::auto_path $libDir } ====== This technique is not new, for sure, just
  • How to debug memory faults in Tcl and extensions
    12 Jul 2018distribution), you now could start debugging. Do ====== mpatrol --dynamic /path/to/your/static/build/tclsh testscript.tcl ====== This does produce a log file, named 'mpatrol.<processID>.log', in which you find the
  • How to embed Tcl in C applications
    13 Jul 2018bigbird fly"); return TCL_OK; } ====== '''`Makefile`''': ======none PROGRAM_NAME = myprogram CPPFLAGS = -I. -I/path/to/tcl/include LDFLAGS = -L/path/to/tcl/lib CC=/usr/bin/gcc #CCDEBUGFLAG = -g all: $(CC) -c ... org/index.html/artifact?ci=trunk&filename=src/th_tcl.c%|%Fossil's TH1 / Tcl source file]: How [Fossil] dynamically loads and integrates with Tcl on multiple platforms. [tclsh] and [wish]: These
  • How To encrypt a SQLite database in Tcl under Windows
    21 Nov 2017g' src/tclsqlite.c make ====== As I used dynamic linking option. Exported LD_LIBRARY_PATH with the path where new libsqlite3.so is installed. Then I could execute the following tcl command ... the key (and get an error): ====== % sqlite3 db /tmp/test2.db % db eval { select * from t1; } file is encrypted or is not a database ====== ---- [SQLite] does not support encryption or passwords. There
  • how to find my own IP address
    09 Jul 2016get $net ServiceName] set path [regpath HKEY_LOCAL_MACHINE System \ CurrentControlSet Services \ $service Parameters Tcpip] set vars [registry values $path] foreach var $vars { set val [registry get $path $var] puts $var=$val ... proc ifConfig { args } { if { [ catch { set interfaces [ list ] if { [ file executable /usr/sbin/ifconfig ] } { catch { ::exec /usr/sbin/ifconfig -a } data } elseif { [ file executable /sbin/ifconfig ] } { catch { ::exec /sbin/ifconfig -a } data
  • How to grow your own Wiki
    30 Apr 2012at least on Linux). I put the tclkit in /usr/bin since that was in the PATH in apache's environment (as displayed by the printenv cgi-bin script). I then put ... the apache user). Editing a page with Mozilla 0.9.8 fails with, [error] (26)Text file busy: exec of /var/www/cgi-bin/wikit.tkd failed whilst editing with Netscape Communicator
  • How to launch a Tcl program from Excel
    14 Apr 2015script which creates a csv data file which is then loaded into Excel as external data. The path of the Tcl script and the csv file that the Tcl script is to
  • How to make a Tcl application - part four
    18 Jan 2013the correct full path to the Tcl installation, the string "...path2..." must be replaced by the full path to the application that you want to start. * Put this batch file into some
  • How to make a Tcl application - part three
    08 Apr 2011file names and file attributes via the ''file'' command and its subcommands. Use them, whenever you need to: the file command gives you a platform-independent way of forming a full path
  • How to make a Tcl application - part two
    17 Aug 2012directory out of the file. What remains is: * Store the source file (poly.tcl) and the package index (pkgIndex.tcl) in a suitable directory (check the auto_path variable for this or
  • How to migrate to Tile
    26 Sep 2016that everything "just works", but Tile is designed so that you have to follow a strict path to achieve your platform-native look. This means that obvious things you may have learned ... tk_getSaveFile. They don't use Tile. How can I fix that? Answer: Try out the [File selection dialog for Tile] by [Schelte Bron]. It also has a message box dialog. ---- [SRIV
  • How to start with tcllib
    24 Feb 2013the file was downloaded as a text file instead of a binary file. Other possible errors are not having a program that knows how to deal with a gzip'd tar file ... If it is missing, you have to add it to your auto_path in your scripts. % lappend auto_path /path/to/tcllib/installdir ---- **Checking Dependencies** How am I supposed to test the
  • How To Update Tkinter on Mac OS 10.4
    02 Mar 2017new file by opening TextEdit, then going to File->Save and enter the file name .bash_profile Enter into TextEdit: export PATH=<path to python 2.7>:$PATH Replace the <path to
  • How to use new fonts without installing'em
    17 Jul 2017file. Here's an uncommon free font named Scriptina [http://web.tiscali.it/irrational/fonts/SCRIPTIN.TTF] downloaded from http://www.dafont.com/ . Just for a quick test, save the font-file ... unicode; int len, r = TCL_OK; const char *path = Tcl_GetStringFromObj(pathObj, &len); Tcl_DStringInit(&ds); unicode = Tcl_GetEncoding(interp, "unicode"); Tcl_UtfToExternalDString(unicode, path, len, &ds); if (AddFontResourceExW(Tcl_DStringValue(&ds
  • HTML to DOM via http/htmlparse/struct::tree packages
    14 Jan 2015eq ""} { set uri [uri::split $url]; set baseUrl [uri::join {*}[dict set uri path [file dirname [dict get $uri path]]]]/; } else { set baseUrl [$baseNode @href]/; } set utils [dict create]; foreach sectionNode [$domDoc
  • httpd.tcl
    08 Jun 2012expiring a cookie that was previously set. '''Httpd_ReturnFile''' ''sock type path'' ?''offset''?: Sends the contents of the file with name ''path'' and mime type ''type'' as the reply to the current
  • hubs remote interp
    01 Apr 2011then { set pipeline [concat |\ [list tee [file normalize [file join $Opt(-debugdir) in]]]\ $pipeline\ | [list tee [file normalize [file join $Opt(-debugdir) out]]\ 2> [list [file join $Opt(-debugdir) err]]]] } if {$Opt ... to be caught. Some ''prefix''es of interest are: * `uplevel \#0` * `namespace eval` ''namespace'' * `interp eval` ''path'' proc hubs::eval::do-8.5 {prefix script} { list [eval {catch [lappend prefix $script] res
  • I have a script in a text file - how do I run it
    22 Sep 2011text file - the file immediately executes. Also, one can add, as the first line of the text file, something similar to: #! /path/to/tcl/or/wish and then save the file, and
  • I need a tcl/tk developer to develop a small app for us
    14 Apr 2011just giving back the name portion, not the path of the file, as we already know the path lappend buf([file extension $file]) $file } # (2) # Now looping through all the extensions, and
  • I want for huge Unicode font file not to occupy main memory for WinCE
    27 Jan 2011tcltk.htm]) However this file is huge, and placing it in main memory is bad. Solution: compile very simple program and place it on startup: (substitute your real path, compile, then execute
  • icomaker - tcl only ppm to tclkit.ico converter
    13 Apr 2012tclkit.ico file is written as the output for use with [sdx] wrap. Usage : ./icomaker.tcl tclkit8.6.exe icon.ppm tclkit.ico ====== #!/usr/bin/env tclkitsh # lappend auto_path /home/john
  • Ideas for Wikit enhancements
    26 Oct 2010other possibilities such as "http://this/file", "http:///", "http:file", "fs://file" (inspired by nsf://) and finally decided to port the feature as http:path/file as it really represents what we
  • idtagviewer
    06 Sep 2013could be choosen between: path: the complete path of a MP3 file directory: the directory of a MP3 file filename: the filename without extension of a MP3 file (default) artist, album, year
  • If I were to complain
    27 Oct 2010contribute extensions to Tcl. A2. This again is reactive development. It also sets in motion a path of least resistance. That is, because someone has already written the code we will adopt ... should be a single, stand-alone, self-contained module. And there would probably be a `make` file that went something like:- # My very own personal Tcl/Tk interpreter... module require set module
  • iFile 1.0
    11 Dec 2011path set dirs [glob -nocomp -type d * .??*] set parent $node foreach dir [lsort -unique -dic $dirs] { regsub -all {[^A-Za-z0-9]}\ $path/$dir _ node if [llength [glob -noc -type d \ [file
  • iFile 1.1
    11 Jul 2007path set dirs [glob -nocomp -type d * .??*] set parent $node foreach dir [lsort -unique -dic $dirs] { regsub -all {[^A-Za-z0-9]}\ $path/$dir _ node if [llength [glob -noc -type d \ [file
  • iFile: a little file system browser
    02 Dec 2007cd $path set dirs [glob -nocomp -type d *] set parent $node foreach dir [lsort -dic $dirs] { regsub -all {[^A-Za-z0-9]} $path/$dir _ node if [llength [glob -noc -type d [file
  • iKnow: a pocket quiz
    22 Jun 2015questions... In the simplest case, the whole file (as shown here) is a standalone quiz. If you place it into a directory in your package path and (re)create a package index
  • ilist
    29 Jan 2006added a list around the last i above, to make the argument passing deal with file/path names with spaces in them as lists. That was using the wiki as storage to
  • Incremental GUI text search
    16 Oct 2009path rename $path $actual array set config $args interp alias {} $path {} ::find::proxy $path return $path } proc ::find::proxy {path subcommand args} { eval \$subcommand \$path $args } proc ::find::focus {path} { ::focus $path ... text unless tuned or customized. [http://tclbuzz.com/imgmisc/incrsnap.jpg] The code a single source file in namespace "incrsearch" http://tclbuzz.com/imgmisc/incrsearch.zip Please post good or bad news
  • Indexing and Searching the Wikit with Xapian
    20 Jan 2013setlevel notice # path to the indexing dir set indexpath db # path to the uncompressed wikit metakit file # (from http://mini.net/cgi-bin/wikit.gz ) # set wikifile wikit set dbfile [file join
  • info
    21 Jun 2014is: later on in the process, not later in the source file). ** See Also ** [Determining the Applications Root Directory]: [Making a Path Absolute]: <<categories>> Arts and Crafts of Tcl-Tk Programming | Tcl
  • info nameofexecutable
    01 Dec 2012info nameofexecutable''' Returns the full path name of the binary file from which the application was invoked. If Tcl was unable to identify the file, then an empty string is returned. ---- See
  • infox
    17 Aug 2013the `truncate` system call is available. If it is, the [ftruncate] command may truncate by file path. '''have_waitpid''': Return 1 if the `waitpid` system call is available and the [wait] command
  • IngTcl
    04 Jul 2013of commands 7. Examples 1. Licensing and copyright ========================== See the file "license.terms" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. Copyright (c) 2012 ... IngTcl | +---------------------------------------------------------------------------+ 4. Change directory to "win": +---------------------------------------------------------------------------+ | cd win | +---------------------------------------------------------------------------+ 5. Execute Makefile: - TCLDIR should be set to path where Tcl is installed (usually "C:\Tcl") - INSTALLDIR usually should be set to (TCLDIR)\lib
  • install
    18 Oct 2006data, and loaded as such. ---- [Stu]: ''Jan 4, 2004'' Here's a mini installer for single-file tcl scripts using exec magic. An interesting side-effect is that an installed program can ... Run without options to run normally, or install with:" # \ echo " --install src dest user group mode path-to-tclsh" # \ echo "Do it like that, the installer is dumb." # \ echo -n "Example: ./myapp
  • Install tcl on ipaq familiar linux PDA with Img package
    25 Jul 2009To solve it, add these path to your environment. export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/bin/X11:/usr/local/sbin:/usr/local/bin:./:$PATH 2.Download the tclkit for ... www.equi4.com/tclkit.html''' tclkit is the easiest way to install, it is just one file. As its website said, install is just copy, uninstall is just remove. To run tclkit
  • Integrating Itcl into the Tcl core
    16 Apr 2014redefined in any file without having to worry that it had been defined elsewhere. The most common way one would run into this problem would be to source a file that contained ... backward compatibility layer that would map to Itcl 3.0 only. This would provide an upgrade path to those folks currently running with Itcl 3.0. **Change is bad:** - Some believe quite
  • Integrating Tcl and Emacs on Windows
    13 Jul 2018it to a file called cmd-input.tcl. In Emacs customize the variable tcl-application to read "tclsh83.exe" and the variable tcl-command-switches to include "c:/your-path-here/cmd
  • interactive command composer
    28 Feb 2013you edit! Left next to '''Save Procs''' Button, an entry can contain a file name, possibly with full path, where all procedures which have been updated with the <Update Proc> during the
  • Interactive features in Tcl9 discussion
    21 Sep 2012require debug ;# if debug is used, then... well anything short would be fine la array lc .path ll list lp procname Where la, would be short for parray, lc might do the ... isn't something that needs to wait for Tcl 9, so why don't you just file feature requests for them? Adding a '''pdict''' sibling of [parray] is something that can be
  • interp
    21 Jun 2017interp to create child interpreters and then using them. ====== #### interp create <path> #### #### The path is not a path to a file--just a #### string that indicates the nesting-level #### of the interpreter
  • interp alias
    10 Nov 2015The file is there. But `[file exists] hi.txt` also returns `1`. How does it avoid looping forever into `file exists` = `file file exists` = `file file file exists` = `file file file file ... command is invoked in the source interpreter. '''interp aliases''' ''?path?'' : Returns a [list] of tokens for all the aliases in ''path''. If ''path'' is not provided, the current interpreter is used. ** See
  • Introduction to Database Access With nstcl
    23 Apr 2013driver $driver" (file "./nsdb.tcl" line 28) Eventually, I edited '''/path/ActiveTcl/lib/nstcl-1.2/nstcl-database-sqlite.tcl''', changed load [::nstcl::find_shared_library tclsqlite] to load [file normalize [::nstcl
  • Invoking tclsh or wish from Bourne Shell
    11 Dec 2011bin}:$PATH"; export PATH # Customize as needed: # TCLLIBPATH must be set to the path of where our packages are, and # the pkg_mkIndex has to be called to create a file in
  • Is tclsh or wish suitable as a login shell
    17 Mar 2015allow something like: ====== set a [ls *.txt] ====== that is: for tclsh to search for commands in PATH not only in interactive mode, but at any level, if there isn't a TCL ... Well, some experimentation: In tclsh/wish on UNIX: * "ls |more" causes execution of "ls" with a file "|more" * "ls | more" causes execution of "ls" and produces one page only * "ls -l | more
  • island
    09 Jan 2017fname [::file dirname [::file normalize $fname/___]] foreach path $paths { if { [string first $path $abs_fname] == 0 } { return 1 } } return 0 } # ::island::File -- Restricted file # # Parses the options and arguments to the file
  • It's an Alias World!
    16 Jul 2009PATH) \; ] } default { set myPathList [ split $::env(PATH) : ] } } foreach dir $myPathList { foreach ext { "" .bin .exe .dll .com .bat } { set myCTL [ file join $dir "$myFilename$ext" ] if { [ file exists $myCTL ] \ && [ file readable $myCTL ] \ && [ file
  • itins
    01 Sep 2015wset {class path args} { set evaluate "$class [string range $path 1 end]" foreach a $args { set evaluate [concat $evaluate [::itins::lone $a]] } [eval $evaluate] hull return $path } proc deleteWidget {path} { catch {itins ... in itins. Snit allows this though. A pkgIndex.tcl file for itns: #pkgIndex.tcl for itins package ifneeded itins 0.2 [list source [file join $dir itins.tcl]] ---- [RLH] 05-Sept-2005
  • itunes playlist export
    29 Aug 2006itunes, but itunes' playlist cannot (easily) used in winamp. After spending some time looking at the file format for m3u and pls files, here's a little snippet to export a playlist ... don't have an videos. ---- Sample output: C:\>tclsh itunes_playlist_export.tcl list | export id path ? m3u | pls ? | tracks id C:\>tclsh itunes_playlist_export.tcl list 1 - a 1202 2
  • Jackson McCann
    05 Aug 2011file format used by the GraphViz tools [http://www.graphviz.org/]. It uses the tcLex package [http://membres.lycos.fr/fbonnet/Tcl/tcLex/index.en.htm] to parse the .dot format file ... load. [Package DGA] Implements the following Directed Graph Algorithms: * [Edsger Dijkstra]'s algorithm find a shortest path from the node n to every other node that is reachable from n. * Prims's
  • Jacl
    02 Jun 2015catch(BSFException bsfe) { bsfe.printStackTrace(); } where "scriptFile" is the name of the file containing the script and "script" is that file's contents; the addLogText method on some Java UI object adds ... 2. Add the JACL jar files. Add jacl.jar and tcljava.jar to the java build path under "project properties". The jar files are already packaged with RAD6 and can be found
  • Jacl modernization
    16 Mar 2015aliases ?path? Supported interp create ?-safe? ?--? ?path? Supported interp delete ?path ...? Supported interp eval path arg ?arg ...? Supported interp exists path Supported interp expose path hiddenName ?exposedCmdName? Supported interp hide path exposedCmdName ... with the Jacl code base before tackling more difficult tasks. File event processing is likely to require substantial changes to Jacl file handling and event structures. ***Analysis Results*** ****after**** after ms Supported
  • Jacl Modernization Release Notes
    30 Aug 2014br>> `file separator ?name?` added. <<br>> `file normalize name` works, too. '''2009-07-09''' by ''[rszulgo]'' <<br>> Tests and fixing bugs of heretofore work. <<br>> The work on glob -types, -tails, -path
  • Java vs Tcl
    30 Aug 2014the installer.jar file, java generates an error message. Shrug. ---- [RS] quotes from [http://www-106.ibm.com/developerworks/library/script-survey/] that Tcl's set out [open file.txt a] is ... anyone who could deliver a well-considered evaluation of the solaris/linux interoperability and core development path (for JAVA) projected over the next couple of years. This surprised me, since I expected
  • Jima's recursive glob
    28 Jan 2014possible values are perhaps unfortunate because of the hyphens. ====== # Proc GetFilePaths. # Arguments. # filePath The starting file path to operate on. # -expected An option list with expected results. # Possible value -expectedFiles. # Possible value
  • JM
    05 Oct 2018machine * The file will be copied to c:\putty in this case console show proc action {} { cd c:/putty set f [open "|\"pscp.exe\" -l jorge -pw yourpwd [.from get]:[.path get
  • JSON
    31 Mar 2018long/path/mzl.lqtjexwh.png"}]}} {"results": [{"artworkUrl512":"http://a1379.phobos.apple.com/long/path/mzl.lqtjexwh.png"}]} eltclsh > puts [::json::json2dict $j] results {{artworkUrl512 http://a1379.phobos.apple.com/long/path/mzl ... language, used to create markup languages such as DocBook.", "GlossSeeAlso": ["GML", "XML", "markup"]}]}} } {"menu": { "id": "file", "value": "File:", "popup": { "menuitem": [ {"value": "New", "onclick": "CreateNewDoc()"}, {"value": "Open", "onclick": "OpenDoc()"}, {"value": "Close", "onclick": "CloseDoc
  • JSON-RPC
    12 Feb 2015headers/footers, charset encoding, and compression. However, I am not quite sure this is the right path to take. For one, the name [[sendresponse]] is no longer appropriate in this scheme, since ... itself. [[indexfile]] can't know in advance if index.html exists (there might not be a file of that name but instead some other zone handler, e.g. [[templatefile]], knows how to
  • JTcl Interpreter
    19 Jan 2016env(file.encoding) = Cp1252 env(file.encoding.pkg) = sun.io env(file.separator) = \ env(java.awt.graphicsenv) = sun.awt.Win32GraphicsEnvironment env(java.awt.printerjob) = sun.awt.windows.WPrinterJob env(java.class.path
  • JTcl port for Android
    11 Mar 2014external libraries into ${outdir}/${dex-file}...</echo> <apply executable="${dx}" failonerror="true" parallel="true"> <arg value="-JXmx512m" /> <arg value="--dex" /> <arg value="--output=${intermediate-dex}" /> <arg path="android/jtcl.jar" /> <fileset dir
  • JTCL with Apache BSF
    03 May 2016file="build/jtcl-engine.jar"></delete> <delete dir="./build/classes"></delete> </target> <!-- ======================================================================= --> <!-- --> <target name="test_ext"> <java classname="org.apache.bsf.Main"> <classpath> <path path="../commons-bsf/build/lib/bsf.jar"></path
  • Juggler
    30 Jul 2013image to a PNG file, cropping the image, and converting the PNG file to a JPEG file that was less than 10% the size of the PNG file. Thanks to FOSS developers ... ball$w [tossing $ball($w,toss) $w] set ball($w,ss) "HR" } } } ##+##################################################### # # Tossing - Figures out the path for a ball: x,y # # u = (2t/sqrt(k)*f - 1) # x = w*u # y
  • Just getting a package found already
    23 Aug 2005into your Tcl library path, then it will just work. * If you can't put foobar into the Tcl library path, then you can adjust the library path to point to its ... bare minimum for a pure-Tcl package called FooBar: * Create a package source file called ''FooBar.tcl'' * Populate that file with the package code, following the conventions in [William Duquette]'s tutorial
  • KaKaRoTo
    28 Aug 2012enhance it so others can enjoy it. It's fairly simple/easy. kakaroto% tclsh % lappend auto_path [pwd] /usr/share/tcltk/tcl8.4 /usr/lib /usr/local/lib/tcltk /usr/local/share ... a look at the code in aMSN's SVN repository. You can also look at the file sip.tcl and the Farsight snit type for a 'how to use'. The ::Farsight::Prepare
  • kbs bugs and comments
    14 Jul 2017the date of the ChangeLog file to determine when to re-download the kbs.tgz file. Did I get it all right? Note that the current ChangeLog file at 4shared is empty ... which by default picks up, in my environment, Sun's make command. When I move my path around to get gnu make, the build completes. It appears to have something to do
  • KDE
    10 Sep 2012used the biggest file on the sourceforge distribution, yet) run it, it installs pretty much itself, though for the cygwin users, keep an eye on what happens to PATH variables, and possible
  • Keep a GUI alive during a long calculation
    15 Jun 2017the ''itunesDB'' file to one from which individual records can be retrieved quickly, or; * Run the GUI, and the ''itunesDB'' file parser, as two separate processes. You want the file parser to ... stepNum; # Number of steps performed so far variable maxSteps; # Maximum number of steps needed variable canvas; # Path name of the canvas that # displays results variable xorig; # X coordinate of the cannon on
  • Keep your struct away from me
    25 Sep 2011adapter(PATH)] { 0 { return } 1 { set adapter(PATH) {} set adapter(CURRENT) {} set adapter(CHILDREN) [file separator] } default { set adapter(PATH) [lreplace $adapter(PATH) end end] set adapter(CURRENT) [lindex $adapter(PATH) end
  • Kevin Kenny
    27 Aug 2012bin/sh # the next line is a comment in Tcl, but /bin/sh interprets it \ exec /path/to/wish "$0" ${1+"$@"} Some of my better abandoned projects include: * '''tclTCP''' - This was a ... about dealing with [Microsoft Windows and Tk], such as [Printing a canvas under Windows] and [Register file types under Windows]. I also have a few things up my sleeve about making Tk
  • KitCreator
    19 Jun 2018CONFIG_PATH= PKG_CONFIG_LIBDIR=$SYSROOT/usr/lib/pkgconfig:$SYSROOT/usr/share/pkgconfig PKG_CONFIG_SYSROOT_DIR=$SYSROOT ====== Next, I'm getting `-L/usr/lib64` in my X library search path, even ... 1 -DKIT_STORAGE_MK4=1 -c -o kitInit.o kitInit.c kitsh/build.log:77:In file included from /var/tmp/kitcreator-test-8981103881756025603/kitcreator-trunk-tip/tcl/build/tcl8.6.8
  • kitsplit
    21 Jan 2005file $files { if { ![isKitFile [string range $file $cutlen end]] } { file delete $file if { [llength [glob -nocomplain -dir [file dirname $file] *]]==0 } { file delete [file dirname $file] } } } vfs::unmount $mnt mkpack $tmpfile $path
  • Lab 3D
    05 Mar 2015if {![file readable $file]} { error "Cannot read file" } # The file passes the first round of tests... break } set path [file dirname [file normalize $realfile]] set realfile [file readlink $realfile] if {[file pathtype
  • Largest files
    02 Jul 2008auto_path hrfilesize-1.1 lappend ::auto_path largestfilesview-1.0 package require largestfilesview set dialog [largestfilesview create .mydialog] pack $dialog $dialog draw ---- See also: * [Windows file finder] * [file size] ---- [Category File]
  • Last.fm cover grabber
    27 Aug 2013savePicture $nName [lindex $n 1] $path return $nName } } } } } #scan file, check metainfo via last.fm and save cove art proc prepareCover {fileN path} { lassign [___readMetadata [file join $path $fileN]] title artist album
  • lconvert
    22 Dec 2011plist 1 2 3 4 % file join $x 1/2/3/4 Normally, '''[file join]''' takes a variable number of arguments and joins them together with a path separator. In this case
  • LemonTree
    07 Dec 2012that BWidget comes with:} set path $BWIDGET::LIBRARY/images foreach {type name} {dir folder file file array copy} { set LemonTree::icon($type) [image create photo -file $path/$name.gif] } # Some more icons
  • LemonTree branch
    23 Sep 2015BWidget comes with:} set path $BWIDGET::LIBRARY/images foreach {type name} {dir folder file file array copy html folder} { set LemonTree::icon($type) [image create photo -file $path/$name.gif] } # Some more
  • LemonTree Org Chart
    20 Jan 2013html [getReporters $name] } set path $BWIDGET::LIBRARY/images foreach {type name} {dir folder file file array copy html folder} { set LemonTree::icon($type) [image create photo -file $path/$name.gif] } proc LemonTree
  • Let unknown know
    20 Jan 2013tclPackages table of the database pointing # them at the sqlite3load::loadPackage proc. # # Parameters: # dbFile - Path to database file which must have a # tclPackages table with package_name # and code columns. # Returns: # The
  • Let's think about "callspaces"
    08 Apr 2011that provides a file system ''name'' interface to a particular pipe data structure. Applications can open it, add or read data, and then close it. It provides a path-like interface to
  • lish2html
    07 Sep 2012to anything fancier if needed set this [file join [pwd] [info script]] if ![catch {file readlink $this} res] {set this $res} lappend auto_path [file dirname $this] ;proc usage {} { puts "usage: lish2html
  • List of Tcl commands by bytecode status
    22 Apr 2014file] [file atime] [file attributes] [file channels] [file copy] [file delete] [file dirname] [file executable] [file exists] [file extension] [file isdirectory] [file isfile] [file join] [file link] [file lstat] [file mkdir] [file ... exists] [namespace eval] [namespace exists] [namespace export] [namespace forget] [namespace import] [namespace inscope] [namespace parent] [namespace path] [namespace unknown] [scan] [self - TclOO%|%self] **** [self call] [self caller] !!! [self class] [self filter] !!! [self
  • List of ttk Themes
    11 Sep 2018theme #set ap [file join [file dirname [info script]] .. code] #if { $ap ni $::auto_path } { # lappend ::auto_path $ap #} #unset ap #package require themeloader #themeloader::loadTheme $theme if { [file exists $theme.tcl
  • load
    09 Dec 2017file: No such file or directory [andy@toaster|~/e6b]$ tclsh % load atc.so % load per.so couldn't load file "per.so": per.so: cannot open shared object file: No such file ... or a dependent library could not be found in library path ====== The reasons might be: * The dll is not in the same path as you wish interpreter exe or in the Windows
  • Local Packages and Transparent Namespaces
    19 Oct 2011since file dirname C: # yields C:. foreach dir [getSearchDirs /] { if {[file exists $dir/$fileName]} { return [file normalize $dir/$fileName] } } } error "Cannot find file $fileName in search path for $clientFile" } return [file normalize
  • Lock files using atomic hard links
    07 May 2015access to. # # Arguments: # fname Path to base file # # Results: # Return the full normalised path to a file that can be used as # a lock control file for the file passed as a
  • LogParser
    24 Mar 2018in a separate file<<br>> filename: query.sql, contents:<<br>> SELECT first_name,last_name,city FROM us-500.csv WHERE state = 'CA' ---- Dependecies in this example: * the path to LogParser is
  • LogParser goes COM
    26 Jun 2018key data sources on the Windows operating system such as the Event Log, the Registry, the file system, and Active Directory <<br>> <<br>> %|Mode|Batch|% &|Input|any LogParser Valid Inputs|& &|Output|any ... LogQuery] set evt [tcom::ref createobject MSUtil.LogQuery.FileSystemInputFormat] set recordSet [$lgp Execute \ "SELECT TOP 10 Path, Name, Size FROM C:\\*.* ORDER BY Size DESC"\ $evt] while { ![$recordSet atEnd] } { set record [$recordSet
  • Longest common word prefix
    22 Sep 2018the main script, run the tests. if {[info exists argv0] && ([file tail [info script]] eq [file tail $argv0])} { package require tcltest namespace path ::lcwp tcltest::test common-word-prefix-1.1 {simple
  • lshift -Adding Unique Items to Lists of Fixed Length
    19 Apr 2006recent:update .menu.file.recent ${path}apple.odt recent:update .menu.file.recent ${path}bannana.odt recent:update .menu.file.recent ${path}cherry.odt recent:update .menu.file.recent ${path}damson.odt
  • LuaJIT
    30 Nov 2017SetObjResult( interp, Tcl_NewStringObj("can't process function path list", -1) ); return TCL_ERROR; } if (listc == 0) { Tcl_SetObjResult( interp, Tcl_NewStringObj("function path can't be empty", -1) ); return TCL_ERROR ... sum $s} 5] } # If this is the main script... if {[info exists argv0] && ([file tail [info script]] eq [file tail $argv0])} { ::luajit::test } ====== *** Benchmark results *** ======none using LuaJIT 2.0.4 798469
  • LZ4
    19 Nov 2017error "expected \"$expected\",\n\ but got \"$actual\"" } } proc ::lz4::file-test {path canHash} { if {![file exists $path]} { puts stderr "can't find file \"$path\" -- skipping test" return } # Can't use -ignorestderr because
  • m3u and pls
    29 Aug 2006d\n" $count $tracks(length)] incr count } append output [format "NumberOfEntries=%d\nVersion=2\n" \ $count ] } default { error "unknown file format" } } set fh [open $path w] puts -nonewline $fh $output close $fh
  • MacOS X shortcuts
    13 Aug 2013some other file, and it is thus not as dependent on the capabilities of the file system. Aliases keep track of more information about their targets than just the POSIX path and
  • MacTcl
    31 May 2007path, so if > you put other tcl library files, or a tclIndex file there, your app will > find the other bits it needs from. You can also replace the Wish.icns file
  • Magic names
    06 Dec 2016to your program as a whole. Try the file name example.tcl. ''[Jeffrey Hobbs] explained:'' It is not OK to name any primary Tcl file (the one that is launched by wish ... explicitly in a script, and might therefore be easy to overlook when troubleshooting. For example, `$auto_path`, whose value might depend on the value of an environment variable, or which might be
  • main script
    12 Oct 2014exists argv0] && [ file dirname [file normalize [info script]/...]] eq [ file dirname [file normalize $argv0/...]]} { #do stuff } ====== The `/...` on the end of each path ensures that [file normalize] resolves the path completely. Normally
  • Making a Path Absolute
    30 Jan 2011file dirname \ [DirectPathname [file dirname $canCdTo]]] return [file join $_DirectPathnameCache($index) $rest] } default { ;# Shift one path component from $canCdTo to $rest set rest [file join [file tail $canCdTo] $rest] } } set canCdTo [file
  • Making mathematical waves
    19 Aug 2017file, its a 260 kilobyte 16 bit wav file. Part of he formula in neater form: [Image TV Wiki form1.jpg] ... Finally, it is also possible to read the resulting wav file ... exec ./fm] } ====== Of course maxima must be present on the system and reachable according to the PATH shell variable (like [wish] and [tclsh]). I've done this setup on [Linux], which when
  • man
    05 Sep 2012on-line manual pages manpath - determine user's search path for man pages SYNOPSIS man [-acdfFhkKtwW] [--path] [-m system] [-p string] [-C config_file] [-M pathlist] [-P pager] [-S section_list] [section
  • Manipulating Jack/Ladspa Audio processing graphs from Bwise
    15 May 2013make "dummy" bwise blocks for each file in a diretory with the effect files we want to use: set downc 20 foreach i [glob Jackrack/*] { newproc {} [file tail $i] i o 40 ... exec bash -c export LADSPA_PATH=/usr/lib64/ladspa/ ====== To the best of my knowledge, this starts a [bash] process and tells it to set its LADSPA_PATH variable and put it
  • mapvfs
    07 Sep 2013PATH) \;]] PATH: ====== and on UNIX: ====== vfs::map::Mount -volume [concat [list vfs::map::handleMultidir] [split $::env(PATH) :]] PATH: ====== Creates a virtual mapping by which you can easily do: ====== if {![file exists PATH
  • Markdown
    05 Dec 2017windows) ... set basedir [string trimright [file join [file normalize $dir] { }]] # execute markdown... foreach f [glob -nocomplain -type {f r} -path $basedir $pattern] { # change file extension: set htmlfile [file rootname $f] append htmlfile
  • Matthias Hoffmann - Other Utilities
    29 Feb 2008against an auth-file (if present); if env(remote_addr) is not in this ''allowed-table'', aborting * constructing the .TKD-database filename from it's own name (same path, same name, but
  • Matthias Hoffmann - Other Utilities - Dirwatcher
    02 Nov 2008string ffcnflags = %FILE_NOTIFY_CHANGE_LAST_WRITE or _ %FILE_NOTIFY_CHANGE_FILE_NAME or _ %FILE_NOTIFY_CHANGE_DIR_NAME or _ %FILE_NOTIFY_CHANGE_ATTRIBUTES or _ %FILE_NOTIFY_CHANGE_SIZE or _ %FILE_NOTIFY ... MAIN *** '------------------------------------------------------------------------------- function pbmain() console name extract$(mid$($Version,3),"(c)") dim lpPathName as local asciiz*%MAX_PATH ' muss ein DIRECTORY-Name sein! dim bWatchSubtree as local long dim hNotify as local long
  • Matthias Hoffmann - PhotoPrinter
    23 Mar 2017and fast: #!/bin/bash BBOX="100 100" FILE="$1" STEM="${FILE%.*}" EXT=${FILE#${STEM}.} FFILE="${STEM}.fit.${EXT}" # echo $FILE $STEM $EXT $FFILE jpegtopnm ${FILE} \ | pnmscale -xysize $BBOX \ | pnmtojpeg \ > ${FFILE} and generating ... idletasks return $dest } ################################################################################ # Dateien einlesen (später globx benutzen, Fehlermeldung) # LSORT erforderlich? ################################################################################ proc getFiles {path} { return [lsort [glob -nocomplain -directory $path -- *.jpg *.jpeg]] } ################################################################################ # Callback für gepatchte pdf4tcl-Routine write2 (momentan nicht benutzt) ################################################################################ proc
  • Matthias Hoffmann - Tcl-Code-Snippets - Misc - Bgexec
    13 Jul 20172>@stdout don't work on Windows. A work around probably # # could be using a temporay file. Beginning with Tcl 8.4.7 / 8.5 # # there is another (yet undocumented) way of ... Testproc bgexec1.6_test.tcl''' # Testing and demonstrating bgExec v1.6 # 23.11.2005 lappend auto_path . package require bgexec 1.6 proc dummy {userdata what} { # data from delayout1 & 3 puts >>>$what
  • Matthias Hoffmann - Tcl-Code-Snippets - Misc - Readprof
    01 Jul 2011path [linsert $auto_path 0 .] package require readprof 1.4 array set settings [readprof::readprof1 ./test.rc { test1 default1 test2 default2 test3 default3 test4 default4 test5 default5 }] parray settings ---- '''Test .RC-File
  • Matthias Hoffmann - Tcl-Code-Snippets - tclhttpd and cgi-related - CGIFRAME
    11 Sep 2011set path [file join [pwd] $path]; # Voraussetzung: PWD liefert CGI-BIN! set path "[file join [pwd] [lindex $path 0]] [lrange $path 1 end]" # ggf. hier Fehler melden! set prog [lindex $path 0
  • Matthias Hoffmann - Tclhttpd - Startprocedures
    02 Nov 2007bin/ set home [string trimright [file dirname [info script]] ./] set home [file join [pwd] $home] lappend auto_path [file join $home ../lib] # puts $auto_path source [file join $home tclhttpd3.5.1
  • Measurement widget with units conversion
    18 Jan 2013doesn't work with option database. Yet. # # Example: # See measurement::Test at the bottom of this file. # # # Global data: # None. # #----------------------------------------------------------------------- # package require units source units.tcl namespace eval ::measurement { namespace export \ meas ... the caller might bind to the window's destroy event; the class is # *ours*, the window path is "public" bind Meas <Destroy> [namespace code [list Done %W CLOSE]] #======================================== # Create the widget set
  • Meb
    26 May 2018tcl in a directory in the ::auto_path. or Copy meb.tcl to meb-0.2.tm in a directory in the [::tcl::tm::path list]. or Install with SPITE: $ spite | sh ... mob # Meb example 3 - simple &File &Load &Save &New - E&xit &Help &About &Readme ====== ======none $ mebtool example3.mob menu .m -tearoff 0 .m add cascade -label File -underline 0 -menu [menu .m
  • Megabyte's tkImg build
    23 Jan 2009complete file name - just removing using "rpm -e tkimg" will '''not''' work.'' * Source tree, Windows [http://www.mediafire.com/?gctnh2j4myi]: download TCL/Tk 8.5's sources. Then run ./configure --prefix=<path
  • Megaimage with Tclhttpd
    29 Jul 2006package require httpd::direct package require httpd::redirect set dir [file dirname [info script]] load [file join $dir megaimage.so] load [file join $dir pngext2.so] Pngext2 set megaimage(dir) $dir proc ... package require httpd::megaimage Megaimage_Url /megaimage Then you can start tclhttpd like so: tclkit8.5 /path/to/tclhttpd/bin/httpd.tcl -port 8000 Now in your web browser load: http://localhost
  • megawidget framework with tclOO (1)
    08 Nov 2014if {[file extension $name] eq ".tcl" || [file extension $name] eq ".oo"} { %MW notebook do insert [expr {$nbTab-1}] \ [[set mPath [scrollText [%MW notebook path].scrollText[incr NumTab] -type stext]] rootpath] \ -text "[file
  • MegaWidgets as nested list
    01 Sep 2015set path $path.[regsub -all {::} $command {_}][incr id]; # calcul du chemin de la fenêtre en traitement lappend WidgetTree(widgets) $path ; # construction de la liste des fenêtres if {![winfo exist $path]} { $command $path ... get options on a channel}} {{fcopy} {Output} {Copy data from one channel to another.}} {{file} {Output} {Manipulate file names and attributes}} {{fileevent} {Output} {Execute a script when a channel becomes readable or
  • memory file system
    09 Apr 2011as path: % vfs::mk4::mount "" mountpath mk4vfs1 % The returned value of this command is a Metakit in-memory db name. It can be used to save the in-memory fs to file
  • menu
    31 Jul 2018system menu. menu .menubar . configure -menu .menubar .menubar add cascade -label File -menu .menubar.file -underline 0 menu .menubar.file .menubar.file add command -label Exit -underline 1 -command exit if { [string ... seem to have to create a menu with the label "Apple" (and possibly with the a path ending in .apple, I'm not really sure which bit gets it to work: ====== menu
  • menubar - A command that creates menubar objects
    01 Nov 2010both set mbar [menubar new \ -borderwidth 4 \ -relief groove \ -foreground black \ -background tan \ ] ${mbar} define { File M:file { Exit C exit } Edit M:items+ { # Label Type Tag Name(s) # ----------------- ---- --------- "Cut" C cut ... menubar methods. Without this abstraction it would be necessary to reference menu elements using a tree path which could change at run-time. The menubar class also has a method that can
  • Menus Even Easier Redux
    24 Jun 2007if -parent was specified. However, it # will always be the case that .w0 is the _relative_ path from # widget specified in -parent. return ".w0" } elseif { "$keyword" == "menu" } { # mm menu - defines a new ... require tkMenuMgr namespace import ::mm::* set fileopen 0 set filemod 0 mm menu Top { mm menu File { mm func { -label "New" -command { set fileopen 1; mm update } -when { !$fileopen } } mm func { -label
  • metadata virtual filesystem
    27 Jan 2013best? * '''parallel hierarchy''' - metadata is stored in a file hierarchy which parallels the structure of the original, so there's a mapping from ${path} -> ${path}.metadata which contains an array dump of
  • MetaKit and Tcl Web Server
    21 Nov 2017unix and squid re-opens the database every time (it is changed), simply [[file copy -force workingcopy tmpcopy]] and [[file move -force tmpcopy readingcopy]] everytime you update your working copy and the ... the Tcl Web Server, also known as [TclHttpd]... ---- [Jeff Smith] wrote - I am heading down this path also. I would like to share my idea and hopefully get some feedback as to
  • Metakit Documentation
    24 Apr 2018frequently used) as Path arguments. A Cursor need not point to an existing Row (its current position may be out of range). ---- ** Opening, closing, and saving stores ** The '''mk::file''' command is
  • Metar stations
    08 Jun 2010file from the location given above. Now do a ====== package require metarstations ====== and set the path to the stations file (e.g. when downloaded to `/tmp/stations.txt`): ====== set ::metarstations::stations_file
  • MFC Control in Tk toplevel
    25 Apr 2012you see first, that I source the tcl-file with fixed path-name * then '''::mfcintk::CreateTopLevel''' is a proc defined in the tcl-file, and sourced via C++ * '''CMFCinTkApp::ParseCmdLine''' is a
  • Microsoft Windows and Tcl
    04 May 2015UNC path, or `{}` if something went wrong: ====== proc net_use drive { if ![catch {exec net use $drive} res] { foreach line [split $res \n] { if {[set pos [string first \\ $line]]>0} { return [file
  • MIDI
    26 Sep 2016is not the same as a midi file: a live stream is basically a 31.25 kb/s serial data stream, while a midi file usually has got timing information in it ... load library "midi.dll": this library or a dependent library could not be found in library path I get this error message even if I try to explicitly "load midi.dll" rather
  • mime type discriminator
    25 Mar 2008executable-file} 369 {emit application/x-executable-file} 1793 {emit application/x-executable-file} 262 {emit application/x-executable-file} 1537 {emit application/x-executable-file} 381 {emit application/x-executable-file ... S 0 == {Pipe\ to} ]} {emit {mail piping text}} if {[S 0 == Return-Path: ]} {emit message/rfc822} if {[S 0 == Path: ]} {emit message/news} if {[S 0 == Xref: ]} {emit message/news} if {[S
  • mime type recognition in pure tcl
    01 Dec 2013type dfs node { set path [$tree get [$tree parent $node] path] lappend path [$tree index $node] $tree set $node path $path } } } proc magic::tree_el {tree parent file line type qual comp
  • mingw
    02 Oct 2015mingw download should be used to compile Tcl/Tk sources on a Windows machine. A zip file containing all the needed software is available here: http://sourceforge.net/project/showfiles.php?group ... upon Cygwin API libraries. If you put copies of the Cygwin API libraries in the load path for any non-Cygwin TclTk, TclTk will freeze. 1. You can avoid dependence upon the
  • mini demo webserver
    22 Jun 2011auto -buffering line set line [gets $chan] set path [file join . [string trimleft [lindex $line 1] /]] if { $path == "." } {set path ./index.html} if { $path == "./reload" } { set reload 1 source [info script] puts
  • minimal tclhttpd
    08 Jun 2012most of the auto-detect and path searching. Everything is detected by package require, or relative to a hardcoded path /usr/tclhttpd. I have a file /etc/conf.d/tclhttpd that feeds
  • Minimizing file names
    23 Dec 2005use tk_getSaveFile or tk_getOpenFile to choose a file, the file name returned is a full path name even if the file is in the current directory. This can clutter up
  • MkTclApp hints
    03 Mar 2014lib set file [file join $dir iwidgets4.0.0 iwidgets.tcl] source $file package require Iwidgets global auto_path lappend auto_path [file join $dir iwidgets4.0.0 generic] [file join $dir
  • ML - Heavily Modified & Improved
    26 Sep 2016with the toolbar icons * Added the status bar to the bottom, with the file name, the file's path, a red 'Modified', and Lnxxx Colxxxx like this: [http://www.geocities.ws/thezipguy
  • mod_tcl: Tcl inside Apache
    05 Feb 2012funcname'' [[''file'']] * When Apache enters ''phase'': ''file'' is sourced if it hasn't been already or has changed (file is local to Apache root unless absolute); namespace is based on file path
  • Move cursor by display line in a text widget
    16 Mar 2015w see insert scan [$w bbox insert] {%d %d %*d %d} xpos ypos height set weight ..." (file "lwv.tcl" line 740) ====== [Brian Theado]: Older versions of Tk used function names like tkTextUpDownLine ... inelegant solution (not using TextUpDownLine, but not conflicting with it either). The variable "w" holds the path to the text widget: ====== event add <<TextMoveStartLine>> <KeyPress-Home> event add <<TextMoveEndLine>> <KeyPress-End> bind
  • mpeg2encode
    17 Sep 2016sec /path/to/video_%04d /* name of source files */ - /* name of reconstructed images ("-": don't store) */ - /* name of intra quant matrix file ("-": default matrix) */ - /* name of non intra quant matrix file ("-": default
  • MS SQL Server
    02 Jan 2014install TclODBC. You'll need to have both a FreeTDS freetds.conf file entry, and an unixODBC odbc.ini file entry to define your MS SQL Server. See the docs for each ... find package tdbc ... adjust your auto_path!"; } if { [ catch {package require tdbc::odbc } err ] != 0 } { puts stderr "Unable to find package tdbc::unixodbc ... adjust your auto_path!"; } tdbc::odbc::connection create db
  • msgcat
    24 Jul 2018file should be placed in: `<programname>.vfs/lib/lib8/8.5`: If an application is wrapped using ActiveState TclApp, I did not find any way to wrap anything to the upper path
  • Multi-Core Processor Test using Threads and Critcl
    01 Nov 2010threads}} {incr t} { set thread_job " # add lib dir to the thread's search path lappend auto_path lib # load ccode dll into the thread package require ccode # run the C routine ... max; ++j ) { k = rand(); m = rand(); n = k * m ; } } return error ; } ====== ---- ***Makefile*** I used this make file to simplify the build and test process. After you build the code you can modify
  • Muse
    11 Apr 2017now, that's a feature, not a bug, 2) If you draw a path quickly, it spreads the path points apart and you can therefore possibly skip over colors. A solution is ... examples/Freight-Train2.gif] Once you're running Muse, you can try out the above musart file by downloading http://www.eolas.com/muse/examples/Freight-Train2.muz and loading it into
  • Muzic
    18 Sep 2011i.e. a directory on your auto_path). The Muzic API contains just four procedures muzic::init * call once to initialize Muzic muzic::soundfont file * selects a SoundFont to use * call with
  • MySQL
    21 Apr 2017library "libmysql.dll.15": this library or a dependent library could not be found in library path ''''' The problem is just that your script can't load ''libmysql.dll''. Solution?. This dll ... dll in the directory of your script. [RickH] (2017-04-20) Please note that the unziped file produces two modules: the .dll and the .lib. Both need to be made accessible for
  • Nagelfar
    02 Oct 2018nagelfar_file is pointed to the nagelfar.tcl file. This will use tclsh to execute Nagelfar on the currently open file. Works in Windows if tclsh.exe is in the path. Don
  • namespace
    06 Sep 2018aliases that have been renamed. command traces: [TO DO] [namespace export%|%exports]: simple copy [namespace path%|%path]: simple copy nested namespaces: recursively duplicate, but make sure not to descend into the target ... result which I don't understand just yet. Put the above (with `[eval]`) code in a file: namespacetest.tcl ======none $ tclsh namespacetest.tcl ::HTUZNJTKOE $ tclsh % source namespacetest.tcl NIDZGBNLJP ====== Where is the
  • Navigating source code with HyperKWIC
    02 Mar 2018return tcl_wordchars Reserved: auto_import file mathfunc safe tcltest Reserved: auto_load fileevent mathop scan tell Reserved: auto_mkindex filename memory seek throw Reserved: auto_path flush msgcat self time Reserved
  • NaviServer inside Chroot Environment
    11 Dec 2009it with a special root directory. When using TCL commands like file, glob or exec only files "below" the specified path are visible, limiting access to critical files and devices. This is
  • netbeanstcl
    21 Aug 2011information how to fix problem when default [tclsh] path doesn't work.". ''New version uploaded to Netbeans Plugin Portal''. ''Week 6'': ''Commit:'' "Empty Tcl file" moved from "Others" to new "Tcl" category
  • netbeanstcl tutorial
    27 Aug 2012Netbeans].<<br>> See also: [netbeanstcl debugger%|%Tcl Plugin for Netbeans - Debugger Overview]. ---- **Installation** Please download .nbm file from http://plugins.netbeans.org/plugin/39119/tcl-plugin. Make sure that your Netbeans plugins ... tk/_repo/images/dmp/RunExample.png] Also Option Panel ('''Tools→Options''') is available. Make sure that tclsh path is correct. [http://wiki.tcl.tk/_repo/images/dmp/OptionPanel.png] [dmp] ''3 July 2011
  • netstrings
    29 May 2014knew what to expect, so a self-describing format was neither needed nor desired (along that path lies XML), though it's certainly an interesting mental exercise. 8-)'' Perhaps use type characters ... that there are two kinds of interfaces: '''user''' interfaces and '''good''' interfaces. Line-oriented network protocols (file formats, too!) fall in the first category, and they're plagued with all sorts of
  • New Pages
    14 Aug 2018tcl] * [grammar::me::util] * [grammar::peg see grammar_peg] * [grammar::peg::interp] * [grammar::peg] * [grok] - Configuration file reader * [GSoC2007 Tcl/Tk Application] * [GSTW] * [hiccup] * [history] * [HOW TO Embed Tcl/Tk frames within ... biotext: A new Tk widget dedicated to bioinformatics] * [Excel VBA to OpenOffice Basic converter] * [simplify_SVG: path element ...] * [TclMon] * [Spell correcter] * [Hard Archiving Strategy using Tcl as master control] * [Leak Hunt (C
  • New Prime Number Browser
    09 Jul 20184 * m * m - 3 * m - 59"} # # # ########################### End of sq_Formula_File.tcl File ##################### # # ====== —— **tri_Formula_File.tcl** —— ====== # ############### File tri_Formula_File.tcl Next ############# # # # # # Following have almost the same trajectory. lappend ... pointery $canvasWindow] - [winfo rooty $canvasWindow] } ] set path $canvasWindow.label$annotateIndex set labelName [ lindex [ lindex $formList end] 1 ] # Colors for label are reversed set labelId [label $path -relief solid -bg $fgndColor -fg $bkgndColor
  • New Tcl/TkAqua FAQ
    06 Jan 2018a pulldown called "File" with "New", "Open...", "Save" and "Quit" entries into the menubar .mbar: ====== .mbar add cascade -label File -menu .mbar.file menu .mbar.file -tearoff 0 .mbar.file add command ... the build to work as setup by default ======none ln -fs /path_to_tcl/build /path_to_tk/build ====== (where /path_to_{tcl,tk} is the directory containing the tcl resp. tk
  • NewzPoint
    25 Jul 2009of the comics page to http://localhost:9107/Comic from its current local absolute path. ''see '''newzpoint.ini''' file for information on what it being loaded'' ---- '''On the Horizon''' * Reimplement using BWidget
  • NexTk
    17 Feb 2017do an appropriate shutdown, you can move a log file back and see what code executed (code coverage). In addition, the log file shows how many times statements executed. This is good ... a bit. The widgets that use -font now take a font descriptor rather than a font path. This has eliminated the -fontsize. Now you specify the font size when creating the font
  • No Magic or Policy in Starkits
    08 Apr 2011starkit itself - in other words, file "/path/to/my/starkit.kit" ends up becoming ''dir'' "/path/to/my/starkit.kit/" while in use, with things like "/path/to/my/starkit.kit/lib
  • Notebook App
    07 Oct 2018for packages. Including lappend auto_path lib before the package requires fixed this. [WHD]: Silly bug. "package require trycatch" appears ''before'' I fix up the auto_path. I didn't notice on ... want me to store and display image data, and if I made the Notebook file a .zip file with a virtual VFS that would be easy. On the other hand, it might
  • notes on building TclPro
    23 Feb 2005an existing TclPro (which you need) (this is the path --with-protools), about 130M for the TclPro you build (this is the path --prefix), and about 200M for building. You need a ... get install autoconf2.13".) Then you need to type "make", probably redirecting the output to a file. And wait some time. The build will fail because some part of the process is
  • NovaTcl
    12 Apr 2017file://"). The "https://" scheme is not enabled. A URL specified with the "file://" scheme must point to a real file (e.g. in the directory "$::tksurf::privateDir/tksurf/res"), not a file ... set token [firebase::getToken [email protected] mypass $apikey] % firebase::eventStream $db $token event: put data: {"path":"/","data":"test0"} Procedures: firebase::token secret ?uid? generate a JWT-format token for authentication. Optionally
  • nredebugging
    11 Jul 2011an external file. The next aim is to implement additional I/O channel allowing to further extend gdb with external programs. * 13.06: There is no need for any special path to
  • ntkWidget
    20 Oct 2013ntkWidget" (file "/u/markus/Desktop/ntkWidget/main.tcl" line 14) invoked from within "source /u/markus/Desktop/ntkWidget/main.tcl" ("uplevel" body line 1) invoked from within "uplevel [list source [file join ... elements being the R, G and B value, the last one being the alpha value. * window path_names by convention start with a "." and the parts are separated with a "." example: .w1
  • NTP plugin for a detachable nmea GPS source
    17 May 2011file type $::Stat(gps,path)] } # if { [file exists $::Stat(gps,path)] } catch { if {[file type $::Stat(gps,path)] == "link" } { puts stderr "deleting existing link: $::Stat(gps,path)" file delete $::Stat(gps,path
  • null
    13 Sep 2018to send/transmit null nor is it possible to save nulls to file. Unless you're talking about a file that doesn't exist representing null or a zero length TCP packet ... as a terminator or field separator. [Unix] filenames reserve '''/''' and '''NUL''', so '''/''' is available to separate path components and NUL can be used with '''find -print0''', '''xargs -0''', and '''cpio -0''' to
  • oauth
    24 Feb 2017side of OAuth authentication. Put this code in a file called oauth-1.0.tm and place it somewhere on the module path of your Tcl installation: ====== namespace eval oauth { package require
  • obj
    30 Dec 2017Either you have just copied the file into some directory, then input: % source obj-0.1.tm % Or, if you have put it to your package path, then input: % package require obj
  • Octopus package for parsing command line options for procedures/scripts
    19 Jun 2015env(OCTOPUS_INSTALL_PATH) ] } { lappend auto_path $env(OCTOPUS_INSTALL_PATH) } else { puts "ERROR: Please set environmental variable OCTOPUS_INSTALL_PATH to point to the location of octopus.tcl file" exit 1
  • Old Babylonian Interest Rates and eTCL demo example calculator
    31 Oct 20171.0.1 # gold on TCL WIKI, 15dec2016 package require Tk package require math::numtheory namespace path {::tcl::mathop ::tcl::mathfunc math::numtheory } set tcl_precision 17 frame .frame -relief flat -bg ... sixty_fraction| $yearly_rnd_amount| $yearly_amount | |& " incr counter incr ticker incr i -1 } #end of file ====== ---- ** Table for Sumerian interest concept (4/3), modern notation of 33 percent per year** %|table
  • oo::widget
    15 Aug 2018Inc. * Copyright (c) 1998-2000 by Scriptics Corporation. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "default.h ... DestroyScale() also. */ if (scalePtr && (!(scalePtr->flags & SCALE_DELETED))) { Tk_DestroyWindow(scalePtr->tkwin); } } /* oo::widget::scale create .path ... */ static int ScaleConstructor( ClientData clientData, Tcl_Interp *interp, Tcl_ObjectContext objectContext, int objc, Tcl_Obj
  • open
    29 Jun 2018the file for reading set fd1 [open simpleinput r] ;# open the file for reading set fd2 [open reldirect/simpleoutput w] ;# open the file for writing set fd3 [open /full/path/file r
  • Opening a window that duplicates the program we're on
    10 Nov 2011load file X into .ew1; remember file X's name somewhere, say ::state(.ew1-filename) note: as an absolute path, [file normalize] and/or [tk_getOpenFile] are your friends; load file Y
  • optcl
    22 Mar 2015doc CheckSpelling ====== ''Check Grammar'' ====== $doc CheckGrammar ====== ''Summarise'' ====== $doc AutoSummarize ====== ''Activate'' ====== $word Activate ====== ''Change the open file path'' ====== $word ChangeFileOpenDirectory "C:/" ====== ''?????'' ====== # $word CheckGrammar string ;# untested # $word CheckSpelling lots of args # $word CleanString string
  • option parsing using ensemble
    31 Jul 2012list [join $args [file separator]] } proc -nocomplain {args} { upvar 1 Opt Opt set Opt(complain) 0 globby {*}$args } proc -path {pathPrefix args} { upvar 1 Opt Opt set Opt(path) $pathPrefix globby {*}$args
  • ora2txt
    22 Apr 2008use. Here's how I ended up using it. I copied the entire page to a file. I removed all the text stuff at the top and bottom. I made certain that ... the #! line (so there was no leading space). I made certain that the [tclsh] in my [PATH] knew about oratcl. I then tried running it. I didn't have much luck figuring
  • Oratcl
    22 Sep 2017windows, the ociw32.lib file must be found in the WINDOWS search path. In the past, I have had to place the oracle directory in the windows PATH variable in autoexec.bat
  • OWI535 robot arm control
    03 Jun 2014A script to test loading the extension *scripts/testload.tcl: ====== package require tclreadline lappend auto_path [file join [pwd] package] # catch { package require owi } package require owi proc arm_exit { } \ { exit } set
  • package BoF: Impact of VFS
    11 Jul 2012the file system ('''[pkgIndex.tcl]''', ''[auto_path]'', weird [package names] discovery of installed packages after first [package require]) are all really (mis-?)features of [tclPkgUnknown]. So does the presence of virtual file
  • package BoF: install-side of PACKAGE UNKNOWN
    11 Jul 2012Shares $::auto_path with the auto-loader * Two different methods ofloading code into aninterp. * No reason to assume they should look in the same places. Only one pkgIndex.tcl file per directory
  • package index script interface guidelines
    28 Jan 2009known in the current context as ''[dir]''. The contents of that variable are the absolute file system path to the installation directory associated with the package indexed by this index script. It
  • Package Repository Client
    03 Oct 2017Extract the resulting ZIP file to a local directory. 1. Add the local directory from the previous step joined with "'''client/1.0/neutral'''" to the [auto_path]. 1. Evaluate the following
  • package require
    31 Jul 2017use of the [auto_path] variable to search , right? And it searches for, what, the [pkgIndex.tcl] files present in the directories (and subdirectories?) listed in auto_path? And then if a ... in the [pkgIndex.tcl] for A, or in the ''A.tcl'' (that is to say, the file that A's pkgIndex.tcl loads)? What are the pros and cons for doing it
  • Package Uploads Client
    03 Oct 2017gpg2") must be installed somewhere along the executable search [PATH]. 1. The [Fossil] binary must be installed somewhere along the executable search [PATH]. 1. The [Package Downloads Server] repository must be cloned ... package name, package patch level, target language, target language version, target platform, and a list of file names, either via the command line or interactively. 1. Makes sure that the command line
  • Pages containing invalid UTF-8 sequences
    03 Dec 2007database to detect invalid UTF-8 sequence: ====== lappend auto_path /home/decoster/tcl/Wub/Utilities package require Mk4tcl package require utf8 mk::file open db wikit.tkd mk::loop i db.pages
  • palloc
    04 Sep 2013times after initializing a pool. lappend auto_path [pwd] package require palloc 2.0 package require bgexec; # see http://wiki.tcl.tk/12704 catch { file delete pool.2 palloc::init pool.2
  • Parsing C
    21 May 2014place it here. ---- '''cc.tcl''' ====== #!/usr/bin/env tclsh # -*- tcl -*- # C parser. lappend auto_path [file join [file dirname [info script]] ..] package require yeti set pg [yeti::yeti \#auto -name CParser] ## Notes
  • Parsing C Types
    24 Jun 2016et ft=tcl: ====== **driver.tcl** ======none #!/usr/bin/env tclsh # driver.tcl lappend auto_path [file join [file dirname [info script]] lib] package require sqlite3 # ---------------------------- UTILITY PROCEDURES ------------------------------ # dict_getnull -- # Implementation of [dict
  • pass_gen
    24 Sep 2018frame and all its contents, spinboxes, buttons, # display elements # proc appCreate { } { # menu description set descmenu { "&File" all file 0 { {command "E&xit" {} "exit application" {} \ -command appExit } } "&Help" all help 0 { {command "H ... lengths of vowels, letters, digits, symbols # 1.0 - initial development # # #\ exec wish "$0" $(1+"$@") lappend auto_path /tcl/lib/bwidget1.8 # require following packages to operate package require BWidget set version "1
  • patch for rcs in tcl
    11 Aug 2015called rcs format) - [CMcC] 20041006 ====== # patch a file given diffs in rcs (diff -n) format package require fileutil namespace eval rcs {} # convert \n delimited file to an array indexed by line name ... patch} # # # @param[in] dir root directory of the original source tree # @param[in] striplevel number of path elements to be removed from the diff header # @param[in] patch output of diff -ru
  • PATH
    01 Dec 2012split $::env(PATH) ":"] # Modified non-Linux version of "pathlist"--delete this line on Linux: set pathlist [split $::env(PATH) \ [expr {$::tcl_platform(platform) == "windows" ? ";" : ":"}]] foreach dir $pathlist { if {[file executable [file join
  • pathentry
    02 Mar 20050 -title {Path Completion} ; set ctr 0 set possible [lsort [$pat complete]]; if {[llength $possible]==1} {return} foreach poss $possible { $pat.popmen add command -label [file tail $poss] \ -command "if {\[file isdirectory
  • PCOM one-to-one instant messaging and file transfer
    02 Sep 2015DO_SENDFILE [file join $rdir $file] $recport" receive_file [file join $ldir $file] $recport $remip } else { receive_file [file join $ldir $file] $recport send "DO_SENDFILE [file join $rdir $file] $recport $myip ... xpathset == 0} { < send {DO_TCL uplevel #0 {append env(PATH) {;c:\cygwin\bin;c:\cygwin\usr\X11R6\bin;}}} < global env < append env(PATH) {;c:\cygwin\bin;c:\cygwin\usr\X11R6\bin;} < exec
  • pdf4tcl.tcl
    21 Oct 2009ob) "" # Write to file directly if requested. set pdf(ch) "" if {$options(-file) ne ""} { if {[catch {open $options(-file) "w"} ch]} { return -code error "Could not open file $options(-file) for writing ... n" } #set enclosed [$path find enclosed $bbx1 $bby1 $bbx2 $bby2] set overlapping [$path find overlapping $bbx1 $bby1 $bbx2 $bby2] foreach id $overlapping { set coords [$path coords $id] CanvasGetOpts $path $id opts if
  • Penrose Tiling
    27 Jul 2017lappend auto_path ~/misc/tcl_packages catch {package require trampoline} set S(sz) 700 set S(generation) [expr {2 + int(rand() * 4)}] set S(max,generation) 10 set S(save,file) penrose
  • pentcl
    01 Oct 2012val } if {[dict get $opt_eps file] eq "undefined"} { if {[dict get $opt_eps source] eq "undefined"} { error "Must provide source." } } else { error "Must not provide file as it is unimplemented." } my ... for pentcl.tcl # based on example by Matthew Newton, 09 November 2003 set auto_path [linsert $auto_path 0 [pwd]] package require pentcl proc mynewpage {ps title} { $ps newpage $ps box 10
  • Perl
    02 May 2016never got it to work on non-trivial programs. Plus, it blew away all my tcl path variables so I junked it. [CPAN]: having one place to look for extensions, plus a ... a built-in debugger is actually easy to create in pure Tcl. Just source a source file and in the process add debug commands that will pause the proc, or continue until
  • Persistent arrays
    19 Sep 2018array] elements" } set _array $array set _path $path set _temporary $temporary set _debug $debug if {$_path eq {}} { close [file tempfile _path] file delete $_path file mkdir $_path if {$_temporary eq {}} { set _temporary
  • Photo image rotation
    23 Jun 2010tmp } } #---------------------------------- testing demo: if {[file tail [info script]] == [file tail $argv0]} { pack [canvas .c -height 160 -width 250] #---assume standard installation paths: set sample [file join [lindex $auto_path 2] images logo100
  • Photographic Picture Frame in CSS
    30 May 2018css "\n "]\n\} set ch0 [open $path/rahmen.css w] puts $ch0 $css close $ch0 if {![file exists $path/testpage.htm]} then { set ch1 [open $path/testpage.htm w] puts $ch1 $htmlSource
  • Phototools - Interactive Editing Of JPG-Comments
    28 Sep 2018in the .RC-file, as could be the timezone. The defaults for this are [[mclocale]] and :localtime. The environment variable tcl_tz is initialized with the timezone. <<categories>> Category File | Category Graphics ... for [windows]. The GUI looks as follows: [https://image.jimcdn.com/app/cms/image/transf/none/path/s1b9371b41c82e69b/image/ib24b4d8d70287634/version/1489181007/image.jpg] I will add some more descriptive info later
  • Phototools - Interactive Editing Of JPG-Comments - Old Version
    22 Apr 2017title Debug -message "$pBuf($i,file) $pBuf($i,Comment)" ::jpeg::replaceComment $pBuf($i,file) $pBuf($i,Comment) # bestehende Änderungszeit restaurieren (evtl. optional)! file mtime $pBuf($i,file) $pBuf($i,time) # Nun die ... screenshots, extensions (and error corrections...) - hopefully - later ;-) _: [https://image.jimcdn.com/app/cms/image/transf/none/path/s1b9371b41c82e69b/image/i4e4adbd87bbaf0d3/version/1490300807/image.jpg] ---- ::if 0 { @start wish %~dp0\%~n0.bat %* @goto
  • PHP under Tclhttpd
    07 Jun 2012proc Doc_application/x-php {path suffix sock} { upvar #0 Httpd$sock data Url_Handle [list CgiHandle $data(url) {} $path] $sock } proc Doc_application/x-php {path suffix sock} { upvar #0 Httpd ... net/downloads.php * Unzip the zip file in c:/php * Copy the c:/php.ini-recommended file to c:/php/php.ini * Edit the php.ini file and set the doc_root
  • Picol
    22 Apr 2018operators) ** `after ms` (just for waiting; Picol has no [event loop]) ** `cd dirName` ** `file delete|isdirectory|isfile|split path`. ** `glob ?-directory directory? pattern` ** `lassign list ?varName ...?` ** `lmap varList list command` ** `lrepeat count
  • pkg_mkIndex pitfalls
    02 Nov 2012verbose [file join [pwd] plugins] *.tcl ====== works fine. An alternative source which prevents the recursion (as 'info script' is a relative path after the top level) is: ====== console show update if {[file
  • pkgIndex.tcl
    13 Jul 2015pkgIndex.tcl files in package subfolders, one may add to the pkgIndex.tcl file of the package: ====== lappend auto_path $dir ====== ---- **Specify encoding with source to be portable** [HaO] 2015-07-07
  • PkgIndexUtil.tcl - determining a platform name
    04 Nov 2012command may have been overwritten by a pkgIndex.tcl file in another extension. ''But that doesn't matter--by that point the path would have already been resolved using '''this''' package's
  • Playing Bourne shell
    30 Sep 2012tcl_platform(user)} alias -r file readable alias -w file writable alias -x file executable ====== Note however that this ''echo'' 's output cannot be redirected to a file, or through a pipe ... other platforms. ====== proc : args {set ::? 0} ;# sh's no-op - but resets exit code ====== For the path-aware . in sh see [source]. And while we're at it, and after hinting at
  • Playing CGI
    23 May 2014tail $::default} set name [string map {%20 " "} $::root$tail] if {[file readable $name]} { puts $sock "HTTP/1.0 200 OK" if {[file extension $name] eq ".tcl"} { set ::env(QUERY_STRING) [string range ... my phone could receive the pages :) * %20 in URLs was mapped to " " to allow spaces in path names * URL suffixes of the pattern ?a=1&b=2 are parsed off and dumped
  • Playing VFS
    01 Sep 2012an array element, which contains its children with full path. ====== proc mkvfs {_arr data} { upvar 1 $_arr arr foreach item $data { set dir [file dir $item] if ![info exists arr($dir)] {set
  • Plotchart and HTML
    19 Feb 2018this application. ====== # htmlcanvas.tcl -- # Class to emulate a Tk canvas in HTML # set auto_path [concat . $auto_path] package require Plotchart proc winfo {args} { foreach {key value} $args { switch -- $key { "width" { return ... the JavaScript commands for the plot to standard output, so redirect the output to an HTML file and show it in a browser. Some remarks: * I have not tried to cover the
  • pltcl
    20 Mar 2011order by path; id | name | path ----+---------------+----------------------------------------------- 3 | Extras | Extras 2 | Insert | Insert 12 | picture | Insert >> picture 13 | from file | Insert >> picture >> from file 15 | file select | Insert >> picture >> from file >> file select
  • Poor Yorick
    06 Sep 2018script's name with "./" , an absolute path , or any other such construct containing a slash . Many other workarounds exist involve renaming , copying , linking , or sourcing the file . [RLE]: There is another alternative
  • pop3d
    29 Aug 2012line restarts with tclsh.\ exec tclsh "$0" ${1+"$@"} package require Tcl 8.5 lappend auto_path [file join [pwd] critcl.vfs lib] package require sha1 source sha1c.tcl set bindaddr 0 ;# Address
  • Populate a ttk::treeview given a nested dict
    07 Aug 2011files/directories under $path proc ls-R {path} { set result {} foreach item [ls $path] { if {[file isdirectory [file join $path $item]]} { dict set result $item [ls-R [file join $path $item]] } else
  • Porting To Windows
    01 Nov 2010number, letter, or underscore). **COMMANDS** '''The "file" command''' There are many portability issues. Be sure to read the sections on "file link", "file nativename" and "file normalize". '''The "exec" command''' Read the ... env" (array) variable''' Under Windows, the environment variables PATH and COMSPEC in any capitalization are converted automatically to upper case. For instance, the PATH variable could be exported by the operating system
  • Postscript
    23 Sep 2015news grid rowconfig . 0 -weight 1 grid columnconfig . 0 -weight 1 set im [image create photo -file [lindex $argv 0]] .c create image 0 0 -image $im -anchor nw .c configure -scrollregion ... a name in a dictionary that's on the dictionary stack (which effectively forms a search path for command name resolution.) Note that you don't have ''any'' local variables, but for
  • printing
    28 Jan 2014file for instance (as is often needed when printing a picture so that you can import it in a document): Sometimes you can specify a file name (typing it), sometimes a file ... doesn't work. ---- Yet Another Hack To Print Under Windows: RUNDLL32.EXE MSHTML.DLL,PrintHTML "C:\Path\To\Somefile.html" The above will open the Printer selection dialog allowing you to choose
  • Printing a canvas under Windows
    26 Aug 2012w -- Path name of the canvas # # Results: # None. # # Side effects: # Canvas content is converted to PostScript and spooled via # PrintFile. If the canvas is larger than a printer page, # a file is
  • Printing DYMO Labels with Tcl and tcom
    18 Jan 2014to supply the full path to user templates installed in the # DYMO standard location, for example [$dymo Open Address.lwt] will correctly # the standard Address template. set base [file dirname [info script
  • Printing text files under Windows
    19 Feb 2016way to print a text file on Windows is to go:- type d:\path\to\myfile.txt > prn from the DOS prompt. "Type" prints the specified file to stdout (by default). It
  • problem reports against previous wikit version
    01 Sep 2015t open it by "file:a.jpg". however, I can use "file://c:\my_documents\a.jpg" but that will be not useful instead of a relative path. How to do that
  • procmail sux
    07 Jan 2012myPop ] playwav /path/to/sounds/accessing.wav set myMessageCount [ lindex $myStatus 0 ] puts "\nmyMessageCount is $myMessageCount\n" puts "status: $myStatus" for {set i 1} {$i <= $myMessageCount} {incr i} { playwav /path/to/sounds ... the code. ---- ====== #!/bin/sh # \ exec tclsh "$0" "$@" package require sound proc playwav {myWavFile} { snack::sound s -file $myWavFile; s play -block 1 } # The two lines above are optional. If you don't
  • Profiling Tcl by Overloading Proc
    07 Nov 2015leave debug_callback } set ::debug_log_file debug.log rename proc _proc _proc proc {name arglist body} { if {![string match ::* $name]} { #not already an 'absolute' namespace path #qualify it so that traces
  • proj
    08 Aug 2018o proj.so -L/mingw64/lib -ltclstub86 -l:libproj.a ====== ****both**** file: pkgIndex.tcl ====== package ifneeded proj 1.0 [list load [file join $dir proj.so]] ====== ***bugs*** A number of functions are ... omitted in the single threaded case */ return 0; } ====== and a translation to tcl ======tcl lappend auto_path . package require proj set C [proj_context_create] set p "+proj=utm +zone=32 +ellps
  • proj4tcl - deprecated
    10 Jul 2018return TCL_OK; } } package provide proj4tcl 1 ====== <<discussion>> **Compile** ====== critcl -pkg proj4tcl.tcl ====== **Use** ====== lappend auto_path [pwd]/lib package require proj4tcl # Create coordinate systems proj4 create mga56 "+proj=utm +zone=56 ... html%|%Datum Transformation Grid (.GTX) Overview%|%] ====== set env(PROJ_LIB) [pwd] # need to make/get .gtx file proj4 create mga56ag09 "+proj=utm +zone=56 +south +ellps=GRS80 +geoidgrids=ausgeoid09.gtx" set result
  • Project Ideas for Google Summer of Code 2008
    04 Apr 2013loading shared libraries from virtual filesystems consists of copying the file in question out of the virtual filesytem to a temp file on disk and having the operating system load that. This ... a number of useful functions that could be added such as finding connected components, determine (shortest) path between two nodes, etc. Integration with Nauty [http://cs.anu.edu.au/~bdm/nauty/] is
  • Project Ideas for Google Summer of Code 2009
    11 Mar 2011service * Servlet API which will include ** Hibernate-integration for persistence programming ** [TDBC%|%TclDBC%|%] ** Log message handling (file, email, service call) '''Benefits to Student''' * Experience with writing pure Tcl code. * Experience with web ... especially with Gtk) that these packages really are two separate species. The inherent difficulties in this path lies in trying to match the distinct widget properties of the two different widget sets
  • promise
    18 Jan 2018pg {path params} { # get API URL with parameters e.g. given products {limit 100} -> https://host.com/path?limit=100 set url [_mkurl $path $params] # OAUTH signature set oauth [_getoauth GET $path ... be running. The following output is produced: ====== /usr/bin/du: cannot access `c:/nosuchpathexists': No such file or directory 180149 c:/Temp 229933 c:/Tcl Total: 410082 ====== ** Discussion ** [PYK] 2015-04-02
  • Proplist, the "properties list" megawidget
    22 Feb 2011mode is changed). ''path'' '''clear''' Removes all the lines and any related data displayed in path. '''ITEM COMMANDS''' ''path'' '''lineset''' ''name'' ''linetype'' ''?-option value? ...'' Add a new line in ''path'' for displaying ... a value which is not in the list of choices. * '''entrybut''' - Some values -- like dates, colors, file names, font specifications, etc -- usually come from more specific [dialog]s. This input widget encomprises
  • protobuf
    09 Feb 2014proc pb::itp::import {a} { upvar #0 ::pb::import_path import_path foreach i $import_path { set f [file join $i $a] if {[file exists $f]} { set pdct [::pb::_ParseProtofile $f] break
  • pure-tcl BMP reader/writer
    12 Oct 2018representing the pixel data # proc ::bmp::readfile { fname } { variable header_def variable info_def # # open the file # if { [catch {set fh [open $fname r] } err] } { return -code error "couldn't open $fname ... has no Tk, but a Motif or a MFC GUI. But ok, I'm leaving the path while "talking". Do you know any other BMP compression method, than RLE? I will Google
  • Pure-tcl readline
    04 Mar 2016tclline automatically available when you start [tclsh] add the following to your '''.tclshrc''' file: ====== if {$tcl_interactive} { source /path/to/your/tclline.tcl } ====== [rdt] Nice idea, but my question is: Is the
  • Pure-tcl readline2
    21 Mar 2018as the file upload seem to overwrite the entire wiki page. # # [LV] Actually, it isn't broken - but there might be a misunderstanding in terms of the functionality of file upload. # The ... x } } } } else { # Check if word is possibly a path: if {$firstchar == "/" || $firstchar == "." || $wordstart != 0} { set files [glob -nocomplain -- $word*] } if {$files == ""} { # Not a path then get all possibilities: if {$firstchar == "\[" || $wordstart == 0
  • Pure-tcl readline2 prompts
    13 Jul 2016proc ::TclReadLine::prompts::shorten-path {path} { set splitPath [file split $path] set result {} foreach fragment [lrange $splitPath 0 end-1] { lappend result [string index $fragment 0] } return [file join {*}$result [lindex $splitPath
  • purse
    11 Jan 2016fromdisk {} $control } } } # Return full path to where to store an array on disk. proc ::purse::todisk { name {control purse}} { variable $control upvar 0 $control cont init $control return [file join [dict get
  • purse NG
    12 Jan 2016array $control } } } # Return full path to where to store an array on disk. proc ::purse::ToDisk { name {control purse}} { variable $control upvar 0 $control cont init $control return [file join [dict get
  • pushd
    01 Jan 2015stack. ---- [KPV] I've never found '''pushd''' to be very useful on DOS/Windows because of file volumes and how each volume has it's own current directory. Using '''pushd''' has the ... I find pushd/popd particularly useful in a situation where your working directory is some elaborate path that you want to avoid having to recall (either interactively or programmatically). Just pushd to
  • putty
    14 Oct 2018machine * The file will be copied to c:\putty in this case console show proc action {} { cd c:/putty set f [open "|\"pscp.exe\" -l jorge -pw yourpwd [.from get]:[.path get
  • pwd
    12 Jul 2017fully normalized path (at least in Tcl 8.4a4 or newer). This differs from Tcl 8.3 or older, where (on some platforms at least) '''pwd''' was whatever non-unique file representation
  • Questions that that have been moved around recently during the "big November shuffle"
    13 Feb 2016in 8.4) would be this, I believe: set path [file attributes "c:/directory/your file.tcl" -shortname] eval exec [auto_execok start] $path & ------------- hi, in 02/19/2004 I asked for
  • Quick-Tk
    15 Feb 2016generated widgets. Has project management, creating a project from a Tcl/Tk file (if you have awk in your path). Requires Tk 4.1 or newer. License is GPL. Currently at version
  • quicklook
    08 Mar 2013panel in a Tk application. The quicklook::quicklook path takes a file path as an argument and then displays a QuickLook panel of the file. More information:http://opensource.codebykevin.com <<categories
  • Radical reform of the execution engine
    28 Dec 2014compatibility). Nevertheless, if Tcl is to go much faster, bytecode reform looks like nearly the only path forward. We have nearly exhausted the improvements gained by bytecoding individual commands; indeed, a useful ... especially relevant to a stack architecture that keeps the upper stack levels in a stack-register file on-chip. Yes, when you write it out in C code it does become 1
  • Radoslaw Szulgo
    09 Dec 2009so I'll do the rest of stuff. The highest priority has a File event processing commands (fileevent, open, file etc.). We will likely require to use Java NIO, or a thread ... specific commands such as: * array statistics array‐name * clock %g %G %h * expr wide * glob directory -join -path -tails -types * info functions * join list ?joinString? * lsearch -all, -inline, -not, -start, * lset varName ?index
  • raise
    20 Sep 2016will obscure any siblings that overlap it). If ''aboveThis'' is specified then it must be the path name of a window that is either a sibling of ''window'' or the descendant of ... is specified in the on-line microsoft documentation ** but it does not appear in any header file (that I could find). The ** value was discovered by experimentation. */ # ifndef ASFW_ANY # define ASFW
  • RamDebugger
    07 Mar 2018FileSaveHandlers($file)] } { set err [catch {eval $FileSaveHandlers($file) [list $file $data]} errstring] if { $err } { error "Error saving file '$file' ($errstring)" } } else { if { [file exists $file] } { set ic 0 while { [file exists $file ... in your application: ====== bind all <F12> { # enter here the path where you have installed RamDebugger # for example: {c:\Program files\RamDebugger} lappend auto_path {C:\TclTk\RamDebugger3.2} {C:\TclTk\ActiveTcl8.4
  • ramvfs
    06 Jan 2012posix(EROFS) } } } proc vfs::ram::utime {dirurl path actime mtime} { vfs::filesystem posixerror $::vfs::posix(EROFS) } proc vfs::ram::_onopen {mode filename filed} { if {![catch {_file_get $filename} data]} { fconfigure $filed -translation
  • Random Poetry Chalkboard
    03 Mar 2017pool} {silk} {deer} {song} {barge} {moss} {night} {gate} {fence} {dove} {dream} {frost} {peace} {shade} {ghost} {road} {path} {root} {horse} {eve } {sound} {sleep} {leaves} {sea } {sail} {peak} {stem} {field} {wave} {slope} {bark} {crest ... while executing "respective rect ids" (procedure "populateCanvas" line 4) invoked from within "populateCanvas $canvas 6 10" (file "wikitest" line 223) === This error is the result of numerous extraneous newline characters that have
  • Raspberry Pi
    03 Mar 2017path if {![string is boolean $onoff]} { error "activate_port: parameter 'onoff' must be boolean" } if {$onoff} { set act_port [file join $sys_path "export"] } else { set act_port [file join $sys_path
  • rattleCAD
    03 Jul 2017derive drawings from its configuration created pages: * [simplify_SVG: path element ...] favorite pages: * [Another dials widget] * [A little XML browser] * [A 3D Model File Loader-and-Examiner - for OBJ, PLY, OFF, STL
  • Read-only text widget
    25 Jan 2014bindings that modify the text * either source this file in your code or edit text.tcl and add the following '''source [[file join [[file dirname [[info script]]]] ROtext.tcl]''' * Now in you ... some kind of log window. Code: ====== # # The hardest thing about this is just setting # your ::auto_path properly so Tcl can find the wcb package ;) # # # Load the required package. # package require wcb
  • Reading GIF image dimensions
    05 Feb 2011set form "$format " } error "'$file' is not a recognisable ${form}image" } set info [list [image width $img] [image height $img]] image delete $img return $info; };# imageSize % imageSize ./path/to/image.gif % imageSize
  • Reading image type and dimensions
    25 May 2016set srcNative [file nativename [file join $srcDir $fileName]] # Check if file matches the patterns in given in search window. # Compare only the pure filename, not the path part. set pureFileName [file tail
  • Reading MP3 file info
    17 Sep 2016to test and to give comments, suggestions, ...! Thanks! ---- '''''usage:''''' mp3InfoReader fileName arrayVarName ?debugFlag? fileName: path to the MP3 file arrayVarName: name of the array variable to be used as container for the
  • RedHat
    18 Aug 2014were included to restrict the default set of directories that were included in Tcl's auto_path variable. This set of directories changed from `/usr/lib[[64]], /usr/share, /usr/share/tcl8 ... X server insecure: unmanaged local console] * For a permanent fix, comment out the offending lines in file /etc/X11/xinit/xinitrc.d/localuser.sh **Problems with older versions of Red Hat Linux
  • Refactored BLT Components
    18 May 2018you need to append the path to the rbc package for this to work. So something like this should be in your tcl file. ====== lappend auto_path <path-to-your-rbc-files
  • Refrigerator_Pinyin_Poetry
    05 Mar 20171.0 " \n " } console eval { .menubar.file add cascade -label "Save session" -underline 2 \ -menu .menubar.file.sess menu .menubar.file.sess -tearoff 0 .menubar.file.sess add command -label "Input only ... pool} {silk} {deer} {song} {barge} {moss} {night} {gate} {fence} {dove} {dream} {frost} {peace} {shade} {ghost} {road } {path} {root} {horse} {eve } {sound} {sleep} {leaves} {sea } {sail} {peak} {stem} {field} {wave} {slope} {bark} {crest
  • regContextHandler
    06 Jan 2012play) # $shellContextText # Shell context menu text (RMB pop-command) # $myAppPath # The complete path/command to launch your application # The file(s) selected in explorer will be handed as parameters # # And if you
  • Register file types under Windows
    21 Jan 2014NUMBER'th icon in the given file. # The file must be a full path name. # -mimetype TYPE # Set the MIME type corresponding to the new # file type to the specified string. # -new
  • registry
    11 Feb 2014search path management [http://www.geocities.com/m_schrumpf/tcl/index.html#installbin], and [COM] introspection [http://www.geocities.com/m_schrumpf/tcl/index.html#comtree] or tree browsing * [Register file types
  • Relation Transitive Closure
    04 Feb 2016transitive close contains a tuple for every pair of file names where # there is some path from the file to its included file. Thus if a --> b and # b --> c and c
  • Relative File Paths
    03 Jun 2012path to target file from current file # arguments are file names, not directory names (not checked) proc pathTo {target current} { set cc [file split [file normalize $current]] set tt [file split [file
  • remote execution using tcl and Pcom
    02 Sep 2015a small package intended to offer one to one chat-like contact and back and forth file transfer with straightforward socket connections and adjustable port number, which also allows remote (tcl/tk ... space seperated list is the command name, the rest options or arguments. In a shell a PATH needs to be taken into account, which points to the executable files on the disc
  • Rendering a Wavefront Obj file in Canvas3d
    02 May 2013obj_file # Arguments: # canvas - A canvas3d widget # tags - Tags to apply to the newly created object # filename - A path to a file in Wavefront Obj format ### proc opengl_render_obj_file {canvas
  • RenderTk
    13 Feb 2015here is an example: ====== ## Add current directory to paths searched for packages... ::tcl::tm::path add [file normalize [file dirname [info script]]] ## Load the RenderTk package... package require RenderTk ## Import all RenderTk
  • Rendezvous
    13 Nov 2014browseRegistrations, &searchToken); hashEntry != NULL; hashEntry = Tcl_NextHashEntry(&searchToken)) { activeBrowse = (active_browse *)Tcl_GetHashValue(hashEntry); // remove the file handler Tcl_DeleteFileHandler(DNSServiceRefSockFD(activeBrowse->sdRef)); // deallocate the browse service reference DNSServiceRefDeallocate(activeBrowse->sdRef); // clean ... activeResolve->sdRef); // deallocate the active_resolve structure ckfree((void *)activeResolve); } ====== ---- And an example script ====== lappend auto_path . package require rendezvous 0.1 proc browse_callback {regtype action service domain} { puts "browse $action
  • Reporting Tools with Tcl History (How it started)
    13 Feb 2016of the file and the version on the server provided for that file. For that purpose we had a copy of the client directory tree in a dedicated directory path on the
  • rframe - yet another decorated frame widget
    03 Oct 2017Leave> [list $f state !focus] return $f2 } ====== * rframe_test.tcl ====== set dir [file dirname [info script]] lappend auto_path [file join $dir "."] package require tile package require rframe # ------------------------------------------------------------------------- # test # ------------------------------------------------------------------------- proc main {} { # -- only
  • rgb combinations
    12 Jan 2009name of the file. if {$fname == ""} { set fname $arg } else { puts stderr "$progname: Error: extra rgb file specified: $arg" exit 1 } } } ## # Parse the "rgb.txt" file specified by the path <code>fname
  • Rivet
    10 Jul 2018to separate code and templates, do your processing in a .tcl file, then do "parse foo.rvt", and in the .rvt file, put statements like <? puts $foo ?> <? puts $bar?> where you need ... in the environment variable ''LD_LIBRARY_PATH'' of apache. I felt it easier to add a symlink to ''/usr/lib(64)'' instead setting a custom library path. Commands necessary, if tcl is
  • RL_JSON Extensions
    07 Sep 2017v] } ::return $rj } proc ::json::file2dict { file } { ::if {[::file isfile $file]} { ::set data [::string trim [::fileutil::cat $file]] ::return [::json get $data] } else { ::throw error "File $file does not exist - cant convert ... value ::if { [::json exists $j {*}$path $variable] } { ::lassign [::json get_typed $j {*}$path $variable] value type ::set ex [::json extract $j {*}$path $variable] ::json set rj {*}$path $name $ex } else { ::set value
  • rmax-ipv6-branch
    04 Nov 2010accept 0] file delete $path(script) set f [open $path(script) w] puts -nonewline $f "socket -server accept [lindex [fconfigure $s -sockname] 2]" close $f set f [open "|[list [interpreter] $path(script
  • Robust environment variables on Windows
    27 Apr 2016file dirname [file dirname [info nameofexecutable]]] share lib32] } else { set libPath [file join [file dirname [file dirname [info nameofexecutable]]] share lib64] } set found 0 foreach path [split $::env(PATH) ";"] { set path [file
  • RSS Monitor
    19 Jan 20144 package require rss 1.0 #Reads the options file. proc loadOptions {file} { #Initialize the interpreter which executes the contents #of the options file. set interp [interp create -safe] $interp eval [list ... is the main body of the program, rss_monitor.tcl ====== #!/usr/local/bin/tclsh lappend auto_path . package require Tcl 8.4 package require http 2.4 package require mime 1.3
  • Running starkits without Tclkit
    18 Jan 2013With [ActiveTcl] 8.4.12 already installed : 1. Download dtp.kit 2. Save a launcher.tcl file, which content is at the bottom of this page 3. Run a [tclsh] with the ... error "unknown extension : $ext"} } $cmd $__load $__load.0 set argv0 [lindex $argv 0] set argv [lrange $argv 1 end] lappend auto_path $__load.0/lib source $__load.0/main.tcl ====== <<categories>> Tclkit
  • Safe Interps
    23 Jun 2016auto_path and this gave me a 35 seconds hang after a [package require]. So, you´d better tailor and use the `-accessPath` option whenever possible. ---- See also * [island] * [safely source a file
  • safely source a file
    19 Jun 2011from $path." } elseif {[llength [interp eval safeinterp info commands $name]] == 0} { #Handle error, e.g.: puts stderr "The file $path does not contain a procedure named $name." } else { set PluginPath $path set
  • safetcl
    26 Dec 2014only to a virtualized path containing tokens. When the safe interpreter requests to source a file, it uses the token in the virtual path as part of the file name to source
  • SAOTk
    04 Jul 2011label "Scale" -menu .menuBar.scale menu .menuBar.file -tearoff 0 -selectcolor red .menuBar.file add command -label "Open..." -command OpenFile .menuBar.file add separator .menuBar.file add command -label "Exit" -command exit ... patched by KJN in 2007. # The conditions referred to above are the GPL v2. lappend auto_path . package require BLT load libsaotk.so package require saotk # Variables set simple(visual) [winfo visual
  • save and restore widgets
    20 Jan 2014file join $path $widget.SerializeData] w]; puts $fid [join $serializeData ";"]; close $fid; return; } proc restore {widget path} { source [file join $path $widget.SerializeData]; return; } ====== or ====== proc restore {widget path} { $widget restore [file
  • savedefault
    19 Jul 2016tcl --- # ----------------------------------------------------------------------------- # where to find required tcllib packages: set dir [file dirname [info script]] lappend auto_path [file join $dir "."] lappend auto_path [file join $dir "../tcllib"] package require fileutil package require inifile
  • Scaled Radiobutton
    16 Aug 2018Brad Lanam Walnut Creek, CA # package require Tk set ap [file dirname [info script]] if { $ap ni $::auto_path } { lappend ::auto_path $ap } unset ap package require colorutils proc sradiobutton { nm args
  • Script initialization - my own personal skeleton
    04 Sep 20130} { set prf [file rootname [autoCloneOrgPath]].rc } } lappend vars _myPath [file normalize [file dirname [info script]]] lappend vars _myName [file rootname [file tail $prf]] set prfH [file join ~ [file tail $prf]] return ... package require autoclone; # MHo http://wiki.tcl.tk/14945 set auto_path [linsert $auto_path 0 [pwd]]; puts "\$auto_path: $auto_path\n" puts "package require initscript 0.4: [package require initscript
  • Script to merge C source files
    09 Jul 2012include\s*[<"]([^"]+)[>"]} $line - path]} { ;# " set f [file tail $path] if {[info exists ::files($f)]} { if {[info exists ::seen($f)]} { emit "/* skipped: $path - see $::seen($f) */" n } else { emit "/* include: $path */" n set
  • Scripted Compiler
    29 Jan 2016binaries. For efficiency we just have to create a path where it is not necessary to write the slim binary to a file before mapping it to machine code. 1. A ''binary
  • Scroll bars that appear only when needed
    09 Jan 2016scroll bar that disappears when it is not needed, and # reappears when it is. # # Parameters: # w -- Path name of the scroll bar, which should already # exist and have its geometry managed by ... normal .t insert end "\n" normal "The Code" title "\n" normal #list the code in this file set f [open [info script] r] while {![eof $f]} { gets $f l if {$l eq
  • scwsd
    04 Sep 2011image/jpeg .xbm image/x-xbitmap } proc mime-type {path} { global mimetypes set type text/plain catch {set type $mimetypes([file extension $path])} return $type } proc push-error {sock code errmsg } { upvar
  • sdx
    04 Sep 2018Metakit] and [tclvfs] 1. obtain the [kitgen] source 1. add `''path to kitgen sources''/8.x/tclvfs` to [TCLLIBPATH] 1. `tclsh` <path to tclkit source>`/sdx/main.tcl` <sdx command> ... ** Main SDX ... VFS '''sdx unwrap''' ''yourstarkit'': Extract the contents of a starkit into a file system. Creates a directory with the name ''[[file root starkit]].vfs'' The directory must not already exist. '''sdx update
  • SDX Enhancements
    18 Mar 2018ppc64 ] && SUFFIX=-ppc;\ exec "$(dirname "$0")/tclkit$SUFFIX" "$0" "$@" # Load required packages. lappend auto_path [file join [file dirname [info script]] .. lib] package require Tcl 8.6 package require sdx # Run SDX
  • sdx extensions
    08 Feb 2013it creates a symbolic link. This matches the way I work on Linux - the real source file sitting next to whatever.vfs and a symbolic link to it from within the .vfs ... packages to the whatever.vfs/lib directory by looking for a corresponding starkit in the users PATH (using auto_execok). On my system, I keep a copy of various library starkits in
  • SDX under Windows
    01 Jan 2014problem went away: file unwrap.tcl ====== set aa [lindex $argv 0] set aa [string map {\\ /} $aa] exec tclkitsh.exe sdx.kit unwrap $aa ====== I registered this as "<path>tclkitsh <path>unwrap.tcl
  • Search Engine in Javascript
    10 Oct 2006relPathFromTo {fromDir toDir} { # return path string relative from $fromDir to $toDir. # $fromDir is assumed to be a directory (not a file). set from [file normalize $fromDir] set to [file normalize $toDir] if
  • Searching A Star In Space
    06 Jul 2011proc states path { variable solution set res "" set tpath "" foreach i $path { lappend tpath $i lappend res $solution($tpath,state) } set res } ######################################### self-test if {[file tail [info script]]==[file tail $argv0
  • searchpath
    26 Jan 2015This command is part of the [TclX] package. : '''searchpath''' ''path file'' Searches the given ''path'' (a Tcl list) for the given ''file'', returning its full name if found and the empty string
  • Selection Box
    24 Aug 2013described here, # provided that the new terms are clearly indicated on the first page of # each file where they apply. # # IN NO EVENT SHALL THE AUTHOR OR DISTRIBUTORS BE LIABLE TO ANY ... HAVE NO OBLIGATION TO PROVIDE # MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # Call Usage: # ::selectionBox::createBindings4 \ # <toplevel path> : mandatory argument to enable selection box for specified toplevel # ?procdure call? : optional, proc to call
  • Sepp
    25 Jun 2007catch {source [file dir [info na]]/etclrc.tcl} lappend auto_path [file dir [info script]] console eval {.console config -wrap word} wm withdraw . console eval {wm deiconify .} unix menu+ file Restart {exec
  • serial ports on Windows
    10 Nov 2017to use the 'generic' name (I think it is actually the UNC path) of the com port. Use the file name \\.\com13 to open 'com13:' Mind you, windows wants to see those
  • Serializing a canvas widget
    17 Sep 2009w focus [lindex $save 2] focus -force $w } # return path return $w } # ---------- # canvas:dump proc # # dump a canvas widget # ---------- # parm: canvas widget path # ---------- # return: widget dump # ---------- proc canvas:dump {w} \ { set w ... 10 30 -bitmap question image create photo img1 -data \ { R0lGODdhCQAJAIAAAASCBPz+/CwAAAAACQAJAAACEYwPp5Aa3BBcMJrqHsua P1MAADs= } image create photo img2 -file left.gif $c create image 40 125 -image img1 -tag {img _img_} set id [$c
  • Serializing things via file locks
    23 Mar 20175000 lock.file\] returns:\t[incrCounter ctr1.dat 5000 lock.file]" file delete ctr1.dat ====== ---- ====== # lock_test1.tcl, 25.02.2006 # starting 10 independet process in the background catch {file delete ./counter1 ... prove the routines work right ====== # lock_test0.tcl, 25.02.2006 # basic test(suite) lappend auto_path [pwd] puts "result of \[package require lock 0.2\] should be 0.2:\t[package
  • ServerBasics
    15 Apr 2011s output to a scratch file and then have the .cgi file send it to stdout, it works. Then I added the static files. I put a file in the tclhttpd/custom ... C:/tcl/httpdist/tclhttpd/htdocs/dump/review.txt set env(WIKIT_ADMIN) 1 regexp {\d+} $env(PATH_INFO) mufile if {[llength $mufile] > 1} {set mufile [lindex $mufile 1]} set env(REDIRECT_URL
  • Setting /bin/sh environment variables in the script
    08 Feb 2017modify the autoexec.bat file and reboot. ;## ;# Set a system wide Env variable ;# proc setSysEnv {key value} { package require registry global env ;# Support OS expandable params if {$key == "PATH" || [string match "*%*" $value
  • Settings as Tcl Scripts
    12 Dec 2013the saved file. # # Save files are simply Tcl scripts that contain a bunch of set commands. # Those commands will be executed in a safe interpreter. # # OPTIONS # -file - Path to the file that
  • sftp
    10 Sep 2012their platform. 2. the true ssh file transfer ''protocol''. http://en.wikipedia.org/wiki/SSH_file_transfer_protocol refers to this as being almost a remote file system protocol. Full support of ... dir1 = "IN"; my $dir2 = "OUT"; my $timeout = 1; # If sftp is not in your path replace with absolute path of sftp program my $command = 'sftp'; my $params = ("$sftpUsername\@$sftpServer"); # Create the Expect
  • sh
    01 Jan 2015On many Unix-based systems, `sh` is the file name of the [Bourne Shell] program or a modern variant of it. Its full path is usually `/bin/sh`. <<categories>> Glossary | Unix
  • Simple Download Progress Widget
    17 Dec 2011method MakeProgBar path { ttk::frame $path ttk::progressbar $path.prg -maximum 100 -length 100 $path.prg configure -value 0 ttk::label $path.per -width 4 -text "0%" grid $path.prg $path.per ... to avoid clobbering an existing file, if you cancel (or your app crashes) halfway through a download, it downloads to a file called $file.download (where $file is the filename you've
  • Simple ftp uploader
    17 Jul 2013path on ftp server. # # Results: # Goes to the given path on ftp server. If directories don't exist, they # will be created. proc ftpGoToDir {handle path} { ::ftp::Cd $handle / foreach dir [file
  • simple INI-files parser/writer
    10 Sep 2017is the absolute path of the file to be parsed; # content_var is a dictionary variable where to store the contents # comment_var (optional) stores the comments in the file proc readfile
  • Simple Newsreader
    19 Jul 2006nntp package require http package require tablelist 3.4 source [file join [file dirname [info script]] article.tcl] #lappend auto_path [file dirname [info script]] package require article set NEWSSERVER "localhost" set
  • Simple Program Menu
    10 Mar 2017file (at the root level there) * '''@include''' '''''file''''' - opens and reads input from another menu file (same as above: has to appear at the root level). Only makes sense if the file ... routines like "select" or "msgbox". Example screen: [https://image.jimcdn.com/app/cms/image/transf/none/path/s1b9371b41c82e69b/image/i4cf20c597a35e16c/version/1489179915/image.jpg] Some words about keys and functions: * '''<Return>''' starts
  • Simple Tcl Archive Network
    28 Jun 2006code works rather well. What you can do with stan is build a very basic .kit file, with just stan and the other pure tcl extensions you need, and use stan to ... foobin-0.0/ (or the windows documents and settings equivalent). ~/.stan is added to the ::auto_path by [[package require stan]], so the next run will just use the installed package. For
  • Simple TCL script that uses 'ffmpeg' to normalize mp3 audio levels
    30 Sep 2016workDir [lindex $argv 0] # The path passed must be a directory path if { ![file isdirectory $workDir] } { log error "The argument passed is not a valid directory path" byebye exit 1 } # The argument
  • Simple vim script to drive wish on windows
    03 Sep 2013sfile>:p:h") function Send_to_Tcl(text) if has('win32') || has('win64') let s:tcl_file = s:current_dir . "/ipc-win.tcl" if !exists("g:tcl_ipc_initialized") tcl package require ... console will be popped up and the full error trace will be shown. Of course this requires a Vim built with Tcl support (if_tcl) and wish in the path. <<categories>> Uncategorized
  • simplify_SVG: path element ...
    13 Jul 2018path-Elements into polygon & polyline # # http://www.w3.org/TR/SVG/expanded-toc.html # # http://www.selfsvg.info/?section=3.5 # # package require Tk package require tdom set APPL_ROOT_Dir [file
  • single command http fetcher
    04 Nov 2010catch { lassign $args op path # first process any completed fetches switch -- $op { FILE - DIR { incr loaded incr loading -1 dict unset pending $path puts stderr "DONE $loaded: $op $path ($loading/$limit) queue
  • size and proportion of widgets
    10 Jun 2016I would like to truncate the path: /path/to/extremely_long_path... file.txt - 415 words in 121 lines How should I calculate how long the path can be so it doesn
  • slideshow
    12 Jun 2007Insert title image set y 40 set img_file [file join $fim [string range $title 2 end]] if {![catch {image create photo -file $img_file} img]} { set pos [string index $title 1 ... c $pages ---- [MHo] 2006/09/13: * Switching to another show does not work on windows if path contains spaces, I think [US] Can't help you there, it's windows. [Lars H
  • SMTP with attachments
    27 Oct 2017opt_attcs_type" log "Processing: $file" set parts [mime::initialize -canonical text/plain -string $body] set imageT [mime::initialize -canonical "image/tif; name=\"[file tail $file]\"" -file $file] lappend parts $imageT set ... has problems when location ## of Trf package isn't explicitly stated like this ## set ::env(PATH) $::env(PATH)\;H:/tcl/lib/trf ## because Trf can't find crypt.dll package require smtp
  • Snack
    20 Aug 2017without loading Tk: ====== package require sound proc playwav myWavFile { snack::sound s -file $myWavFile s play -block 1 } playwav c:/path/to/wavfile.wav ====== Example: ---- [NJG] 2006-06-28: But if you
  • snitbrowser
    28 Sep 2012this license. ################################################################################ package provide snitbrowser 0.3 package require Tk package require http lappend auto_path [file dirname [info script]] package require snit package require Tkhtml catch { # should check for Tcl8.6
  • snitbutton
    09 Mar 2012needed uplevel #0 $command($text) } method size {} { $canvas configure -width [expr {$numbut * $wid}] } typeconstructor { set path [file dirname [info script]] set up_img [image create photo -data { R0lGODlhRQAeAMYAAP////v7++zs7N/f39XV1dHR0c3NzcLCwrm5uby8vMfH x7S0tL29vcDAwMHBwbi4uLe3t8vLy8
  • snitfinddialog
    03 Apr 2014I wrapped all into a [Snit's Not Incr Tcl] toplevel widget. ====== ##+################################################### # NAME snitfinddialog # SYNOPSIS # snitfindialog path ?args? # DESCRIPTION # snitfilendialog provides a standard find dialog layout # all buttons and the entries are ... review what I get with [ASED], but then I just want to double-click on the file to run it. Many pages on the wiki are ''reapable'', so that they can run
  • SnitTtkNotebook
    05 Feb 2018a file SnitTtkNotebook-0.1.tm * put it to your collection of Tcl-Module files * at the beginning of your script add the Module-path with cmd: `::tcl::tm::path add ?path
  • snitvfs
    28 Sep 2012path exist and are valid, and # that the actual desired path does not yet exist (Tcl takes care # of all of that for us). # deletefile root relative actual # Delete the given file
  • SnitXWindow
    17 Feb 2018title myurxvt -rv" -searchtitle myurxvt # example gnumeric: SnitXWindow $nb.gnum -cmd gnumeric -cmdargs "/path/to/file.xls" -searchtitle "*file.xls*" proc addTab {} { global nb set x [llength [$nb tabs]] SnitXWindow $nb.empty
  • sockspy
    06 Jan 2012Thoyts]. 2009-12-03 SockSpy is [SourceForge] hosted project. See http://sourceforge.net/projects/sockspy for file downloads and bug reporting. The current version is 2.6 which has various bugs fixed ... had already been issued cookies for that server, then when you put sockspy into the request path, the browser will no longer recognise the server as the one that issued the cookies
  • Software creation with Tcl/Tk
    11 Apr 2015that you would [source] a file when it is simply a part of your program that, in the sake of organization, was written in a separate file; and you would make that ... panel; 2) call a certain procedure which creates the desired panel in runtime and returns its path, and 3) pack/grid the "returned" frame into the empty frame you have created. * [LV
  • Solaris
    23 Feb 2013workaround from the above link, creating your own x11.pc file * Set PKG_CONFIG_PATH to the dir where the x11.pc file lives * Set CPPFLAGS="-I/usr/X11/share/include" because
  • Some common mistakes when programming in Tcl/Tk
    30 Apr 2013tcl "Never name your script file the same name as a widget class." 1. [AM] A common mistake under UNIX/Linux: calling an executable (binary or script file) "test". This is not ... internal command "test" that is executed instead. However, if you use a full or partial path name (/path/to/test or ./test) it may work. Best approach is not to give it
  • Sortbox
    17 Jan 2013file exists $Listfile] { # # The path has been set to the location of the script # if [catch {open "$Listfile" r} fileID] { MessageDlg .error \ -title "Error in function Sortbox::Lesen" -message \ [format "List file
  • source
    01 Mar 2018exit immediately proc . filename { foreach path [split $::env(PATH) [path'separator]] { set try [file join $path $filename] if [file readable $try] {return [source $try]} } error ".: no such file or directory: $filename" } } ;# RS
  • source with encoding
    01 Mar 2015the file isn't.) Here's the code I use to do this (the variable defcharset is set to a default encoding and the variable encdir is set to the path that
  • SpatiaLite
    24 Sep 20181-DLL-win-x86} db allrows {SELECT load_extension('/path/to/spatialsqlite/libraryfile')} ====== and if it's a new or non-spatialite database file, you should initialize it: ====== db allrows {SELECT InitSpatialMetaData
  • Speech Synthesis, or Talk to me Tcl
    06 May 20125', when the file in question doesn't exist. To quote one page of the MS website, the argument must be "a null-terminated, fully qualified path to a file". The page
  • speed up clock format and clock scan
    28 Nov 2016config outdir [file join [pwd] dac] critcl::config keepsrc 1 critcl::config force 1 if {![critcl::compiling]} { puts stderr "critcl is not enabled" exit 1 } } #set ::env(LD_LIBRARY_PATH) somepath namespace
  • SPITE
    20 May 2015scriptmask mask Mask for executable files [0555] --tclsh file Path to tclsh [] --wish file Path to wish [] --sed file Sed program [sed] --sum file Checksum program ("" will disable checksumming) [md5] --destdir dir
  • Sprite
    08 Sep 2012strip of 4 32x32 images #call blocks.gif # #set path [file dirname [info script]] #set imgMap [ image create photo -file [file join $path blocks.gif]] for { set i 0 } { $i < 100 } { incr
  • SQL JSP Tcl Responder
    22 Jan 2010the contents of it into your clipboard and then past it into a JSP file and save the file into a working Java Web Server's context. An example of a Java ... JSP also requires the [Jacl] library package to be installed and in the Java's library path. <%@ page import="java.io.*" %> <%@ page import="java.util.*" %> <%@ page import="java.sql.*" %> <%@ page import="tcl
  • SQLite
    25 Sep 2018also a simpler way. The tclsqlite.dll file can be in a directory totally unrelated to Tcl. The directory only needs to be in the '''$PATH'''. Then just '''load tclsqlite.dll''' and
  • sqlite3 full text search example
    21 Nov 2017file = $file ) ; commit transaction } } } proc index-path { path } { lappend ::paths $path } proc index-path! { path } { foreach dir [glob -type d -directory $path -nocomplain *] { if { [exclude? $dir/] } { continue } index-path! $dir } foreach file
  • SQLiteStudio
    05 Jul 2016debug messages on STDOUT. | --localbugs <file> - Bug reports goes to specified local file. | --help, -h - Prints this help. | --tcllibs <paths> - Adds specified directories to Tcl library path. | The <paths> is in format
  • SSDP
    30 Mar 2015HTTP port of device. # - path: Path of the device description file. # - udn: UDN of the provided device. # - services: List of provided service types. # proc start {addresses port path udn services} { # Remember parameters
  • Standalone bgexec
    28 Dec 2011creates a temporary file initialized with an * optional string, and returns a file handle with the file pointer * at the beginning of the file. * * Results: * A handle to a file. * * Side effects ... child process runs * asynchronously and runs with the same environment variables * as the creating process. * * The path is searched to find the specified executable. * * Results: * The return value is TCL_ERROR and
  • Standard starpack initialization routines
    25 Jul 20090} { set prf [file rootname [autoCloneOrgPath]].rc } } lappend vars _myPath [file normalize [file dirname [info script]]] lappend vars _myName [file rootname [file tail $prf]] set prfH [file join ~ [file tail $prf]] return ... 8.4.11 encoding wieder aktiviert. # 13.02.2007: Bugfixes, Verbesserungen. # 18.05.2007: Immer _myPath path mit _initVars zurückgeben, Proc _initSource; # Bugfix: .RC-Namensermittlung geändert. # 28.06.2007: arg für _initSource
  • stardll
    13 Feb 2016that it must mount a different file. Therefore the very first call you make must be to ''TclKit_SetKitPath(const char *path)'' giving the filename and path of the shared library. Second
  • Starkit
    20 Aug 2018kitgen] source code 1. add `''path to kitgetn sources''/8.x/tclvfs` to [TCLLIBPATH] 1. unpack the `.kit` file using [sdx] 1. invoke <path to unpacked `.kit` file>`/main.tcl` See also
  • Starkit - How To's
    21 Dec 2017ll also see other packages on auto_path ====== * to source `myexts.kit` when it lives ''next'' to the launched app starkit: ====== source [file join [file dirname $starkit::topdir] myexts.kit] ====== * to avoid
  • Starkit boot sequence
    10 Aug 2012lappend the /lib directory to ::auto_path 4. source main.tcl from the top level directory of the starkit vfs. Invocation of a starkit causes a file main.tcl to be sourced
  • Starkit with Iwidgets
    07 Sep 2012set libname [file dirname [info script]] set applib [file dirname [file dirname [info script]]] set startup [string map [list SCRIPT $scriptname APP $applib LIBX $libname] { package require Tk lappend auto_path APP
  • Starkits with Binary Extensions
    28 Feb 2011won't physically # present proc LoadLibrary fname { set dllname [file tail $fname] set tmpfile [file join $::env(TEMP) $dllname] if {![file exists $tmpfile]} { file copy -force $fname $tmpfile } return [_LoadLibrary $tmpfile] } ====== So ... kit qwrap binary.tcl sdx.kit unwrap binary.kit Copy the binary Tktable libs in: cp /path/to/Tktable2.8 binary.vfs/lib Rewrap the code: sdx.kit wrap binary '''Medium case
  • StarSite
    08 Sep 2012POSTed data etc. PATH_INFO/PATH_TRANSLATED stuff will not be passed in here - it will be used to figure out the requested URL). * The request handler retrieves the file, and performs
  • Starting effective starkit-based pure-Tcl development: the starkit::* namespace
    16 Oct 2013automatically sets up the right search path for the packages it encapsulates. Once past the verbose work-around of the [switch] seen below, though, the source file hierarchy is easier to recognize
  • Starting Java from Tcl
    23 Apr 2004Make a Tcl-friendly path of the horrible windows backslashes set j_home [regsub -all "\\\\" $j_home "/"] set j_exe [file join $j_home "bin" "java.exe"] if { [file executable $j_exe
  • Starting Tclhttpd in a slave interpreter
    08 Jun 2012the way. ====== # example code # StartEmbeddedHttpd # path is the path to the tclhttpd bin/httpd.tcl file # args are commandline args to pass to tclhttpd proc StartEmbeddedHttpd {path args} { set httpd [interp create
  • Steps towards functional programming
    25 Mar 2014http://aure.com/api-doc/procs-file-view?path=tcl%2Fad-functional.tcl] * Tree implementation using functional programming [http://aure.com/api-doc/procs-file-view?path=tcl%2Fad-trees.tcl] ---- [RS
  • Stomp
    11 Feb 2015looking for aliasing or similar... [APN] How about using `namespace path` ? Something like ====== namespace eval ::stomp::client { namespace path [linsert [namespace path] 0 [namespace parent]] } ====== [EF] Indeed, I was. Thank you very ... the entire JDK if you are on 32-bit Windows. The download is a compressed tar file though the extension is just gz. Rename it to .tar.gz so 7-zip will
  • strace
    02 Mar 2016filename>" exit 1 } else { lassign $::argv file1 } try { file stat $file1 fstat if { $fstat(type) ne "file" } { puts "ERROR: $file1 is not a regular file" exit 1 } } trap {} {err} { puts "ERROR: $err ... version of strace. - [RS]: Well, you can use any executable with [exec] that is on your $PATH... See also: [ktrace] [AMG]: A classmate of mine referred to [strace] as "the king of
  • strimj animation
    10 Aug 2010s a stupid little demo film that is run when this file is started at toplevel (and you have the file from [strimj - string image routines] in your working directory). It shows ... See how simple it goes with strimjes... } namespace eval strimj { variable running ;# array, will hold the path(s) of running film(s) } set docu(strimj::film) { Prepares a film by converting the
  • strToPic
    21 Feb 2018a file name). Then you can use picToStr ?$file? to decode a file (if no ''file'' is given, you'll be prompted to give one). This decodes the contents of the file ... x == $size } { set x 0 incr y } } set path [tk_getSaveFile -filetypes {{{PNG Files} {*.png}} {{All Files} {*.*}}} -defaultextension .png] if { $path != "" } { $image write $path -format png tk_messageBox -message "Image created." } image
  • Stubs - Another explanation
    26 Mar 2018through every relocation symbol in the library and fill in the address in the loaded library file. On ix86 processors this just involves relocating one symbol in the global offset table. Other ... facetious. But there is a serious point here: If we go far enough down the flexibility path then we essentially arrive at a general purpose interpreter library which can be used to
  • subject observer logic bomb
    14 Sep 2018contain the # full path name of this file's directory. package ifneeded subjectLogicObserver 0.1 [list source [file join $dir subjectLogicObserver.tcl]] package ifneeded thing 1.0 [list source [file join $dir
  • sudokut
    24 Jul 2009a file** You can process several sudokus at a time by storing them in a file and executing '''sudokut''' on this file with the ''-f'' option. The path of the file must
  • Suggestions for Wiki Diffs Discussion
    11 Apr 2014VFS: we could mount a separate file as VFS (i.e. a starkit), and set things up to store copies there (trivial, simply a different path). This gives per-page compression for
  • Suggestions for Wikit
    09 Oct 2017Tcl config files +if {[file exists /etc/wikit.conf]} { + source /etc/wikit.conf +} +if {[file exists ~/.wikit.conf]} { + source ~/.wikit.conf +} +if {[info exists env(WIKIT_CONFIG)] && [file exists $env(WIKIT_CONFIG ... referenced page its self, the title shows up as normal or may contain each of the path elements depending on software, but generally provides a link to the parent (as if [[Tcl
  • Suggestions for Wikit Diffs Discussion
    11 Apr 2014VFS: we could mount a separate file as VFS (i.e. a starkit), and set things up to store copies there (trivial, simply a different path). This gives per-page compression for
  • Sumerian Counting Boards, multiplication operation placement strategy, and eTCL demo example, numerical analysis
    25 Oct 2017XP on eTCL # gold on TCL WIKI, 10Mar2017 package require Tk package require math::numtheory namespace path {::tcl::mathop ::tcl::mathfunc math::numtheory } set tcl_precision 17 #! /bin/env tclsh console show ... c configure -background orange -highlightcolor brown -relief raised -border 30 .c configure -bg tan #end of file ====== ***Under test, many additions*** ====== # pretty print from autoindent and ased editor # Sumerian counting board Strategy
  • suspend and resume
    13 Nov 2014the usual [EIAS] advantages: can pass by value and store in data structures, can save on file or hand over to another thread, one can even resume the same continuation several times ... unset} bar; yield; set v 2; yield; set v 3} % proc bar args {puts $args};namespace path tcl::unsupported;coroutine a foo % a v {} write % a v {} write v {} unset 3 % a
  • svg2can
    20 Apr 2015xlinkhref { file:/* { set path [::uri::urn::unquote $xlinkhref] set path [string map {file:/// /} $path] if {[string length $paroptsA(-imagehandler)]} { set cmd [concat create image $x $y $opts] lappend cmd -file $path -height
  • Swig example showing access to C structures from Tcl
    01 Sep 2013lib/tcl8.4 # #} #catch { source [file join $tcl_library init.tcl ] } #lappend auto_path [file dirname $tcl_library ] [pwd] # load swig generated extension load [file normalize [ file join . myif.so ] ] # call swig
  • tablelist
    24 Sep 2018file normalize [file dirname $this]] } } # # specify, where to find specific packages: # set auto_path [linsert $auto_path 0 [file join $::starkit::topdir "lib"]] package require Tablelist_tile ... ====== Make sure that auto_path
  • tablelist 6.0 - yet another header cellconfigure example
    05 Jan 2018modified embeddedWindows_tile.tcl demo code: ====== set dir [file dirname [info script]] # where to find required packages: set auto_path [linsert $auto_path 0 [file join $dir "lib"]] package require Tk package
  • tablelist with vertical header/label text - text2rotatedimage
    04 Jan 2018tcl ====== set dir [file dirname [info script]] lappend auto_path [file join $dir "."] package require Img package require text2rotatedimage namespace import text2rotatedimage::* set tempdir [file join $dir "temp"] file mkdir $tempdir # --Testing
  • tal.tcl
    03 Dec 2013the file here after any non-trivial updates, but will not comment much. ====== #!/usr/bin/env tclkit package require Tcl 8.6 # tal.tcl -- experiments with the Tcl Assembly Language namespace path
  • tar
    13 Jun 2014best choice WRT portability would IMHO be ''posix''. It does not impose restrictions on path name length, maximum file size, device node numbers, UID/GID numbers, encodings, etc. anymore, while trying to
  • tarball
    29 Oct 2012file join $path $file] } "file" { puts [file join $path $file] set dir [file dirname [file join $path $file]] if { ![file exists $dir] } { file mkdir $dir } set out [open [file join $path $file
  • tarpack
    08 Apr 2012basic tarpack can be loaded simply by placing the tarpack-<ver>.tm file and the particular tarpack on the 'Module Path'. Indeed in the simplest cases, such as a single trivially wrapped
  • TAX: A Tiny API for XML
    16 Jun 2013well-documented, and well-supported API.) As with Stephen Uhler's gem, TAX takes an XML file and converts it into a Tcl script. Tags become procs. The XML is then executed ... which you can tell if the paragraph goes on long enough. <![CDATA[<exampletag "Hi!">]]> <![CDATA[\example\path]]> </para> <para> This is an ordinary paragraph. No line is indented. Not one. None at
  • Taxes and TXF file import
    17 Nov 2013an excel file then exporting to cvs, I simply highlighted the data in my browser and cut and paste the data into a text file. I used this text file as input ... catch {package require TclOO } err ] != 0 } { puts stderr "Unable to find package TclOO ... adjust your auto_path!"; } oo::class create StockTrans { constructor {stock shares buydate basisamt selldate sellamt gainterm } { my variable data
  • tbs - a tcl/tk build system
    20 Aug 2017variable topdir [file dirname [info script]] } set auto_path [linsert \$auto_path 0 [file join $::starkit::topdir lib]] } # used packages EOF # not required within starkit # echo "lappend auto_path [file join \$topdir
  • tcc tcl extension
    17 Mar 20110; char *file = NULL; int disposition = 0; int type = -1; struct tcc_augmented state = {tccp, interp, result}; char *command = NULL; char *cmdsym = NULL; static CONST char *optionStrings[] = { "--", "-output", "-run", "-relocate", "-file", "-symbol ... library_path(tccp, Tcl_GetString(objv[cnt+1])); cnt += 2; break; } case TCC_INCLUDE: { if (cnt == objc) { Tcl_WrongNumArgs(interp, cnt, objv, "filename"); return TCL_ERROR; } err = tcc_add_include_path(tccp
  • Tcl 9.0 WishList
    30 Sep 2018all packages to the module path - if a package is not in single-file module format, tolerate the presence of files other than *.tm in the module path, and use *.tm simply
  • Tcl Based Installers
    16 Aug 2010mq.edu.au/~steve/tcl/]. Here are the procedures I defined: installer::fetch uri -- fetch a file from a remote url installer::tmpdir -- locate a temporary directory installer::text_progress token total ... much free space is left in dir? installer::locate_package_dir -- find a place on auto_path to install a package installer::bootstrap ?site? -- download enough code to be able to run
  • Tcl Chatroom
    19 Sep 2018flush stdout set fname /path/to/ralf's-chat/messages set time $env(QUERY_STRING) if {$time == ""} { set time [file mtime $fname] } after 90000 set time 0 while {[file mtime $fname] <= $time
  • Tcl cheat sheet
    20 Feb 2010or any other path to your Tcl interpreter (but that is absolutely irrelevant if you are using Windows). See [exec magic] for the recommended way to start a Tcl file if you
  • Tcl Commands
    14 Feb 2018unary or binary operators in an `[expr]` expression. [tcl::pkgconfig%|%::tcl::pkgconfig]: [tcl::tm::path%|%::tcl::tm::path]: [tcl::tm::roots%|%::tcl::tm::roots]: [tcl::tommath%|%::tcl::tommath]: [tcl::unsupported%|%::tcl::unsupported ... tcl::mathfunc], ::[tcl::mathop] [fblocked]: ::tcl::chan::blocked [fconfigure]: ::tcl::chan::configure [fcopy]: ::tcl::chan::copy [file]: [fileevent]: ::tcl::chan::event [flush]: ::tcl::chan::flush [for]: [foreach]: [format]: [gets]: ::tcl::chan::gets
  • Tcl Equivalents of Python Modules
    19 Aug 2017the first random number| %|Functional Programming Modules|||||% |itertools||||| |functools||||| |operator||||| %|File and Directory Access|||||% |os.path|||[file]|| |fileinput||||| |stat|||[file stat], [file lstat]|| |filecmp||||| |tempfile||||| |glob|`glob.glob('./[[0-9].*')`|[glob]|`glob
  • Tcl for Creo
    21 May 2018or 1. # '0' the path is invalid or # '1' the path is valid. # ps_comppath myPath -model test.asm -path {43 30} -component bolt.prt ====== <<discussion>> ---- ***Export to file*** <<discussion>> Export Data
  • TCL interpreter through socket
    07 Apr 2016going to send a string with full path of a TCL script + arguments to this socket server. socket server opens, reads and executes the script file with arguments. How this can be
  • Tcl Intro
    29 May 2013often executed via '''[tclsh]''', a simple shell containing a Tcl interpreter. If '''tclsh''' is in your path, simply type its name on the command line. '''Tclsh''' takes one optional argument, a filename ... then adding a line similar to the following line as the very first line of the file: #!/usr/local/bin/tclsh (The above example assumes you have tclsh installed in the directory
  • Tcl invoke performance
    13 Nov 2007TCL_OK shows that the cost of setting the variable is almost negligible'' * 72% doing the file access, reading and conversion within [gets] itself * the cost of setting the variable in the ... possible savings when improving that part only) ***Test Script*** The script being run is ====== lappend auto_path /home/CVS/emptyFunc/ package require empty exec /usr/bin/taskset -p 0x00000001 [pid] proc main
  • Tcl is (not) almost dead
    29 Apr 2018have these paths in `::auto_path` (nor does a tclkit, but that could be argued). I don't think /usr/lib should be in the search path. If have have my own ... though they've been around as the gold standard for sharing Tcl projects as a single file for years now, the ability to read starpacks isn't even built into the Tcl
  • Tcl Library
    23 Apr 2015tcl.tk/man/tcl/TclCmd/library.htm%|%official reference]: ** Commands ** [auto_execok]: determines whether an executable file, or shell builtin, exists [auto_import]: search for and load definitions for commands matching a ... noload`: If this variable is defined, `[unknown]` will not attempt to `[auto_load]` any commands `[auto_path]`: a [list] of directories that `[package unknown]` searches to find `[package]` packages. The initial value
  • Tcl Module basic template
    24 Jun 2011within the tcl::tm::path ensemble e.g something like: 'tcl::tm::path which ''?tm_path''' ====== apply {code { set mypath [file dirname [file normalize [info script]]] set mysegs [file split $mypath] set
  • Tcl Modules
    08 Dec 2015that path manipulating commands only ("::tcl::tm::path")? Just to be able to source the ordinary TCL-file without giving absolute path ("source foo-3.14.tcl" instead of "source [file join
  • Tcl MP3 Alarm Clock
    23 Jun 2011puts " -rdrf X : Random Files; for playing X random tracks." puts " -cf /path/file.cf : Sets the path to the file with root directories." puts " -togext ext : Toggle the inclusion of *.ext
  • Tcl on Cuda
    04 Jan 2009card a FX9500GT), in principle by adding the source of the recursiveGaussian.cu example to the file and calling the result tclAppInitnv.cu [http://www.theover.org/Diary/Ldi63/tclAppInitnv.cu] . Then ... theo/Tcl/tcl8.6b1/unix -ltcl8.6 -ldl -lz -lieee -lm` after setting: export LD_LIBRARY_PATH=`pwd`:/usr/local/cuda/lib and making a local data directory with the lena.ppm
  • Tcl on the Slug
    04 May 2007depending on flags set in a control register. Here is what file(1) says for tclkit-linux-arm: -bash-2.05b$ file tclkit-linux-arm tclkit-linux-arm: ELF 32-bit LSB ... stripped It should be possible to build Tclkit (I've already tried once but ran into path issues). Looks like I'll need to write a genkit.local to pass ''--prefix=/opt
  • Tcl on VxWorks
    04 May 2008http://sourceforge.net/tracker/download.php?group_id=10894&atid=360894&file_id=276425&aid=1955146 (this is a plain-text file). Apply the patch to the Tcl 8.5.2 source ... out Before starting Tcl, the ''pre-init'' script must be set to configure Tcl's library path, e.g., by running the following command in the VxWorks C interpreter: TclSetPreInitScript ("set ::tclDefaultLibrary
  • Tcl Package User Guide
    14 Feb 2018variable like `$auto_path` for these. Instead, use the commands `::tcl::tm::path add`, `::tcl::tm::path remove`, and`::tcl::tm::path list`. The environment variables `TCLX_Y_TM_PATH`, where `X ... a matter of directly employing the [load] or [source] command to make the code in some file available to Tcl. This can be seen in the following examples: [extension example] Typically, however
  • Tcl Performance
    30 Jan 2018microseconds per iteration % time {cd /home/fellowsd/arch; cd [file dirname [pwd]]} 100000 129 microseconds per iteration % time {cd /home/fellowsd/arch; cd [file join [pwd] ..]} 100000 131 microseconds per iteration ====== So ... a relatively long time if you have a large number of packages installed on your auto_path. Some packages try to load other packages using something like: ====== if {[catch {package require tcllibc
  • Tcl Portable Runtime Library
    22 Aug 2013time format handling. FileSystems: Native or [VFS], it's all the same. Support for varying file path syntaxes. [Tcl] interpreter: You can have none, one, or several; create or destroy dynamically. [[List
  • Tcl Repository Wish List
    02 Sep 2015completely open. I think it would be good if a known path relative to the repository root always returned a static file describing the complete repository's metadata - say e.g. Packages
  • Tcl Software Libraries
    15 Sep 2012on unmounted file systems, or small scale libraries. The current package command does not support these file finding needs: 1. Finding libraries on any platform except the locally mounted file system. 2 ... command piggybacks onto some of the features already present in the auto [load] functionality (using [auto_path] for instance) to allow for grouping files into a package and automatic loading of packages
  • Tcl Style Guide
    26 Jul 2018on the file. This is, of course, assuming you have installed Tcl/Tk. Alternatively, you may create a .bat file which explicitly executes tclsh or wish with an absolute path to your
  • Tcl Syntax help (Portuguese-PT)
    10 Jan 2013error PT] * [eval PT] * [exec PT] * [exit PT] * [expr PT] * [fblocked PT] * [fconfigure PT] * [fcopy PT] * [file PT] * [fileevent PT] * [filename PT] - nao é um comando, mas sim informação sobre ficheiros * [flush ... Tcl interpreter. Here is an index to these: * [argc] * [argv] * [argv0] * [auto_index] * [auto_oldpath] * [auto_path] * [env] * [errorCode] * [errorInfo] * [tclDefaultLibrary] on unix * [tcl_interactive] * [tcl_libpath] * [tcl_library] * [tcl_patchLevel] * [tcl
  • Tcl to C functions
    07 Mar 2017functions. This took me a while to get right, and is [Windows]-specific (write a .DEF file to describe the library): ====== set d [tcc::dll] $d ccode [cfunc tcl_mul {int a ... I modified the function tcc::to_dll in tcc.tcl to do tcc_1 add_library_path . which may not be the most general solution... but at least it's getting forward
  • Tcl Tutor
    23 Sep 2017kit file, and the [tclkit] file for your platform. ''[escargo] 25 Mar 2005'' - except that I found that the starkit version of '''tcltutor''' will not execute directly if the the path of
  • Tcl warts
    01 Jul 2017in a file name''', you solve that problem in the same way you solve the others - make certain it is a relative path name: ====== % exec ls ./>stuff ./>stuff: No such file or
  • Tcl X10 Library
    15 Oct 2012would be: ====== package ifneeded x10 0.5 [list source [file join $dir x10.tcl]] ====== ---- '''This is a more elaborate usage example''' ====== lappend auto_path . package require x10 namespace import x10::* #Create the
  • Tcl++
    04 Feb 2016catch { package require Itcl }]} { # # If we can't have Itcl, load tcl++ # lappend auto_path [file join [file dirname [info script]] tcl++] package require tcl++ # # Fake presence of Itcl # namespace eval ::itcl
  • tcl-augeas
    16 Sep 2018augeas_match "$path/*"]] foreach f $list { if {[catch {augeas::get $::AUG $f} data]} continue set sublist [augeas_match $f/*] if {[llength $sublist]} { set id [$tree insert $node end -text [file tail $f
  • Tcl-Pkg
    26 Mar 2017file "./tcl-pkg-0.4.kit/main.tcl" line 76) invoked from within "source ./tcl-pkg-0.4.kit/main.tcl" ("uplevel" body line 1) invoked from within "uplevel [list source [file ... of extensions. ---- [Sarnold]: I notice the failure. I will add '''[[package require Tk]]''' and '''[[lappend auto_path ./lib]]''' with the inclusion of BWidget and TclXML in the source-zipped archive. [BWidget] is
  • tcl.js
    30 Jan 2016subcmd, func, privdata) { if (func == null) { throw "No such subcommand: "+ name +" " + subcmd; } var path = name.split(" "); var ens; name = path.shift(); var cmd = this.commands[name]; if (cmd == null) { ens = new Object ... this.index); } this.feedchar = function () { this.index++; this.len--; if (this.len < 0) throw "End of file reached"; this.cur = this.text.charAt(this.index); } } ---- [jcw] 2008-05-19 - There's a
  • tcl.js 0.2
    27 Jan 2016subcmd, func, privdata) { if (func == null) throw "No such subcommand: "+ name +" " + subcmd; var path = name.split(" "); var ens; name = path.shift(); var cmd = this.commands[name]; if (cmd == null) { ens = new Object ... len -= d; this.cur = this.text.charAt(this.index); } this.feedchar = function () { this.index++; this.len--; if (this.len < 0) throw "End of file reached"; this.cur = this.text.charAt(this.index); } }
  • tcl.js 0.3
    27 Jan 2016subcmd, func, privdata) { if (func == null) throw "No such subcommand: "+ name +" " + subcmd; var path = name.split(" "); var ens; name = path.shift(); var cmd = this.commands[name]; if (cmd == null) { ens = new Object ... len -= d; this.cur = this.text.charAt(this.index); } this.feedchar = function () { this.index++; this.len--; if (this.len < 0) throw "End of file reached"; this.cur = this.text.charAt(this.index); } }
  • tcl.js 0.4
    27 Jan 2016subcmd, func, privdata) { if (func == null) throw "No such subcommand: "+ name +" " + subcmd; var path = name.split(" "); var ens; name = path.shift(); var cmd = this.commands[name]; if (cmd == null) { ens = new Object ... this.index); } this.feedchar = function () { this.index++; this.len--; if (this.len < 0) throw "End of file reached"; this.cur = this.text.charAt(this.index); } } ---- [RFox] Nowadays we can see Arnulf's
  • Tcl/2
    02 Sep 2015is no longer a namespace path, instead it is a "var path". A var path is the TCL list formatted equivalent to what is currently a namespace path, eg "::foo::bar" becomes ... a::b::c foo, set {a b c} foo. Rather than .top.menu.file, it should be { top menu file }. It has been my experience that this item alone confuses more new
  • Tcl/Tk 8.6 Roadmap
    28 Mar 2013fact the CMake team made specific changes to support the path quoting needed for pkgConfig defines passed in from the build file, which require some really weird quoting in MSVC 6 and
  • Tcl/Tk on Xwindows emulation on XP using Cygwin
    25 Jan 2011executable with cygwin stubs for file/socket/etc and with X server access. And, honestly, some of the ideasyncracies which go with for instance the /cygdrive/c/.... file paths, which make some ... self-compiled, which is easiest for the windows-window version, just make sure it comes first in your path, or change the /bin/wish symbolic link to what you prefer. ---- [Category Porting]
  • Tcl/Tk OS
    15 Sep 2013iso file containing little more than a Linux kernel and a dynamically linked tclsh and the libraries needed to run it. This is '''not''' to be construed as distribution of the file ... such that any non-tcl command would be looked for as an external command in $env(PATH) ? Seems like I've read something about that on this wiki, but can't seem
  • Tcl3D Discussion
    11 Mar 2018framework AGL \ -framework ApplicationServices /usr/bin/libtool: can't locate file for: -lSDL /usr/bin/libtool: file: -lSDL is not an object file (not allowed in a library) Just in case, I ... profile: ======none export TCLLIBPATH=/System/Library/Tcl export DYLD_LIBRARY_PATH=/Users/nuno/Downloads/tcl3dsh-Darwin-0.4.1/extlibs:$DYLD_LIBRARY_PATH ====== I have moved the directory tcl3d to the /System
  • tcl::tommath
    24 May 2012make it compile, I had to create an ''empty'' file called tommath_class.h and put it somewhere in the "-I" header include path. This is because tclTomMath.h contains the line
  • tcl_findLibrary
    04 Jan 2017arch directory; relative to the executable file in the current build tree; relative to the executable file in a parallel build tree. ---- Shouldn't $auto_path also be searched? How should one
  • tcl_interactive
    10 Jan 2017a .ico file as usual, and: ====== wm iconbitmap . -default [file join C:/my-path bdj_icon.ico] ====== [TomT] 2017-01-09 Ah... perfect, problem was an incorrectly built *.ico file. All good
  • Tcl_Objs
    26 Dec 2012Dup Internal: DupParsedVarName Update String: UpdateParsedVarName Set Internal: NULL ---- ***path*** [Tcl_ObjType]: `tclFsPathType` Define the 'path' object type, which Tcl uses to represent file paths internally. Free Internal: FreeFsPathInternalRep Dup Internal: DupFsPathInternalRep
  • Tcl_OO
    17 Mar 2018I first thought I'd be joking, but I just saw there is a large source file to implement all the well known oo features. Good reference list. Good also to decide ... referencing to a certain object in a certain class could include using the (class hierarchy based) path to that object: [send target_class.target_subclass.targe_tobject message] Streaming would indeed suggest
  • tcl_platform
    12 Mar 2018system * osVersion - the version of the os * pathSeparator — character used to [split] variables like `env(PATH)` into a proper Tcl list (from 8.6) * platform - which of the major types of ... in the form of (`lower-upper`). * dirSeparator - character used to separate parts of a fully qualified file name. * host - name of the machine evaluating the script. * osPatchLevel - patch level of the operating
  • TclApp
    11 May 2018have sdx behaviour|% &|get MP (mount point)|starkit::topdir|starkit::topdir||& &|Wrap path|MP/|MP/lib/application/|-anchor /|& &|Start file|MP/main.tcl|Option -startfile with autogenerated main.tcl|-nospecials|& &|Custom Icon
  • tclAuthorization
    06 Oct 2007X Authorization services: # - AuthorizationExecuteWithPrivileges() only for now # # Process this file with 'critcl -pkg' to build a loadable package (or # simply source this file if [[package require critcl]] and a compiler # are available ... errId->name && errId->code != status) { errId++; } return errId->name; } } #--------------------------------------------------------------------------------------------------- # # tclAuthorization::executeWithPrivileges /path/to/executable ?arg ...? # # this command takes an absolute path to an executable along with optional arguments for it, # and runs
  • tclbench
    03 Aug 20162)]: ** Synopsis ** : '''runbench.tcl''' ?''-option value ...''? ?''file ...''? ** Description ** The '''runbench.tcl''' application provides the overall management for the execution of benchmarks. If no specific benchmark ''file''s are provided on the command ... search for tcl interpreters. If no paths are specified the paths in the [env%|%environment variable%|%] PATH are used. '''-throwerrors''': Causes errors in benchmark files to be propagated out. '''-verbose''': Activates the
  • tclcairo
    18 Jan 201310 ::cairo::_cairo_path_data_t ::cairo::_cairo_path_data_t_header ::cairo::_cairo_path_data_t_header_get ::cairo::_cairo_path_data_t_header_length_get ::cairo::_cairo_path_data_t ... which contains as well cairo, zip and png shared libs. Ok let's create a PDF-file having a red rectangle: ====== package require cairo set surface [::cairo::cairo_pdf_surface_create test
  • tclConfig.sh
    04 May 2009LIB_SPEC: This one is useful. TCL_STUB_LIB_FILE, TCL_STUB_LIB_FLAG, TCL_STUB_LIB_PATH, TCL_BUILD_STUB_LIB_PATH, on the other hand, are redundant and not useful
  • tcldoc
    16 Aug 2017file). It also highlights comments for easier perusal. * Using the same file(s) generates an ''annotated'' view that summarizes the contents of the code. The annotated view extracts comments from the file ... I didn't have any problems at all running it. Basically you do something like: ====== tclsh path/to/tcldoc.tcl docs filename.tcl ====== [PW]: Thanks, that works well. I did read the
  • TclDOM
    03 May 2016http://tclxml.sourceforge.net/tclxml/3.2/tcldom.html%|%official reference]: ** Examples ** [Get an XPath location path from a DOM node]: [XSD schema validate an XML document]: [tkxmllint]: uses TclDOM/libxml2. Examples ... it correctly documents the -attributes option. ---- This code will validate an XML document using a schema file. ====== set fd [open "foo.xml"] set xml_instance [read $ch] close $fd set doc [dom
  • TclHttpd
    15 May 2014a procedure extracted from the doc file linked above: 0. create directories demoCA/newcerts and demoCA/private. Create a blank file demoCA/index.txt and a file demoCA/serial containing '01' touch ... IE) no longer trims trailing spaces in the cookie value, so a cookie like 'mycookie=7721ab4ee9b3e95f4693940334493aa8 ; path=/ ; expires=Monday, 17-Dec-2018 16:00:00 GMT ;' has its value set to "7721ab4ee9b3e95f4693940334493aa8
  • Tclhttpd as a Windows Service
    25 Mar 2017correct over time. ---- [WJR] The log file path mentioned above was fixed by specifying an absolute path to the logfile directory in the TclHttpd config file. ---- [MHo] Take a look at [Tclhttpd
  • Tclhttpd Document Domain
    07 Jun 2012path from the URL ** Translate URL suffix to file path relative to this Document domain's `DocRoot` ** Translate paths which specify personal home pages to absolute paths. * Get file content from path
  • Tclhttpd Error Handling
    30 Oct 2012file if {[catch {Doc_GetPath $sock} path]} { set path {} } foreach dir [::struct::list::Lreverse $path] { set file [file join $dir .nf] if {[file exists $file]} { global Template set html [TemplateInstantiate $sock $file
  • tclhttpd Examples
    06 Sep 2013Httpd_ReturnFile $sock image/jpeg $path } # construct the necessary pathnames set file [file tail $path] set icache /tmp/tclhttpd-icache/ set image [file join $icache ${scale}-$file] file mkdir $icache # use the
  • tclhttpd Generic Caching
    22 Sep 2018Fetch {path {bcache 1}} { global Cache # handle cached generated files if {[file exists ${path}$Cache(suffix)] && ([file mtime $path] <= [file mtime ${path}$Cache(suffix)])} { # file exists ... return it set fd [open ${path
  • tclhttpd gzip compression
    23 Oct 2013htdocs_file} { set path [file dirname [info script]] set path [file dirname $path] set path [file join $path htdocs] set filename [file join $path $htdocs_file] set gz $filename.gz if {![file
  • tclhttpd Indirect domain
    20 Nov 2004the query data. Url_QuerySetup $sock set path [file join $directory [string trimleft $suffix /~]] set path [file normalize $path] set data(path) $path ;# record this path for not found handling set data
  • TclHttpd Needs
    09 Jun 2012in the path to root? [DG] There was one in the docroot, but I don't recall the contents of it. It called into routines from the root .tml file, but security
  • Tclhttpd range requests and single interpreter virtual hosts support
    15 Dec 2013set path [file join $directory [string trimleft $suffix /~]] + set path [file join $directory [lindex $data(vhost) 1] [string trimleft $suffix /~]] set path [DocPathNormalize $path] set data(path) $path ;# record this path for
  • TclHttpd RSS Processing
    06 Jan 2013return true } } proc tmlrss::uriBase {uri} { array set info [uri::split $uri] set info(path) [file dirname $info(path)] return [eval uri::join [array get info]] } proc tmlrss::getRSSVersion {doc} { set root
  • tclhttpd session templates
    01 Dec 2013the root downward. global Template set libs [Doc_GetPath $sock $path] foreach libdir $libs { set libfile [file join $libdir $Template(tmlExt)] if {[file exists $libfile]} { append script "source $libfile" \n } } # generate interpreter
  • TclHttpd Templates
    08 Jun 2012requested file isn't found, and redirect to that template. The [[Doc_$mime]] proc for that file extension can then check if the file needs template processing (ie: if the path has
  • Tclhttpd Winservice
    23 Mar 2017Also, it's likely that you will have your own tclhttpd.rc-Configuration-file. On windows, the auto_path is automatically extended to the lib folder of an existing Tcl installation (auto
  • tclhttpd XML server
    23 Feb 2005proc XmlDb/delete {name} { XmlOp deleteDoc $name } proc XmlDb/get {name} { XmlOp getDoc $name } proc XmlDb/find {path} { XmlOp findDoc $path } proc XmlDb/findNode {path} { XmlOp findNode $path } ---- [Category TclHttpd] | [Category XML] ... to the correct paths * add 'package require XmlSvr' and 'XmlDb_Url /XDB' to the tclhttpd startup file Available commands: * insert - 'doc' argument - inserts the xml document into the database and returns the
  • tcliki - a webserver based on DustMote
    09 Mar 2017csock $fileserve return } } ## Serve Document # csock : client socket to serve document on # fileserve: $docroot/path/to/document open file to serve proc serveDoc {csock fileserve} { global httpCodes fconfigure $fileserve -translation binary fconfigure
  • TclIndex
    21 Dec 2011a special index file named tclIndex. This index file contains references to all the procedures defined in all the files. You can then modify your application's [auto_path] variable to include
  • Tclkit
    24 Jan 2018the lib* files from the lib path of my Tcl installation. My test program is as follows: ====== load libimg1.2.so Img image create photo -file foo.jpeg ====== When I run the
  • Tclkit and Android
    22 Feb 2015with: your system path, your bin path, new tclkit name (ex. tclkit863) and old one (ex. tclkit861). Run `su` to gain root access, and `sh tclkit.sh` where file tclkit.sh is
  • Tclkit Kitgen Build System
    21 May 2018of 'kbs.tcl' to ====== #! /path/to/your/wish8.5 ====== And you need 'sources/kbskit*/' for the standard kbskit.kbs or you always use your own with `-pkgfile=<path/to/your/kbsfile>` ---- [LV ... package index file C:/Documents and Settings/td26063/My Documents/Invincea Downloads/WindowsNT_kbsvq8.6-gui.exe/lib/dde1.4/pkgIndex.tcl: package not known error reading package index file C:/Documents
  • Tcllib Installation
    29 Sep 2015default to somewhere on the /usr path (preferably /usr/local/bin). I guess I will have to find where tcllib1.8 is hiding. [schlenk] Please file a bug report, when the installer
  • Tcllib URI
    21 May 20140 % set name "file://home/lwv26/myfile.txt" file://home/lwv26/myfile.txt % uri::split $name path /lwv26/myfile.txt scheme file host home ====== So it LOOKS like file is supported. ** VFS
  • TCLLIBPATH
    20 Sep 2018the [pkgIndex.tcl] file, etc. So the basic layout is: ====== Installation directory/ README.txt demos/ lib/ package1/ pkgIndex.tcl package2/ pkgIndex.tcl package3/ pkgIndex.tcl src/ tests/ ====== So, what path(s) go
  • TclMagick
    22 Apr 2017I did build TclMagick OK after modifying its project file. I would be like to get both the .dll and the "make" file if you can share. [sheila] aha, I had similar ... font on Windows eg $draw SetFont "<FONT>" for Annotation or you will get nothing. ====== lappend auto_path C:/Tcl/lib package require TclMagick set wand [magick create wand] set draw [magick create
  • tclMuPdf
    29 Oct 2017i-th'' embedded file. ( i >= 0 ) If option '''-dir''' is not specified, the embedded file is saved in the current directory. If option '''-as''' is not specified, embedded file is saved with ... work with password-protected PDFs. ** BUG-FIX removed limit to 130 char for extracting images (full path name length) ***Download *** Starting from version 1.2.1, you can download tclMuPdf in a
  • Tclodbc
    06 Sep 2013re copying the pkgIndex.tcl file and the dll (and any other files needed - read the pkgIndex.tcl to see what they may be), then [[lappend auto_path $env(TMP)]] and [[package
  • Tclodbc + BLT
    28 May 2011dbfile if {[file exists $dbfile]} { #database connect db "DRIVER=$driver;DBQ=$dbfile;SystemDB=$mdw;UID=$user;PWD=$password" database connect db "DRIVER=$driver;DBQ=$dbfile" } else { tk_messageBox -message "path does not
  • TclOO Tricks
    28 Feb 2018next $name {*}$args] } else { interp alias {} $name {} $object } return $object } ====== Missing things: * use the full namespace path for "name" * the destroy method should take care of delete the aliases created... [aspect]: what ... fileevent $fd readable [callback Readable] } method Readable {} { if {[gets $f line] >= 0} { puts $line } elseif {[fblocked $file]} { # do nothing } else { my destroy } } destructor { close $f } } new CopyToStdout [socket example.com 12345] ====== ---- **Ensemble
  • tclPkgUnknown
    22 May 2016auto_path` really takes precedence, first remove any occurrences of that value: ====== while {[set i [lsearch -exact $auto_path $mydir]] >= 0} { set auto_path [lreplace $auto_path $i $i] } set auto_path ... from within "package require execx2 0.1" invoked from within "puts [package require execx2 0.1]" (file "execx2test.tcl" line 8) D:\Home\Arbeit1\pgm\tcl\usr\Tst\execx2\test>tclkitsh % info
  • tclsh vs. wish
    27 Aug 2008situation with env(PATH). In OSX, starting applications does generally not make use of any shell, so if you only set up the environment in a unix shell initialisation file then it
  • TclTalk - Reports and Comments
    30 Aug 2013I know this spoils the proposed work flow. I need to rework "File->new" and "File->Open...", so that "File->Open..." always creates a new window. ''[escargo]'' - I guess because I see ... sure, that TclTalk can call your copy of [sdx].exe'''. Maybe you have to adjust your PATH. rgf: I'm running TclTalk 0.3.6.1 with (tclkit) tcltk version 8.4
  • tcltcc
    10 Jan 2017h''), it accepts the following methods: '''h add_include_path''' ''path'': '''h add_file''' ''filename'': '''h add_library''' ''filename'': '''h add_library_path''' ''path'': '''h add_symbol''': '''h command''' ''tclname'' ''cname'': create
  • tcltkd
    11 Mar 2015menu invoke) ====== At a guess, a file name with spaces isn't being properly handled by menu invoke. ----- Yes,It shoud be put in some Simple path,like C:/Programs/Tcl, E
  • tclvars
    24 May 2014the index information read from disk. `$auto_noexec`: `$auto_noload`: `[auto_oldpath%|%$auto_oldpath]`: `[auto_path%|%$auto_path]`: `[dir%|%$dir]`: `[env%|%$env]`: `[TCL_LIBRARY%|%$env(TCL_LIBRARY)]`: `[TCLLIBPATH%|%$env(TCLLIBPATH)]`: `[errorCode%|%$errorCode ... TCL_LIBRARY)], some other directories based on an internal algorithm, the location of the application executable file, and the current working directory. `[tcl_patchLevel%|%$tcl_patchLevel]`: `[tcl_pkgPath%|%$tcl_pkgPath]`: `[tcl_platform
  • tclvfs
    12 Aug 2018and then following file accesses failed. It turns out that it all works fine, *if* the protocol is mounted *before* you do path manipulations (I was passing a path joined to an
  • tclvfs gotchas
    02 Jun 2014or 2) Basically, you want to know if the error in, e.g., 'file delete $path' is because the file is busy, it's a non-empty directory, the permissions are inadequate
  • TclX
    20 Sep 2018— [flock] — [for_file] — [funlock] — [fstat] — [ftruncate] — [lgets] — [pipe] — [read_file] — [select] — [write_file] ***Network Programming*** [host_info] ***File Scanning*** [scancontext] — [scanfile ... it is nowadays. **Replacement for wishx** Put this script, called wishx and marked executable, in your path: ======none #!/bin/sh #\ exec wish "$0" ${1+"$@"} package require Tk package require Tclx set argv
  • TclX Commands
    12 Jun 2016initialization file normally adds this to the auto_path. : '''tkx_library''' Path to the TkX runtime library. This is set only if your application has called Tkx_Init. The TkX initialization file
  • TclXML
    30 Nov 2013slave $path # override the safe restrictions so we can load our # packages (actually the xml package files) proc ::safe::CheckFileName {slave file} { if {![file exists $file]} {error "file non-existent"} if {![file
  • tcom
    24 Sep 2018to find out the 'path' to that macro. The XLA or XLM file or the workbook or worksheet containing the macro must be opened or given in that path!" Note that it
  • tcom Allows Emacs as Editor for MS Outlook
    17 Apr 2011file somewhere in your load-path and add a (require 'outlookedit) into your .emacs file * place the two Tcl scripts onto your system and edit the locations in the outlookedit.el file
  • Tcom examples for Microsoft Excel
    27 Feb 2018document.''' # Set the path to your excel file. set excelFilePath "book1.xlsx" set excelApp [::tcom::ref createobject Excel.Application] set workbooks [$excelApp Workbooks] set workbook [$workbooks Open [file nativename [file join [pwd
  • tcom server
    18 Sep 2012library file is included in a wrapped application, it must first be copied out of it: ====== set Filename [file join $::env(Tmp) com_link_process.idl] file copy -force -- [file join [file ... Windows registry key HKEY_CLASSES_ROOT\\CLSID\\$clsid\\tcom with two values: "TclDLL" contains the full path to the Tcl interpreter DLL to load. "Script" contains Tcl code which the Tcl interpreter
  • TCP Port Services
    14 Dec 2007as listed in an `/etc/services` file. It will write the data to a file named "tcpports" creating an array of the same name. The file can then either be [source]d ... csnet-ns 107 rtelnet 109 pop2 110 pop3 111 sunrpc 113 auth 115 sftp 117 uucp-path 119 nntp 123 ntp 129 pwdgen 137 netbios-ns 138 netbios-dgm 139 netbios-ssn
  • TDBC
    26 Jul 2018tdbc::odbc set connStr "DRIVER={Microsoft Access Driver (*.mdb)};FIL={MS Access};" append connStr DBQ= [file native [file normalize mydatabse.mdb]] tdbc::odbc::connection create db $connStr ====== Or for Excel: ====== package require ... the '''[SQLite]3''' driver (and sqlite software?): ====== package require tdbc::sqlite3 tdbc::sqlite3::connection create db "/path/to/mydatabase.sqlite3" ====== After installing the '''[PostgreSQL]''' driver and having a database on a server
  • tddiff
    12 Sep 2012foreach {dir1 dir2 out} $argv {} assert {![file isdirectory $out]} "out directory '$out' already exists" assert {![file exists $out]} "out directory '$out' is a regular file" file mkdir $out foreach f [NewIn $dir1 ... tree, but inspects the content of the files. -- [Sarnold] Usage: tddiff /path/to/webapp-1.2 /path/to/webapp-1.0 /path/to/changes/dir/to/be/created It can compare two
  • TEA
    07 Jan 2018defined by the `tcl.m4` file in [tclconfig], along with the `configure.in` and `Makefile` files in the [SampleExtension%|%sample extension]. A `makefile.vc` and `rules.vc` file is also included for ... every use of TEA gets these things right, it seems. Another tip - if you hard code path names (with versions in them ) into configure, make certain these are updated each time a
  • TEA Streaming encryption extension
    04 Jul 2013run: tclkit critcl.kit -pkg scrypt.tcl ---- ====== #test usage example # test.tcl lappend auto_path [file join [file dirname [info script]] lib/] package require scrypt set data "Hello World" set encrypted [scrypt
  • TEA2
    11 Sep 2012by 'load' in the pkgIndex.tcl file. Dependent DLL files on Windows must go in the bin directory (or other directory on the user's PATH) in order for them to be
  • TEA3
    28 Jan 2016with the sample extension. To generate the documentation, run `tea/toman.tcl` which generates a single file `teadoc.man` which can be processed by the [Tcllib] utility [doctools], usually with the [dtp ... LIBS([]) +#TEA_ADD_LIBS([]) +TEA_ADD_LIBS([-lrhubarb]) ====== then ======none $ autoconf $ ./configure $ make $ tclsh % lappend auto_path . % package require tclrhubarb % rhubarb_some_command ... ====== all on Linux, of course, there's a `win
  • TEA: a summary of trying to use it, Vince Darley
    20 Sep 2018file join .. $baselib] } else { lappend libraryPathList [file join .. $lib] } } } else { foreach lib $libraryList { lappend libraryPathList [file join .. .. bin $lib] } } # In case we are installing in a non-standard location lappend auto_path
  • Teacup
    08 Jun 2017file. When I want to use one of these applications, I '''COPY''' the file in question into '''ActiveTclFolder'''/bin, giving it a simple, memorable name. For instance, I might type === cp /path
  • teaget
    07 Jan 2018the path*** Windows: * Create a directory, for instance "D:/Tcl/bin" and add to the PATH environment variable * Put a copy of tclkitsh.exe in "D:/Tcl/bin" * Create a file like
  • Teapot
    14 Aug 2018regular # packages and can be used by all Tcl shells. lappend ::auto_path [file join $__ lib] catch {::tcl::tm::roots [list [file join $__ teapot]]} } unset __teapot __ } # TEAPOT LINKAGE END ====== <<categories>> Package | Repository
  • Techniques for reading and writing application configuration files
    17 Dec 2013exe> <zip_path>{some value}</zip_path> <parts_path>{some value}</parts_path> </config> ====== Then I use [tDOM] to parse and assign variables, like this: ====== package require tdom # Open config file and
  • telnet
    01 Jul 2016Mode access # # Arguments : Name : [In] Name of the file or the serial port # Mode : [In] Mode of connection # searchPath : [In] path of the file or serial port # Default Value - 0 # # Author : tcrone
  • TemplateRecall
    04 Oct 2014public variable template_path "" private variable TemplateText "" private variable Templ constructor {args} { eval configure $args if {$template_path eq ""} { error "Option -template_path not given" } if [catch {open $template_path r} infh ... attr 1] -price [lindex $attr 2] -quantity $q] } puts [tr render footer] } ====== ---- Here is the template-file template1.html: ======none [ =================== header ===================] <html> <head> <title>my site - [' title ']</title> </head> <body> <h4>The
  • Testing socketports
    02 Mar 2015if 0 { @tclsh %~n0.bat %* & @goto :EOF } # test the socktest-package, 30.10.2005 lappend auto_path ./ package require socktest 0.1 namespace import socktest::* # puts [info commands socktest::*] # test parallel behaviour ... 80] puts [localsockfree 23] puts [localsockfree ftp] ====== ---- '''pkgIndex.tcl''' ====== package ifneeded socktest 0.1 [list source [file join $dir socktest.tcl]] ====== ---- ====== ################################################################################ # Module : socktest.tcl # Last Chg.: 02.03.2015 # Purpose : test availability
  • Tetrahedron with 3dcanvas
    29 Apr 2018or a dependent library could not be found in library path" I'm running TclKit 8.4.2, and the dddcanvas10.dll file is in the launch directory. I even tried explicitly
  • Text Collapser
    20 Aug 2017over the tag. [LV] on line 97 of this file, it looks like this bind is wrong if 0 { bind $path.$tag <Destroy> {$path] tag delete $tag} } I don't see a
  • text_replacer.tcl
    01 Feb 2016input file \"$inFilePath\" to\ \"$renamedInFilePath\": $err. Input file not changed.\ Deleting the temporary output file." catch {file delete -- $outFilePath} set returnCode 1 } else { # Rename output file to the input file path. if
  • TFP
    17 May 2014the init path. It can contain procs and other startup code. # package require Tk load [file join $::shellbinpath megaimagetk.so] pack [button .b -text {Load image} -command { out 0 /path/to/somefile
  • TFTP Server
    24 Sep 2017the following command: ====== set auto_path ====== Create a folder (ex. tftpd) in one of the directories (ex. C:\Tcl\lib) and save David's code to a file (ex. tftpd.tcl) in
  • Thatch
    22 Jun 2018single-file TkChat # with optional installer. # 3. If using SIFT to install, wish is mandatory: # $ ./tkchat-1.482.tcl --install ./tkchat-1.482.tcl /new/home/for/tkchat user group 755 /path
  • the 'Freiburg' project port to windows
    19 Sep 2004system * (+) no path issues (you always in the 'cygwin' world native mingw: * (-) uses 'dll' -> new build system * (-) no libtool -> need its own 'Makefile' * (-) many path issues -> mingw gcc uses windows-path-system ... LINUX file system every build target uses NFS to get the sources local * (+) sources always up to date the local build is done by sym-linking the sources into a local file
  • The (Few) Differences between Tcl and Tclkit
    02 Sep 2015read or write files). As a script it is found at [[file dirname $argv0]]; as a starpack it is [[file dirname [[file dirname $argv0]]]] (or as [[info nameofexecutable]]). ---- [MHo]: Performing (de|en ... tclkitsh cryptdiff.tcl test sú^?äØ? What's that?????????? cryptdiff.tcl is: set auto_path [linsert $auto_path 0 [pwd]/des]; # ensuring specific des module package require des; set key {vnaspdou6134897(&%busdc
  • The BWise drum subwindow and driving a C-code sample processor program
    24 Jan 2011a sample output file. Double click the appearing output file, or load it in som eaudio player to hear the result. Some audio players don't close the file when done, so ... allows detuning. Replace the drumscan button command with an updated one, containing the name (and possibly path) of your sample processing executable: .fb.bscan conf -command {exec drtry.exe drum1.wav << [drumscan
  • The Classic 15 Puzzle
    09 Feb 2016screen to a PNG file, cropping the image, and converting the resulting PNG file to a JPEG file less than one-third the size of the PNG file. Thanks to FOSS developers ... tg) -1 set ppos $tg } return $MOVES } ##+########################################################################## # # GetPath -- gets path that "piece" will take to get to "to". How it completes # this path is somebody elses problem. # proc GetPath {piece to} { set
  • the FILTR
    14 Nov 2007Some very good ideas here! Starts happily from .kit file (in C:\path with spaces\bin\) and from a shortcut to that file from the desktop. One strange thing. Most often the
  • The Hello World program as implemented in Tcl/Tk
    28 Sep 2018have to run the file in an interpreter to determine if my code is right or wrong If it is right, the file will generate an exe file; If there are errors ... magic]): === #! /bin/sh # next line is executed by the shell, but a comment in tcl \ exec /path/to/wish'''M'''.'''N''' "$0" ${1+"$@"} set foo 0 button .b -textvariable foo -command { incr
  • The interaction between the I/O subsystem and the notifier
    12 Sep 2016There is a second path generating file events. Actually they are timer events but as they result in the execution of `Tcl_NotifyChannel` at the end of the path the generic part
  • The tcl-map GSoC2009 project
    09 Sep 2013path_to_tmp/TCL19B.tmp A function specified in the import table could not be resolved by the system. Windows is not telling which one, I'm sorry...while executing load path ... allow access to many different raster and vector geo-spatial data formats. The exact supported GIS file formats can be found at: http://www.gdal.org/formats_list.html http://www.gdal
  • The TK GUI - Q&A
    13 Feb 2016resolved. Thank you all in advance! FW: All you need to do is determine the Tk path (ie .dialog1 or however IWidgets names them) of the dialog boxes. Then it becomes pretty ... a screen for a moment. What technique to use to avoid that? FW: Try reconfiguring the -file for the image, which (I believe) will redraw it without destroying anything. ---- **How To Drag
  • Thoughts on Examples
    28 Oct 2012should show the essence: * If you want to show the idiom of dealing with path names and file names, then show the proper commands for this. * If your major concern is how
  • Thread Logger
    16 Nov 2015path. # If not provided the file name will be today's date. # Set to false if you only want to do screen prints tsv::set logging ID true # File Path and File
  • Tickler File
    28 Jul 2011your inbox. ====== #!/bin/sh # execute in tclsh from path \ exec tclsh "$0" ${1+"$@"} #----------------------------------------------------------------------------- # ticklemail.tcl # A simple script to implement an email "Tickle File" # Written by Michael Kirkham. Released to public domain
  • tiff package (in pure tcl)
    11 Sep 2012file join $dir tiff.1.0.tcl]] Please reap the second code and save it as tiff.1.0.tcl file: ====== uplevel #0 { package provide tiff 1.0; lappend ::auto_path [file
  • Tilde Substitution
    06 May 2011fileattributes {file {attribute {}} args} { if {[string first \x0 $file] > -1} {error "Null character not permitted in path."} if {[string index $file 0] eq {~}} { set file ./$file } eval file attributes [list $file] $attribute
  • Tile and BLT together on MacOS X
    25 Sep 2012MacPorts Tk package that could be used by adding the tile folder to 'auto_path': lappend auto_path /Users/Torsten/Tcl/packages/tile/lib Note, that the 'aqua' theme is not available ... the following advice: ''Never mix distributions and/or versions'' Compiling Tile requires a private Tk header file (tkInt.h). This is not included in MacPorts' distribution. It will not be very helpful
  • tile themes - base64 encoded
    27 Oct 2009Oberdorfer # mail-to: [email protected] # ------------------------------------------------------------------------- # This source file is distributed under the BSD license. # ------------------------------------------------------------------------- # where to find tcllib: lappend auto_path [file join $::env(HOME) "t/lib1"] package require base64
  • tiled image
    27 Jan 2014frame, radiobutton, scrollbar, and toplevel. With the latter, set tiled_image [image create gimg tiledImage -file image_file_name -tile 1] can be used anywhere that a conventional [Tk] image is valid ... 0 {set image $oldImage} 1 {set image [lindex $args 0]} default { return -code error "usage: tile path ?image?" } } if {$image != $oldImage || [string length $image] == 0} { $canvas delete all } if {[string length $image
  • TIP #257 Discussion
    07 Jun 2014variables instvariable y instvariable -publicy # superclasses ; we could use "inherit" as syntactic spice for # "namespace path". namespace path classA classB # class method proc classProcA {args} {body} # instance method method instMethodA {args} {body ... object by accessing directly through the namespace? In fact, can the namespace be "anonymous" (like a file handle, or the like)? Somebody could always do a namespace current, but it might be
  • TIP #323: Do Nothing Gracefully
    13 Jun 2015names. `[namespace upvar]`: Accept zero variable names `[tcl::tm::path%|%::tcl::tm::path] add`: Accept zero paths. `[tcl::tm::path%|%::tcl::tm::path::remove]`: Accept zero paths. `[variable]`: Accept zero variable names ... no arguments at all being passed. <<br>> The TIP modified the following commands: `[file delete]`: Accept zero pathnames. `[file mkdir]`: Accept zero directories. `[global]`: Accept zero [variable] names. `[glob]`: Accept zero patterns
  • TIP #431 Discussion
    21 Jul 2017EXISTS`, `ERROR_PATH_NOT_FOUND`) in `tclWinError.c` and this translation is tested in `winFCmd-4.3` and `4.2`. A future enhancement might add platform-specific prefix options to [file createdir
  • Tk 9.0 WishList
    23 Jun 2017text widget to a file. I'm on Windows and tk_getSaveFile saves the file with LF/CR (DOS) line ending. What if I want to save the file with LF (Unix ... response to winfo children. Ex : ====== tk registrer .pseudowidget -path .pseudowidget_ -destroy {destroy .pseudowidget_; do other things} % winfo pseudowidget .pseudowidget 1 % winfo pseudowidget .pseudowidget -path .pseudowidget_ % winfo children . .pseudowidget % pack .pseudowidget % destroy .pseudowidget
  • Tk and msgcat
    24 Jun 2012Langue" msgcat::mcset fr "English" "Anglais" msgcat::mcset fr "File" "Fichier" proc translate { original } { set translated [msgcat::mc $original] return $translated } } lappend ::auto_path . package require tkinternat tkinternat::configure -translationcmd "mynamespace::translate
  • Tk demo framework
    20 Jan 2014cool if there were a general way to combine the program and documentation into a single file.'' [AM] (17 october 2002) For Tcl scripts, there is such a way. We have to ... available two or three commands, such as: ::Demo::tk::show pathName builds a demo rooted in path$name ::Demo::tk::info description returns the description of the demo ::Demo::tk::info code
  • tk dialog confirming execution of program
    29 Jan 2014dialog before execution. Usage: tkdialog shutdown Make sure to 'chmod +x' and put the file into you executables path like /usr/local/bin. Here is the code: ====== #!/usr/bin/env tclsh package
  • Tk editor application template
    03 Oct 2012m] } $File add command -underline 0 -label "New..." -command myAppFileNew $File add command -underline 0 -label "Open..." -command myAppFileOpen $File add command -underline 0 -label "Close" -command myAppFileClose $File add separator $File ... standard than "/usr/bin/wish" ?? [IDG] Because it allows users with non-standard versions in their path to get what they want. On my system, === ~> /usr/bin/tclsh % info patch 8.5
  • Tk frame in MFC CFrameWnd
    25 Apr 2012id %s", tinfo_panel->tk_path); Tcl_Eval(interp, buffer); Tcl_GetInt(interp, interp->result, &i); tinfo_panel->tkhwnd = reinterpret_cast<HWND>(i); Tcl_Eval(interp, "source [file join C:/ home TkinMfC
  • Tk glossary
    30 Oct 2008path, such as a [TCP] connection or a shared memory buffer. This program is referred to as a client of the window system server. More precisely, the client is the communication path ... the "." character is used in the same way as "/" is used in the hierarchy of unix file names. Thus the root window is called "." (a period), the children of the root have
  • Tk image Dos and Don'ts
    16 Mar 2015both the '''-data''' and '''-file''' options are specified, the '''-file''' option takes precedence. No mention of the canvas. [MG] The [Img] package allows capturing windows by specifying a path as `-data` (with
  • Tk Robots
    03 Aug 2013file -label "File" -underline 0 .m add cascade -menu .m.pref -label "Preferences" -underline 0 .m add cascade -menu .m.xhelp -label "Help" -underline 0 menu .m.file -tearoff 0 .m.file ... end "Preferences\n" header set txt " o 'Safe Mode' won't let you move into the path of a robot\n" $w insert end $txt b set txt " o 'Push Scrap' lets
  • Tk Robots2
    03 Aug 2013file -label "File" -underline 0 .m add cascade -menu .m.pref -label "Preferences" -underline 0 .m add cascade -menu .m.xhelp -label "Help" -underline 0 menu .m.file -tearoff 0 .m.file ... insert end $txt b set txt " o 'Safe Mode' won't let you move into the path of a robot\n" $w insert end $txt b set txt " o 'Show Safe Moves
  • tk_chooseDirectory
    08 Oct 2018tk::dialog::file::chooseDir::, but it has an odd bug that took me a while to track down. When you select a directory and click OK, it returns the path to the
  • tk_dialog
    24 Aug 2016title "The Answer" -message "answer=$answer." ====== ---- [LGT] bitmap parameter can be "@" followed by a path to an .xbm file. ====== set answer [tk_dialog .dialog1 "The Question" "You can have" "@../images/myquestionicon.xbm
  • tk_getOpenFile
    30 Jan 2016close $fid ====== Comment: The test path from tk_getopenFile contained several international characters. The variable ''filename'' outputs to file as correct utf-8 while using non-binary file I/O only when
  • tk_getSaveFile
    07 Oct 2016while saving to \"$file\"" } else { tk_messageBox -parent . -icon info \ -message "Save successful" } };# saveAs ---- [KPV] One OS X oddity, if you specify a path instead of just a file in ''-initialfile'' you
  • tk_messageBox
    04 Nov 2017the habit of coding set about "Short descriptive text for the app, at beginning of source file (also serves for some documentation)" ... button .a -text About -command [list tk_messageBox -message $about ... g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1" transform="translate(-108.03332,-902.52695)"> <path sodipodi:type="star" style="opacity:1;fill:#ecf547;fill-opacity:1;stroke:#e42929;stroke-width
  • Tkabber
    03 Aug 2016files in your exe path, which I would prefer to use. So, any starkit in your exe path would be available for loading. This makes for simple file placement for beginners on
  • TkAero
    22 May 2011twapi command is no longer required. The (renamed) dwm::extendframeintoclientarea command now takes a Tk window path and figures out the HWND itself. The link has been updated, and recompiled in native ... tkaero couldn't load library "TkAero.dll": invalid argument ====== ---- ====== /* * TkAero.c - The one-and-only code file for TkAero.dll * Written by jdp 2009 * This program is licensed under a Tcl-style
  • tkButtonFly
    28 Aug 20113D buttons - and therfore no "fly". set auto_path [linsert $auto_path 0 [file dirname [info script]]] set auto_path [linsert $auto_path 0 [file dirname [info nameofexecutable]]] # Some functions to implement
  • Tkcon
    29 Jan 2018can't load procs in this config file. # ah: set ::tkcon::OPT(slaveeval) {source $env(HOME)/tclshrc.tcl} ====== [kpv]: Here's my tkcon.cfg file as a more complicated example: ====== set ::tkcon ... with Tk on Windows and Macintosh, but can also be used under Unix. Provides command history, path/proc/variable name expansion, multiple interpreter consoles, captures stdout and stderr, character and proc highlighting
  • Tkcon as an IDE shell
    02 Jul 2014path mode} { # puts "retr $path $mode" # puts "path $path" set ns [string trim [file dirname $path] /] # puts "ns $ns" set path [string trim $path /] # puts "path $path" set name [string range $path
  • tkcon.cfg
    19 Apr 2016the resource file in "$env(HOME)/.tkconrc" (Unix), "$env(HOME)/tkcon.cfg" (Windows) or "$env(PREF_FOLDER)/tkcon.cfg" (Macintosh). On DOS machines, "$env(HOME)" usually refers to "C:\". The file might ... on this in the official documentation. ---- I don't remember why this is useful: lappend auto_path . [lv] - this line tells tkcon to look in the ''current working directory'' for libraries when
  • tkdiff
    02 May 2018difference regions, side by side viewing of files, linked scrolling, random access to the difference regions, file merge, and online help. Requires Tcl/Tk. Also supports [SCCS], [RCS], and [CVS], and [Subversion ... updated tkdiff.kit in [sdarchive] to 4.0b2 - when renamed to "tkdiff" and placed in the path, it works fine with Keith Vetter's [Wiki History Diff] script -[jcw]'' ''[escargo] 26 Mar
  • TkDND
    15 Feb 2017this directory. Add the new directory to auto_path in your application, call 'package require tkdnd' and use it. Example: ====== lappend auto_path [file join .. "dont just copy this example directory" tkdnd
  • TkDND Tutorial
    14 Nov 2016DND_Files: this type can be used for transferring a list of file/directory names, or URLs. Note that transferring file/directory names or URLs is always made as a set, thus ... unregister" (according to whether we create a drop target or we delete an existing one), the path of the Tk widget to be registered/unregistered, and a list of types, the drop
  • tkGetComics - to get 'old' comics from comic archive web-sites
    07 Jun 2014convert the retrieved file ## to a GIF file --- and display that file.) ## ## A 'SaveAsGIF' button on the GUI offers the user the option to ## save the comic as a file on the ... 20. ## Reference: http://wiki.tcl.tk/1039 on 'exec' ## --- to avoid getting 'Illegal characters in URL path' ## error from the ' http::geturl "$picURL" ' statement ## in the 'show_image_...' proc. ########################################################## set picURL [string
  • Tkgetfile - An enhanced FileOpen browser replacement for tk_getOpenFile
    20 Apr 2018w $tkgetfilemsg(parent) } # path independent names for the widgets global tkgetfile set tkgetfile(entry) $w.file.eframe.entry set tkgetfile(list) $w.file.sframe.list set tkgetfile(scroll) $w.file.sframe.scroll
  • tkmacicons
    23 Jul 2015takes three arguments: a file path or file extension, width, and height. If a file path is specified, then the package will return the specific icon for that file as defined by
  • tkpath
    18 May 2018in the source file is changed to "tkp::widget". Is this behaviour correct? Sould the indexes no be antialiased? ---- '''[pup] - 2015-09-15 10:58:17''' '''canvas_path postscript -file /tmp/tmp123
  • tkScriptApplicator - a mini-system to select files and select-and-apply a shell script
    30 Jul 2014options: - Navigate-dirs (click in the left listbox) - Change the current-directory path (click on the 'Jump2dir' button) - Select-file(s) (click in the right listbox) - Select-and-Apply a shell script
  • tkSokoban
    05 Oct 2018from point A to point B. '''Levels''' The level file format used by tkSokoban is a "standard" format known as an "xsb" file (for X-Sokoban, I think?). Additional levels are available ... of the Sokoban puzzle game. It contains several advanced features including keyboard and mouse control, automatic path finding, unlimited undo, level statistics, and "skinable" levels. It includes 250 levels and some pretty
  • tktree
    18 Jan 2013close the group ## -image = the path of an image to be drawn as an icon for the item ## by default an image is drawn (folder or file) ## set the option to null
  • TkTwig
    24 Mar 2014return 1 } ### # # # proc tktwig::adjustConfig {} { variable cfg #set cfg(configFile) [file normalize $cfg(configFile)] #set cfg(bundleFile) [file normalize $cfg(bundleFile)] } ### #------------------------------------------------------------------- # File #------------------------------------------------------------------- # # # proc tktwig::loadFile {{fn {}} {filetypes {}} } { variable cfg variable gui variable ... Cassoff} set cfg(twigpack) 0 set cfg(tclsh) tclsh set cfg(wish) wish set cfg(twig) /path/to/twig.tcl set cfg(run) $cfg(wish) set cfg(runPipe) 0 set cfg(configFile
  • tls
    10 Apr 2018I have searched in the CA file and identified the missing certificate, which I could copy from the Firefox browser and paste into the CA file. Then the connection through the Tcl ... the system, or readme, or something had me thinking that I needed to give configure the path to the directory where the .h was, when just as the ./configure —help says, it
  • TLS server using TWAPI
    20 Apr 2016file we create an echo-server using ssocket. # apply [list {} { set base [file normalize [file dir [info script]]] set fbase [file join $base cert] set ::auto_path [linsert $::auto_path 0 [file
  • tm
    23 Oct 2010path is returned by the command [[::tcl::tm::path list]]. The command [package require] searches the "module path" directories for modules, which are files named "*.tm". The name of the module file
  • To build and test Tcl
    22 Jun 201832 and 64 bit, but shared libraries not. The Tcl [auto_path] is: ======none $ /usr/local/bin/tclsh8.6 % set auto_path /usr/local/lib/tcl8.6 /usr/local/lib /usr/local ... of Tcl are frequently something like: * Download a copy of the Tcl source zip or tar file. * Create a directory where you plan on compiling the code. * Extract the source code (unzip
  • Tom Krehbiel
    30 Jun 2018Wiki::init <db-path> [<R/W-flag>] [<tk-path>] [<page>] Where: <db-path> - path to .tkd database <R/W-flag> - 1=readonly; 0=readwrite; default is readonly <tk-path> - path to top ... creates menubar objects] * [Multi-Core Processor Test using Threads and Critcl] * [Profiling a TclOO class] * [Random Dot Stereogram] * [Porting To Windows] * [Write PNG File (without using Tk)] * [Zip A Directory] <<categories>> Person
  • ToolBar -An Alternative to the BWidget ButtonBox
    01 Sep 2013change settings.. #--------------- proc ToolBar::configure { path args } { set res [Widget::configure $path $args] return $res } #--------------- # inquire about currents settings.. #--------------- proc ToolBar::cget { path option } { return [Widget::cget $path $option] } #--------------- # add a new ... padx 0 -anchor nw foreach {i img hlp} { 1 New "New Document" 2 Open "Open New File" 3 Save "Save Work" } { .tb1 add button b$i \ -image [Bitmap::get $img] \ -relief flat
  • TOOT revisited
    02 Mar 2014puts "The capital of $country is $capital" }] capitals class File { constructor filename { self name = $filename } method size {} { file size $name } method nativename {} { file nativename $name } method enumerate {proc seed} { set fd [open ... class (namespace). # proc class {name body} { set name [resolve 1 $name] namespace eval $name [list namespace path [namespace current]] namespace eval $name $body namespace eval $name { namespace export {[a-z]*} namespace ensemble
  • Toplevel widgets in a tree hierarchy
    07 Oct 2013Let's say that an error is raised when the system tries to access a font file on the disk: an error dialog will pop up to inform us. The font dialog ... focus mode is '''ontop''': the window is just raised. Then the tree is traversed following the path of "tofocus" windows, raising all of them: if a window with no focus-thief is
  • Toplevel widgets in a tree hierarchy: the package
    07 Oct 2013described here, # provided that the new terms are clearly indicated on the first page of # each file where they apply. # # IN NO EVENT SHALL THE AUTHOR OR DISTRIBUTORS BE LIABLE TO ANY ... it and return. # # If its mode is "ontop": raise it. Then descend the tree following # the path of "tofocus" windows, raising all of them: if a window # with no focus-thief is
  • Trac Implementation
    30 Aug 2011fail)' In the above command, the file open primitive fo is directed to open the file named abc. In case the primitive cannot open the file, the primitive statement provides the argument ... and a string as its third argument. The address of a text form is the node_path to and name of the form. (For information on forms see Section 1.7, "Forms
  • Traits
    02 Mar 2014cleaner (IMO). So it should be possible to do similar tricks like: [undoable [contextmenu [autocomplete [entry $path]]] However, the main difference here is that typically these "traits" would be overriding the same ... www.iam.unibe.ch/~scg/cgi-bin/oobib.cgi/htgrep=/~scg/cgi-bin/oobib.cgi&ftpstyle=file&isindex=nathanael+applying+traits+to+the+collection+hierarchy+oopsla&bibtex=plain&abstract=yes?Blac03a] paper
  • Transparent Toplevel
    29 Jul 2012path.c] -fill both -expand 1 # Find out the desktop wallpaper image set file [registry get HKEY_CURRENT_USER\\Control\ Panel\\Desktop \ Wallpaper] set im [image create photo -file [file normalize $file
  • TreePad -Structured multipage text editor using TreeCtrl
    26 Aug 2012fname \ -title "Save File..."] tree:save $tree::path $tree::fname }} } # add a couple of items to the 'standard' edit popup append ::popup::menu(edit) { {separator} {command -label "Insert File.." -command { set tmp
  • Trees as nested lists
    29 Dec 2015prefix]} ;# leaf set res } proc fromRoot index { set res {} set path {} foreach i $index { if $i {lappend res [concat $path 0]} lappend path $i } lappend res $index } proc absolutePath {tree index} { set ... return {}} foreach d [glob -type d -nocomplain -- $dir/*] { lappend L [Directories $d $depth] } return [nl2 right [file normalize $dir] {*}$L] } # basic graphic user interface proc Gui {} { toplevel .top1 wm title .top1 "Tree
  • treeselect
    08 Jun 2017variable version [lindex [split [file root [file tail [info script]]] -] 1] variable debug 0 proc file-to-tree {path} { set documentTree [::struct::tree] set html [::fileutil::cat $path] htmlparse::2tree $html $documentTree
  • trie
    03 Mar 2013what} { set path [my find_path $what] if {[join $path ""] eq $what} { Debug.trie {del '$what' along ($path) was [dict get $trie {*}$path]} if {[catch {dict size [dict get $trie {*}$path]} size ... read all words in a text into the trie proc read-trie file { set t [trie create] set in [open $file r] while {[gets $in line] >= 0} { foreach word [regexp -all -inline
  • troff
    30 Jul 2016of a Tcl Manpage** ====== set filename [file normalize .../path/to/namespace.n]; # namespace.n for example purposes only cd [file dirname $filename] exec groff -Tpdf -man [file tail $filename] >output.pdf ====== Note
  • tsql4mk
    21 Nov 2017you use the ''[tclkit]'' [http://www.equi4.com/] runtime * console, library and documentation are in one file -> easy installation and deployment * yan can start with tsql4mk and later on switch to [SQLite ... from ''www.equi4.com'' [http://www.equi4.com/pub/tk/downloads.html]. Put it in your path. Download tsql4mk.kit from ''here'' [http://goblet.molgen.mpg.de/tsql4mk/tsql4mk.kit]. Done! '''History
  • tsreplace
    19 May 2007File {path opts} { ShowFile $path $opts global STATUS FILE set STATUS proceed set STATUS proceed if {[dict get $opts backup]} { if {[catch {file copy -force $path $path.bak}]} { Error "cannot write $path
  • Ttk
    12 Jun 2018list $path $rw [string totitle $class] [winfo toplevel $path] all] # rename the container widget cmd and install # a proxy cmd to the real one rename ::$path ::${path}#border interp alias {} $path {} ::ttk ... c => ttkStubLib.c widget.c => ttkWidget.c widget.h => ttkWidget.h tile/library: => tk/library/ttk/... File names remained the same with these exceptions: paned.tcl => panedwindow.tcl stepTheme.tcl => ''n/a
  • ttk::combobox
    15 Sep 2018path get]] if {[string equal $text ""]} {return} set values [$path cget -values] set x [lsearch $values $text*] if {$x < 0} {return} set index [$path index insert] $path set [lindex $values $x] $path ... the font size for all combobox dropdown listboxes: ====== option add *TCombobox*Listbox.font EntryFont ====== (from the file tcl8.5/lib/tklib/ttk/combobox.tcl) ***Why is there no -font option*** [HaO] 2015
  • ttk::messageBox
    08 Feb 2015these files in a directory listed by $[auto_path], or use the command "[lappend]" to append the directory containing the files to auto_path '''Download it ''' The files are available at: [http ... work that inspired me. [Schelte Bron] created a replacement that works great under Unix for the file selection dialogs, present at: [http://wiki.tcl.tk/15897]. I was inspired by his work
  • Ttrace
    01 Jun 2018package require list 0.1 % set slave [interp create] interp0 % $slave eval [list set auto_path $auto_path] ... % $slave eval { package require Ttrace ttrace::eval {package require list; package require dict} } 0 ... THREAD_LIBRARY)] && ..." line 11) invoked from within "::apply {{dir} { if {[info exists ::env(TCL_THREAD_LIBRARY)] && [file readable $::env(TCL_THREAD_LIBRARY)/ttrace.tcl]} { source $::env(TCL_THREA..." ("package ifneeded Ttrace 2
  • TTXN
    18 Oct 2017open-exception Test: { list [catch {open "not-existing-file.txt" r} f] $f } Expected: {1 {couldn't open "not-existing-file.txt": no such file or directory}} ====== and here is a more ... then run ====== tclsh hello.test ====== Note: be sure TTXN package is installed under a tcl-library path. Result should be something like this: ====== ==== weatherForecast FAILED ==== Contents of test case: # # ... forecast in progress
  • TWAPI
    12 Oct 2018doUpdate" write_shortcut $linkFile {*}$curArgs } } # file delete [file join [get_shell_folder csidl_desktopdirectory] test0000.lnk] # writeLink [file join [get_shell_folder csidl_desktopdirectory] test0000.lnk] -path "d:\\temp\\2014-11-21
  • TWiG
    15 Aug 2012path) $path } switch -exact -- $a(scheme) { echo { foreach e [list scheme path] { set r($e) $a($e) } set r(url) [::uri::join scheme $r(scheme) path $r(path)] } file { set a(path
  • Twigging
    27 Nov 2008the fortunes file and the second is the rest of the code. All I need now is a twigged line of code setting the name of the fortunes file. Fortunes file on ... if you're not using [TkTwig]).<<br>> These examples assume that [Twig] is installed in your path as 'twig'. ====== # run #111 $ twig 21912 4 | awk 'NR==111 {print}' | twig -c - | wish & # verify
  • UDP extension
    30 Nov 2012to type it I would type it wrong. ---- Small test script for Udp package ====== lappend auto_path [pwd]/Udp package require Udp puts stderr [info commands ::udp::*] proc moop {lport datagram remote ... structure describes per-instance state * of a udp channel. * */ typedef struct udpState { int sock; /* inderlying (tcp) file descriptor */ Tcl_Obj *script; /* script prefix for incoming */ Tcl_Interp *interp; /* interp this was instantiated
  • Ultimate Package Blast-o-rama
    10 Nov 2009zip 5. TBD: [['''package cvs''' $file]] ... might use the cvs in tcl package 6. TBD: [['''package svn''' $file]] 7. TBD: [['''package git''' $file]] 8. TBD: [['''package tar''' $file]] ... treat a tar (or ... It completely replaces [package] with a version which tracks additions to (note: not subtractions from) ::auto_path. First time it ever runs it creates a database under ~/.tclpkg into which it stores
  • Unix Domain Sockets
    07 Jun 2018the following can be used: socat UNIX-RECVFROM:/var/socket/name,user=whoever,reuseaddr,fork system'/path/to/myscript.tcl',fdout=3,nofork where a new script is (optionally) launched for each ... www.dest-unreach.org/socat/ ) **See also:** * [fifo] * http://sourceforge.net/projects/tcl-unixsockets%|%Unix Domain Sockets for Tcl%|% * http://chiselapp.com/user/stwo/repository/tulsa%|%Tulsa%|% <<categories>> File | Interprocess Communication | Channel
  • Updating image directories from a memorystick automatically
    13 Feb 2016DIR [file tail $i]] ; if ![file exists $inew] { file copy $i $inew } { puts "file existed: $itail" } } } ====== # This script makes use of the function [ilist], which returns a list of filenames including path
  • UPL: The Bootstrap File
    10 Jan 2005pretty much like Tcl's load - and 'loads' the dll/so whoose path follows on the command line. ---- The "Bootstrap File" is loaded by [UPL: The Bootstrap Interpreter]. ---- [RS] As the script
  • URI detector for arbitrary text as a regular expression
    25 Sep 2012path "(?:${nfs_path_segs}?)" set nfs_abs_path "(?:/${nfs_rel_path})" set nfs_net_path "(?://${hostport}(?:${nfs_abs_path})?)" set nfs_rel_url "(?:${nfs_net_path}|${nfs_abs_path}|${nfs_rel_path ... set fsegment "(?:(?:${uchar}|\[?:@&=\])*)" set fpath "(?:${fsegment}(?:/${fsegment})*)" set ftpurl "(?:ftp://${login}(?:/${fpath}(?:;type=\[AIDaid\])?)?)" # FILE set fileurl "(?:file://(?:${host}|localhost)?/${fpath})" # HTTP http://www.ietf.org/rfc/rfc2616.txt set hsegment "(?:(?:${uchar
  • Use Windows default mail client
    15 Oct 2009mailto string. The contents of the error dialog says === Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item. === and then a
  • Useful scripts for Sophos AV
    27 Sep 2012foreach prod $config(products) path $config(localpath) { puts stdout "Getting $prod" set data [geturl_auth $config(base_url)$prod $config(user) $config(passwd)] set fid [open [file join $path $prod] w+] fconfigure
  • Username/Password Database for Tclhttpd
    25 Jan 2014the session has ended. switch -exact -- $result { 0 { Httpd_ReturnFile $sock text/html $path } 1 { Doc_Subst $sock $path interp$session } 2 { Fmkt_ErrorPage $sock "This record locked by another user!" } 3 ... for authentication. It is to be called from # a .tclaccess file in the Directory you want authenticated access too. # In the .tclaccess file put the following # set realm "TclHttpd" # set callback Fmkt
  • Using Teacup for the first time
    06 Oct 2016Teacup] for upgrade instructions). You've installed [ActiveTcl], ensured that the executables are in the search path of your shell, and you're looking at a command prompt. I'm using Windows ... 5.0.0.272633.) Teapot contains a repository folder, which contains an INDEX and a config file, but there is no package folder yet. You'll use the TEAcup client to manage
  • Using Tk as a loadable package
    30 Sep 2012enter the event loop. The plain Tk8.3.4 build is still missing a pkgIndex.tcl file, so for now one has to load tk by hand: load libtk8.3.so This ... Mac OS X: load libTk8.3.a where .../Tk.framework/Versions/8.3/ is in the path. (Note that this doesn't work really - OS X Tclers know the "SetFrontProcess failed,-606
  • Using Windows Controls in Tk Windows
    09 May 2006calls. The "tk.h" header file has macros that can be used to get the Windows handle for a Tk widget. Once you know the widget path name, you can, therefore, get
  • valuepanel
    18 Jan 2013its internal data structures. # ARGUMENTS: "w" is the path of the widget. "args" are an optional option/value # sequence for configuration. # RESULTS: The path to the new widget is returned. A "nodes ... to receive suggestions about that. '''Make a Tcl module of it''' - It's all in one file, all in one separate namespace, so it won't be too hard a task... or
  • VFS
    12 Aug 20188.4] very robust), Tcl's file system is completely 'virtual file system aware'. What this means is that in principle you can divert ''all desired'' file system activity away from the ... given that we can simply examine 'argv[[0]]' and see if it is it is a path in a virtual filesystem and then hand it off appropriately, but could a vfs actually
  • vfs filesystem configuration
    25 Jan 2014filesystem attributes''' Currently, Tcl actually has no introspection into a filesystem, beyond the '`[file system] $path`' command which returns a Tcl-specific name ("native", "vfs"), and a type for the particular system
  • VFS Needs
    25 Jan 2014filesystem which algorithmically transforms a path before using it, by applying a proc to it. This would be useful to provide per-user views of a file system, such as mounting ~/.tcl
  • VFS, exec and command pipelines
    25 Jan 2014has impact on the interp startup as well (intialization of auto paths, package paths, library path, encoding path, ...) and on the encoding subsystem (as it cannot load any external encoding anymore). ---- Vince ... Channels. Instead it uses a new 'TclFile' structure which is a lightweight wrapper around a native file-descriptor (and is slightly different on Windows vs Unix). Then there are a whole suite
  • vfs::http
    02 Jun 2016address \"$dirurl\"" } if {[string length $file]} { return -code error "Can only mount directories, not\ files (perhaps you need a trailing '/' - I understood\ a path '$path' and file '$file')" } if {![string length $user
  • vfs::inmem
    06 Jan 2012Package [vfs::inmem] provides an in-memory file system via [tclvfs]. An in-memory file system should be useful for creating a file system hierarchy on which to mount other filesystems and ... to have an in-memory VFS is "vfs::mk4::Mount {} mountpoint", i.e. using an empty path. This differs from the above in a number of ways: defaults to compressed storage, also
  • vfs::webdav
    18 Dec 2011address \"$dirurl\"" } if {[string length $file]} { return -code error "Can only mount directories, not\ files (perhaps you need a trailing '/' - I understood\ a path '$path' and file '$file')" } if {![string length $user
  • vgrep: a visual grep
    01 Aug 2013foreach line $data { if {$re eq "" || [regexp -nocase $re $line]} { foreach {file path} [split $line ";"] break $text insert end $file black " ; $path\n" blue } } wm title . "[int [$text index end-2c]] hits
  • VIDBM
    21 Nov 2017see [vacprint]. /* dbm.c A file to use the old BSD style DBMs */ #include "tcl.h" #include <dbm.h> /* * Forward declarations for procedures defined later in this file: */ static int dbmCmd _ANSI ... 3) { Tcl_WrongNumArgs(interp, 2, objv, "path"); return TCL_ERROR; } res = dbminit(Tcl_GetString(objv[2])); if (res < 0) { return setTclError(interp, "dbminit failed on path %s, result is %d", Tcl_GetString
  • Virtual Hosts
    22 Aug 2014nslog" # Name to the log file ns_param file ${logdir}/${servername1}-access.log ns_section "ns/server/${servername2}/module/nslog" # Name to the log file ns_param file ${logdir}/${servername2}-access.log ... port for several hostnames (with logs) as per HTTP 1.1. ======tcl set package naviserver # Absolute path to the installation directory set homedir /usr/lib/${package} # Log directories (access log, error log
  • Visual Studio 2003 .sln file parser
    27 Sep 2012set path_to_delete [file join $cache_dir $url_arr(host) [file dirname $url_arr(path)]] if {[file exists $path_to_delete] && [file isdirectory $path_to_delete]} { file delete -force $path_to
  • VisualDSP builtin Tcl use
    08 Oct 2012If so, execute === puts $auto_path === and you will find the various folders where tcl libraries can automatically live, and of course you could add to that path to get it to ... the [Microsoft Windows]' (I run it on XP, I think it isn't available on linux) file selector, while I'd prefer to simply have a tcl script load the [IDE] with
  • VLC Tcl Extension
    02 Mar 2018state. I only need audio, and don't use playlists. The media sub-command only handles file paths right now. There's quite a bit that could still be implemented. But most ... objv[1]); if (stat (fn, &statinfo) != 0) { rc = TCL_ERROR; return rc; } m = libvlc_media_new_path (vlcData->inst, fn); libvlc_media_player_set_rate (vlcData->mp, 1.0); em = libvlc_media
  • vrtcl
    16 Jul 2017AMG]: How does this compare to [TDL]? See also the configuration file format I derived from TDL and implemented in [Config file using slave interp]. I'll answer my own question. TDL ... current specification of vrtcl, but describe what came up in the course of its design. '' The path to vrtcl began with a comparison between a JSON example and one plausible Tcl equivalent
  • VS Project List Editor
    27 Sep 2012all {%(.*?)%} $raw {$env(\1)} raw set raw [subst -nobackslashes -nocommands $raw] if {[file exists $raw]} { set raw [file nativename [file attribute $raw -shortname]] } return $raw } ##+########################################################################## # # KillZombies -- deletes all missing projects # proc KillZombies ... message $msg return } set cmd "/e,/select,$raw" exec explorer $cmd 2>@1 & } ##+########################################################################## # # ResolveProject -- Returns absolute path to a project (with no spaces) # proc ResolveProject {pretty} { global S vsInfo env set raw
  • waitman
    24 Jul 2011combine [join $request ", "] set path [web::request PATH_INFO] set content "<h1>Request Info</h1> <p>${combine}</p> <p>${path}</p> " === #2 load and display static HTML file. The static page is
  • Wapp
    27 Mar 2018https://wapp.tcl.tk/ | | Description | A lightweight, secure [web framework%|%web microframework] in a single source file. Serves HTTP/1.1 directly, but supports [CGI] and [SCGI] as well. Aims for a ... in advance, Doug. (I replaced the real domain with example.com) ====== #!/usr/bin/tclsh source <full_path>/lib/wapp/wapp.tcl proc wapp-default { wapp-subst { <img src="http://www.example.com
  • Wave player for formulas from BWise and Maxima on Windows XP
    24 Jan 2011included the probably sufficient Portaudio library source files, the path to them must be changed in procmathxp1.tcl (see below). The start1.tcl file indicates the order in which all files should
  • WBuilder
    18 Aug 2013PATH/libWrite.tcl" source "$PATH/libFile.tcl" source "$PATH/libProcess.tcl" source "$PATH/libBuild.tcl" source "$PATH/libCompile.tcl" proc Export {Src Dst} \ { puts "Export: $Src -> $Dst" if {![file exists $Dst]} {file
  • Weather Animations
    28 Sep 2012directory $Opt(img_path) ${file_glob}* ]] set prev_file [lindex $files end-1] if {$prev_file == ""} { return $filename } set f_size [file size $prev_file] if {$f_size == [file size $filename]} { set
  • Web pages with images
    18 Jan 2013set per input image: ====== set inp $path_to_source_images set outp $path_to_destination_images foreach i [glob $inp/*.jpg] {set j [file tail [file rootname $i]] ; eval "exec /bin/djpeg
  • web2desktop
    30 Nov 2015and write the image to a file: set gif_file [open $gif_image_path w+] http::geturl $url -blocksize 1024 -channel $gif_file close $gif_file #I have to convert to BMP
  • webchain
    07 Aug 2012HTTP/1.0 200 OK" puts $sock "Content-Type: image/$::content_type([file extension $fnm])" puts $sock "Content-Length: [file size $fnm]\n" fcopy $fileChannel $sock -command [list done $fileChannel $sock] } } else ... the emoticons. ====== #!/usr/bin/env tclsh # webchain.tcl - HTTP <-> IRC bridge catch {console show} lappend auto_path /target/staff/decoster/activetcl/8.4.11.2/lib package require html set encoding iso8859
  • WebMaze
    10 Jul 2018File Txt To} { # Page after the maze is completed, it shows a short message, # and redirects to the old index.html (renamed "index3.html") set ::fp [open $File w] puts "# File $File ... 0: Entry=index.html 1: first room 2,3: dead end 4,5,6,7: correct path 8: last room X: Exit=index2.html 9: Trap (can be reached from rooms 2
  • Webserver combined with bwise
    24 Jan 2011nocomplain [file join $home ../../tcllib*]]] 0] if {[file exist [file join $cvs modules]]} { lappend auto_path [file join $cvs modules] } elseif {[file exist [file join $cvs pkgIndex.tcl]]} { lappend auto_path $cvs
  • Webserver with in core database from BWise
    24 Jan 2011the image tree in the tclhttp resource file (or in the main tcl script), so that in principle we can server the images by relative path, and because we've got all
  • WebServices
    25 Oct 2017where tcl can find it. Start up a tcl shell and print theof the variable ::auto_path. Put the WebServices folder in one of the directories that is printed out. You must ... 3a//www.tclscripting.com/articles/sep06/article1.html].) If you save the above code in a file named googleapi.tcl and run it with the command tclsh googleapi.tcl you should see
  • WebSocket
    25 Sep 2017the request dict. ====== package require sha1 # Define the ::wibble::ws namespace. namespace eval ::wibble::ws { namespace path ::wibble } # Send a WebSocket frame. proc ::wibble::ws::send {type {msg ""} {final 1}} { log "[info ... ws-demo`" at the top of your zone handler list. And here's a demo HTML5 file, usable in [Chrome]: [UKo] 2015-11-23: For me this demo works in all tested
  • WebSocket TclRFB noVNC on TclHttpd
    25 Sep 2014be very interesting. It's a shame it never progressed. Below is the tclRFB-novnc.tcl file in the custom directory of [TclHttpd] ====== # I made a few modifications to the Websocket library ... getting these variables into # a slave interpreter. # # Transfer the scalar global variables foreach var {::v ::auto_path} { $interp eval [list set $var [set $var]] } # Renaming commands and aliasing in the Slave Interpreter
  • WebSockit2me - WebSocket to TCP gateway for noVNC and a WebSocket Telnet Client built on TclHttpd
    12 Jan 2016if {![string equal [file mtime $Target(TelnetTargetFile,file)] $Target(TelnetTargetFile,mtime)]} { ::websockit2me::TelnetTarget } if {![string equal [file mtime $Target(AuthTargetFile,file)] $Target(AuthTargetFile,mtime)]} { ::websockit2me::AuthTarget } # Make sure the path doesn't
  • WebUtils
    07 Jul 2011webutils { namespace export -clear webgen tmlparse linksub tagsub keysub punctsub } #----------------------------------------------- #<<<<<<<<<<<< ::webutils::webgen >>>>>>>>>>>>>># # webgen ?-file outPath? arrayName pageName # outPath = Path for .html page(s) to be written (created if not present) # Returns HTML
  • weeEdit
    25 Jan 2014program is in system's PATH or not: proc inpath {prog} { global env set exok 0 set envlist [split $env(PATH) :] foreach direc $envlist { if {[file executable [file join $direc $prog]]} { set
  • WeirdX
    27 Feb 20131. Make some directory in your web server htdocs, say 'weirdx'. 1. Copy the weirdx.jar file from weirdx-1.0.xx/misc to your htdocs/weirdx. 1. Cut out the sample ... specify full paths to the programs you want to # start if they are not in the PATH accessable by your web server. set env(DISPLAY) $ip:$disp exec aewm -new1 xaw-switch
  • What are some options for managing variations of Tcl on your machine
    21 Mar 2013LIBRARY and ISTR LD_LIBRARY_PATH or somesuch. Whoever sources /opt/tcltk/setup/tcltk.{sh,csh} gets out current, approved tcl (it soueces just the setup file of the current version). Whoever
  • What If: Everything is a Thing
    02 Sep 2015The above ''file open'' examples confuse me. Resources are (presumably) allocated when the file is opened, and closed when the file is closed. And making multiple, redundant copies of the file handle ... based on a trick played on the key, when you path an array you dont path a value nor a key, you path a key pattern! Another issue, Tcl doesn't create
  • What is Tcl
    29 Sep 2018Unicode]''': Support for Unicode has been fully-integrated into tcl, whether working with [string]s and [file]s, or matching [regular expressions]. '''[Encoding] conversions''': Easily transform text from one encoding to another ... ago I was working at the technical university of Aachen (Germany) on a robot simulation and path-planning system, including fast collision detection. The core functionality was included in a C++ class
  • What some command arguments expect
    27 May 2016shows how argument expectations influence quoting/substitution: ====== set path [expr {$b eq "" ? [pwd]: [file join $b]}] ====== ====== set path [if {$b eq ""} pwd else {file join $b}] ====== The first example needs explicit command
  • What's wrong with the tree widgets?
    07 Jan 2012close the group ## -image = the path of an image to be drawn as an icon for the item ## by default an image is drawn (folder or file) ## set the option to null
  • Where to store application configuration files
    07 Jul 2013init project { set homeDir $::env(HOME) set tclshrc [file join $homeDir .tclshrc] if ![file isfile $tclshrc] { set tclshrc [file join $homeDir tclshrc.tcl] if ![file isfile $tclshrc] { set tclshrc .tclshrc if {$::tcl ... Microsoft recommends to use ======c TCHAR szAppData[MAX_PATH]; … hr = SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, 0, szAppData); ====== to get the "Application Data" path since it might be named differently in different
  • which
    04 Apr 2011platform) { windows {set dirlist [split $::env(PATH) \;]} default {set dirlist [split $::env(PATH) :]} } foreach dir $dirlist { set fullname [file join $dir $filename] if {[file exists $fullname] && [file executable $fullname]} { return $fullname } } return
  • Whim window manager
    26 Feb 2015kit/tile07.kit into a directory in your $PATH. Whim should find it, and use it. For an ~/.xinitrc you can use: tclkit8.5 /path/to/Whim308.4.kit That should work ... only old files there. Even the Whim433.kit file mentioned in the documentation isn't there, the newest is Whim400-3.kit. The Whim file directory [http://whim.linuxsys.net/files/] has
  • WhoAmI? -Letting proceedurally added widgets know their names
    27 Dec 2011I plan to add some sort of file save and loading of embedded windows. [Brian Theado] - My mistake. I meant to pass the full widget path -- [[list whoami $base.b$i]], not
  • Why adding Tcl calls to a C/C++ application is a bad idea
    05 Aug 2017complex, CPU-intensive algorithms for, say, path finding or ray tracing, I'd implement those in C and expose them as commands (e.g. [[a*_path $from $to]] or [[cast_ray $from ... a way to query the database with complex logical expressions, including such things as name wildcards, file modification dates, existence flags, etc. All of these things are internally handled by a Tcl
  • Why can I not place unmatched braces in Tcl comments
    16 Mar 2018puts $file "#include <stdio.h>" ====== Okay fine, suppose we accept this negative consequence. Now consider one-liner procs: ====== proc x {file} {puts $file #include\ <stdio.h>} proc y {file} {puts $file "#include ... s another case with similar troubles -- JC'' ====== array set config { # this comment is messing up things ... path /usr/local/bin user admin } ====== ---- ''Quoth an anonymous person via firewall.cmsis.com...'': This problem
  • Why do you NOT use a tclkit
    15 Oct 2012packages needed) and not commercial. [LV]: While starpacks have the appealing property of being a single file for distribution, it does limit one to generating versions for the tclkits available. Distributing via ... and either Linux or Cygwin, so I can just instruct them to checkout and run my/path/myscript.tcl. I like CVS mostly for its built-in versioning. [LV] Likewise, most of
  • Wibble bugs
    25 Feb 2016key2=%26%2312399%3B&file=%26%2312399%3B.txt`|& &|`utf-8`|`key1=&key2=%E3%81%AF&file=%E3%81%AF.txt`|& &|(none)|`key1=&key2=%E3%81%AF&file=%E3%81%AF.txt ... like: can't read "uri": no such variable ====== ... # Receive and parse the first line. Normalize the path. set method GET set uri "" set protocol "HTTP/1.1" while {[set line [getline]] eq
  • Wibble change log
    20 Apr 2014of [[dehex]]. * Simplify [[icc::catch]] a tiny bit. * Remove some looping and [[[set]]]s in the path normalization code in [[getrequest]]. * Allow for custom POST content-types such as application/json-rpc ... files into the docroot made me nervous... * Add [[contenttype]] zone handler to guess content-type from file extension. * Expand [[dumprequest]] into [[dumpstate]] which analyzes the entire state dictionary, not just a request
  • Wibble detailed description
    20 Apr 2012Object path with '''root''' option prepended. Only defined if '''root''' option is defined. ***Common configuration options*** * '''options root''': Filesystem directory corresponding to zone root directory. * '''options indexfile''': Name of "index.html" file
  • Wibble discussion
    22 Sep 2012path 3. Because htmlgen creates a proc named "script" (for the "script" html tag, of course), you will need to rename the "script" zonehandler to something like "ascript" 3. Create a file
  • Wibble discussion archive
    22 Apr 2012the list and implement authentication, session or protection of particular file types. I noticed that specifically asking for "file.tmpl" or "file.script" causes wibble to return application code! In a working ... that should be fixed soon.) Again, Wub doesn't have the option of taking the sensible path. [AMG]: I'll have to check a couple streaming music players to see if they
  • Wibble examples
    21 Feb 2014rowdata $i]]" % } /><br /> % } %;# File upload selector. File upload:\ <input type="file" name="file" />\ <br /> %;# Submit button. <input type="submit" value="Submit" /> </form> %;# Uploaded file information. % if {[info exists file]} { <table> <tr><th ... with "" and then text/html would be with no value? [AMG]: [[[dict set]]] accepts a dictionary "path" followed by a single value. [[dict set]] only sets one value at a time. If
  • Wibble help
    09 Apr 2015file. This is a hole in functionality. I'm open to suggestion though. ---- **In-depth description of image file upload example** [JM] 12Feb2012 - the file index.html.tmpl on the "image file ... other elements give the cookie attributes. The supported attributes are: domain, path, port, discard, httponly, secure, and expires. domain and path have simple string values. port has a list value, and each
  • Wibble implementation
    22 Nov 2015request {}; dict with state options {} if {[file isdirectory $fspath]} { if {[string index $path end] ne "/"} { append path / } set newstate $state dict set newstate request path $path$indexfile nexthandler $newstate $state } } # Generate directory
  • Wibble news
    13 Apr 2012to a separate file, whereas I added quite a bit of new stuff to the example code directly in wibble.tcl. I like the idea of a single-file distribution, but let ... state response header set-cookie cookiename domain .whatever dict set state response header set-cookie cookiename path /whatever dict set state response header set-cookie cookiename port {80 8080} dict set state
  • Wibble wish list
    12 Feb 2015a file called "index.html" in there.(You can call the file "index.html.tmpl" or "index.html.script", but it won't necessarily be static) 1. You can make a file ... on the page. Since you're customizing the code, and you want to have a simple path for error handling, dynamic dispatch isn't needed. [AMG], 2011-05-13: I implemented a
  • Wibble zone handlers
    02 Apr 2012proc ::wibble::zone::rejectname {state} { dict with state request {}; dict with state options {} set name [file tail $path] foreach pattern $patterns { if {[string match $pattern $name]} { forbidden $state } } } ::wibble::handle / rejectname patterns
  • wiki database for offline use
    24 Sep 2018Wikit::Db" (file "gui.tcl" line 17) invoked from within "source gui.tcl" invoked from within "if { $wub } { lappend auto_path [file join [file dirname [info script]] lib] [file join [file dirname
  • Wiki Revision History Feature
    18 Sep 2006exists env(PATH_INFO)] } { set PathInfo [file tail $env(PATH_INFO)] } else { set PathInfo {} } set ShowInstructions false set NoSuchFile false if { [regexp {^(\d+)(\D)(\d*)$} $PathInfo - page sep rev] } { if { [file exists
  • Wiki Revision History Feature via tclhist
    16 Jul 2009blockquote>" puts "" } puts "</body>" puts "" puts "</html>" } catch { if { [info exists env(PATH_INFO)] } { set PathInfo [file tail $env(PATH_INFO)] } else { set PathInfo {} } set ShowInstructions false set NoSuchFile false if { [regexp
  • wiki-reaper
    17 Nov 2017that the file is going to be found when you attempt to run it. On Unix like systems, that involves putting the file into one of the directories in $PATH. 3. ''wiki
  • Wikit configuration
    10 Jan 2012path } # We need a few files, like images and the stylesheet Doc_AddRoot /htdocs [file join $here ../htdocs] Doc_AddRoot /images [file join $here ../htdocs/images] # Set up logging file mkdir [file
  • Wikit in local mode
    30 Apr 2012this item? ---- ''Welcome to Wikit!'' You can put "tclkit" anywhere on your $PATH; it's just a runtime. The file "wikit" is an executable [starkit] containing all the scripts - typing just "wikit
  • Wikit on PocketPC
    09 Nov 2010or : ====== load [file join [pwd] mk4tcl.dll] couldn't load library "\wikit\mk4tcl.dll": this library or a dependent library could not be found in library path while executing "load [file join
  • Wikit run in a Slave Interpreter on TclHttpd
    27 Jun 2007mk4::Mount [file dir $starkit::topdir]/wikit.kit [file dir $starkit::topdir]/wikit.kit # Append wikit library from the mounted wikit starkit to the auto_path lappend auto_path [file dir $starkit
  • WiKit under CGI
    30 Apr 2012tkd file will sometimes create an empty tkd file, but will more often than not generate the Internal Server error and a premature end of header in the web server log file ... error log. I've also tried to write a batch script to set the WIKIT_BASE path and then start wikit.exe with similar results. Anyone have any ideas? ---- Wikit runs successfully
  • wikitool
    09 Jul 2009as well. * Furthermore you need the tclkitsh-program lying around somewhere in your path. * Now take your wiki-data file (I assume "wikit.tkd") and place it into the cgi-bin-directory
  • Windows
    18 Jun 2008plain text file line terminator. Also, are there not 7 bit ASCII characters which are a problem if one were to attempt to use them in a Windows path or file name
  • Windows 95
    30 Jul 2016file normalisation with volume relative FAILED ==== Contents of test case: set path "[string range [lindex $drives 0] 0 1]foo" set dir [pwd] cd [lindex $drives 1] set res [file norm $path
  • Windows batch script for 'compiling' starpacks
    02 Nov 2008path of an tcl-installation (e.g. ActiveState). To found such an installation, ''tclsh'' is searched and its path (usually ...'''bin''') is concatenated with '''..\lib''' (for this to work, the bin path ... copy in from; up for now I take them out of a '''/vfs/lib/import.Index'''-file, but perhaps it's possible to scan the main-script for package require- and source
  • Windows Environment Path
    17 Aug 2012actually set it. [RS] 2012-08-17 ====== proc clean_path {} { set res {} foreach part [split $::env(PATH) ";"] { set part [string trimright $part \\] if ![file exists $part] continue if {[lsearch -exact $res $part
  • Windows Helper Utilities
    13 Feb 2016was to create a one line Windows script (.BAT) file to call wish. In this BAT file put the line: @<Path to Wish> "<Path to your Tcl script>" %* Where you substitute the
  • Windows Mobile 2003 Smartphone
    14 Oct 2013do some basic file copying. Most other software you can get for the device requires a working Windows system to install; typically a Windows (x86) executable 'setup.exe' file extracts the actual ... mHz ARM processor [http://focus.ti.com/general/docs/wtbu/wtbuproductcontent.tsp?templateId=6123&navigationId=12003&path=templatedata/cm/product/data/omap_730]. The device is not quite like a [PocketPC], in
  • Windows SDX Shell Fix
    25 Jul 2009Update "<path>tclkit-win32.upx.exe" "<path>wsf.kit" update "%1" Wrap "<path>tclkit-win32.upx.exe" "<path>wsf.kit" wrap "%1" Where <path> is the fully qualified path to the file
  • Windows Shell Fix Source
    02 Nov 2008for a .KIT "File Type" is # Action Command # ----------------------------------------------------- # List "<path>tclkit-win32.upx.exe" wsp.kit lsk {%1} # UnWrap "<path>tclkit-win32.upx.exe" wsp.kit unwrap {%1} # Wrap "<path>tclkit-win32
  • Windows shell links
    29 Jul 2012oFolderItem GetLink] return [$oShellLink Path] } else { if {![catch {file readlink $file} new]} { set new } else { set file } } } else { if {![catch {file readlink $file} new]} { set new } else { set file } } } # # Get properties of
  • Windows/CE
    30 Jul 2016exe file from the ''WinCE desktop tools'' and place it in a directory with the batch file at the end of this note (on your desktop PC). Configure the batch file per ... n "TMPDIR" -v "\Temp" cereg -k "HKLM\Environment" -n "TEMPDIR" -v "\Temp" REM Path cereg -k "HKLM\Environment" -n "PATH" -v "%bindir%;" REM Username cereg -k "HKLM\Environment" -n "USER" -v "nobody
  • winsend
    10 Nov 2015tclsoap/ in the file winsend-X.X.zip [PT] [LES] on 26 Sep 2005: I don't understand this path '''\\.\TclInterp\tkcon.tcl'''. Is that relative? Is that the path to tkcon
  • Winserv
    12 Mar 2010same directory as the starpack by constructing the full path to the starkit (using previously set variable '''current_outside_WD'''): set fullCUDfname [file join $current_outside_WD "CUdatapack.dat"] It then tries
  • winutils
    09 Jan 2012my winutils extension and its winutils::shell command. It's like `eval exec [auto_execok start] $file &`, but without the momentary command prompt flashing up on the screen. http://sf.net/projects ... of win32 make a nice fit here? * The special folders stuff - SHGetFolderPath() for retrieving the official path to application data user profile etc. This can be important for NT/XP systems where
  • wish
    08 Jul 2016Remember that to pass arguments to wish, like display name, etc. the arguments come '''after''' the file name to execute AND any arguments before the -- are processed by wish rather than end ... hide" does not work) ? ---- [LV] Recently I ran across a program which had the following coded: === #! /path/to/wish -f === I don't see any reference to a -f flag in wish
  • WISH File Rusher
    27 Sep 2012WISH File Rusher''' file manager http://www.pa-mcclamrock.com/papenguinspacks.html#wishrush [http://www.pa-mcclamrock.com/wishrush.gif] [D. McC] 2011 Apr 2: '''WISH File Rusher 2011.1''' is a ... click installation on [Puppy Linux]. ---- [rgf] 2008 Mar 19 Tried expanding *.tar.gz, making the recommended path changes, and needed to edit code in the 'colorschemes' part of the script to get
  • Wish Prompt Here
    02 Nov 2008right clicked. If selected in right, file pane, opens a new shell in the enclosing folder.''' Save the following as 'wishhere.inf' after editing the path to wish.exe to match your
  • with_mounted_dir
    02 Jun 2014dir body {"except" {}} {exceptbody {}}} { variable mountpoints if {[file isdirectory $dir]} { return [uplevel 1 $body] } else { # we need to try to mount it with tclvfs # the file system types we know about set ... in running the body code — any suggestions appreciated. And here's an example: ====== set dir /path/to/starkit.kit with_mounted_dir $dir { set files [glob -join $dir *] puts "Files in
  • withOpenFile
    29 Sep 2018closing $file for $cmd" ::close $file } } namespace eval ::test { proc hi args { set f [open /dev/urandom] puts [binary encode base64 [read $f 4]] } } ::test::hi puts bye ====== ** See also ** * [with-path
  • WNPComm
    29 Jan 2009can find the source code (tar.gz), the Slackware binary package (.tgz), and a self installing file (.sh). '''DEPENDENCIES''' In order to use WNComm you have to install wgClibs and wgCppLibs. They ... for your time, I will be happy to read feedback, suggestions, comments... and to receive fix, path... I will be happy to answer to everyone. Silvano Catinella <catine... at yahoo dot com
  • Word Chain
    03 May 2016fear feat feed feel fees fell felt fend fens fern fete feud fiat fibs fife figs file fill film find fine fink fins fire firm firs fish fist fits five fizz flag ... pale pall palm pals pane pang pans pant papa pare park pars part pass past pate path pats pave pawl pawn paws pays peak peal pear peas peat peck peek peel peen
  • World locations
    24 Oct 2007source [file join $dir worldlocations.tcl]] ====== **Initialisation** After downloading the locations file and converting it to CSV format, do a: ====== package require worldlocations ====== and set the path of the locations file: ====== set
  • wrapping commands
    24 Oct 2013w] % extend file newer {a b} {expr {[file mtime $a] > [file mtime $b]}} ::file % extend file older {a b} {expr {![file newer $a $b]}} % file newer file1 file2 0 % file older file1 ... do it with [namespace ensemble] ====== set map [namespace ensemble configure ::info -map] dict set map formalargs ::path::to::proc_that_implements_formalargs namespace ensemble configure ::info -map $map ====== Now the ensemble includes
  • writing readable, manageable, reusable Tk
    01 Sep 2015megawidget's path (for child widgets of a particular instance of the megawidget). Each of these megawidgets has a function to create an instance of it that takes a widget path as ... to complex to outline here, here is an example screen as an example (Stored in a file/database etc is the gui definition ): Options { *LogoEntry*Entry*font {Times 24} *LogoPanel*Canvas*width
  • Writing simple CGI applications using vanilla Tcl
    18 Jan 2013a line containing the content type of the page. In the example, it's an HTML file. * The Content-type line MUST be followed by a blank line, otherwise you'll get ... tcl''' script, you just read the CGI variables that are useful to your application, like '''$env(PATH)''' or '''$env(QUERY_STRING)''' * And then you respond to the request with your HTML or
  • Wub
    13 Feb 2018up a File domain to serve up a folder tree full of static pages. Some of the html files have spaces in the path, and those files yield a "File ''filename'' doesn
  • WubWikit
    08 Oct 2017first nine pages. [jdc] 12-dec-2008: Can you try to use argument `toc file:your_toc_file`. [RZ] 18-dec-2008: Sorry for the delay. I tried it with your suggestion ... script down below). * Also make sure to have a FTS enabled sqlite3 binary in your auto_path (which by default, is ""not"" the case), as already mentioned. Finally: * In WikitWub.tcl all
  • xcursor
    22 Jan 2011TCL_OK; } ====== ====== # file tkxcursor.tcl namespace eval xcursor { variable cursors [dict create None 0] } proc xcursor::setcursor {window cursor} { variable cursors if {![winfo exists $window]} { return -code error "bad window path name
  • XDR
    08 Apr 2014a [yeti] file to generate an XDR language parser. ====== #! /bin/sh # \ exec itclsh "$0" ${1+"$@"} if { [info script] == "$::argv0" } { lappend auto_path [pwd] } # Lexical analyzer for XDR. lappend auto_path /usr/local
  • Xft support
    12 Sep 2011path, either editing the X configuration file or, as user, using '`xset fp+ /path/to/dir`' * In case you have used the xset way, force the server to reload its font path
  • XML/tDOM encoding issues with the http package
    27 May 2011stripXmlDecl $xml]] } proc tmlrss::uriBase {uri} { array set info [uri::split $uri] set info(path) [file dirname $info(path)] return [eval uri::join [array get info]] } proc tmlrss::stripXmlDecl {xml} { if {![binary
  • XotclIDE
    06 Oct 2017a $HOME/bin and put [tclkit] there. ''Edit your ''.bashrc'' and make sure, LD_LIBRARY_PATH and PATH contain $HOME/lib resp. $HOME/bin.'' The solution goes as follows: 1. Create a ... m fond of. It deals with Chinese Characters correctly without any extra manual work. SQLite or file-out codes will destroy the characters. Please continue work on it. -- jim, 2005/12/1
  • XOTclIdeWishes
    02 Mar 2014object of other type than Object. 1. Custom key binding. 1. Option to store preferences in file on Windows, not in registry. 1. Localization support ? 1. Rewrite all dialogs to panedwindow if ... produces very bad source code; [TkBuilder] produces much better source code. My wish is something like Path browser from Python IDLE, e.g. browser for directories and folding for files in it
  • XPath
    28 Jul 2015code to fill in a default namespace into XPath expressions: ====== proc XPathNS {ns path} { set res {} foreach e [split $path /] { if {$e eq "."} continue if {![in {"" ..} $e] && ![has : $e]} {set e $ns ... jf.larvoire.free.fr/progs/%|%xpath.tcl%|%: A wrapper script that models an XML file as a filesystem to make using XPATH via Tdom feel like using file commands. <<categories>> XML | Glossary
  • Xvfb
    02 Aug 2016lock_file } method xvfb_exists {} { # Check that Xvfb is available on PATH and is executable. set paths [split $::env(PATH) $::tcl_platform(pathSeparator)] foreach path $paths { if {[file executable [file join $path
  • yajl-tcl
    11 Feb 2017Use YaST (package manager) to install the standard package `libyajl1`. This installs the library in the file `/usr/lib/libyajl.so.1`. * Create a symbolic link to use version 1 library as ... libyajl.so ====== * Here is the link error, if `libyajl.so` is not available in the library path: ======none cannot find -lyajl ====== ***Compile Yajl-tcl*** * Download and unpack the source archive yajl-tcl
  • Yakumo Alpha
    25 Mar 2014n "TMPDIR" -v "\Temp" cereg -k "HKLM\Environment" -n "TEMPDIR" -v "\Temp" REM Path cereg -k "HKLM\Environment" -n "PATH" -v "%bindir%;" REM Username cereg -k "HKLM\Environment" -n "USER" -v "nobody ... k "HKLM\Environment" -n "XCE_TRACE" -v "0" REM Debugging trace file output cereg -k "HKLM\Environment" -n "XCE_TRACE_FILE" -v "\xce_trace.txt" Here the author has chosen to install
  • ycl
    11 Aug 2018namespace import [yclprefix]::dir ====== '''`copynode`''': Copy a file or directory into an archive location, faithfully duplicating any symbolic links, recursively, in the path of the file. Does not copy the contents of
  • ycl eav
    21 Nov 2017trunk%|%The source code]: Includes documentation in prose. ** Creating an Eav ** ====== eav myeav filename /path/to/some/file ====== If no filename is provided, the database is created in memory ====== eav myeav ====== ** Creating
  • YE Menus made easy
    08 Feb 2016menu:add . File.Reopen [list $f {puts "reopen $f"}]} And here's the code: # w always identifies a toplevel item. # path is a path to a menu item eg "File.Reopen" proc
  • Zarutian
    18 May 2014result [list del [file join $new $item]] } # todo: check if an pair of {new <path>} {del <path>} is just an move # by checking if they mean the same file (same contents) return
  • Zen Loops
    31 Jan 20111 set zenloops::path [file dirname [info script]] set zenloops::file [file join $zenloops::path zensave.tcl] bind . <F2> [list console show] bind . <Control-s> [list zenloops::save $zenloops::file] bind . <Control
  • Zip A Directory
    05 Jan 2015null # proc zcopy { zname path to } { set zmount [file normalize ${zname}] set from [file join ${zmount} ${path}] set to [file normalize [file join ${to} ${path}]] file mkdir [file dirname ${to}] set zid
  • zipvfs shows empty dir with special crafted archives
    02 Aug 2006el [file split $path] { if {$el ne "."} { set sb(name) [file join $sb(name) $el] } } In file zipvfs.tcl: set name [string tolower $path] replace to: set name "" foreach el [file split
  • zlib
    27 Aug 2018a gzipped file: === proc gzip {file} { set fin [open $file rb] set header [dict create \ filename $file time [file mtime $file] comment "Created by Tcl[info patchlevel]"] set fout [open $file.gz ... ActiveTcl already is shipped with a zlib.dll in its /bin directory, which is in the $PATH by default. I wonder which zlib.dll is used by ActiveTcl and which one is
  • Zstandard
    19 Sep 2018in $LD_LIBRARY_PATH. E.g., # $ LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib" tclsh zstd.tcl # in the POSIX shell or # > env "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local ... level]] } 10] \ $size] } } # If this is the main script... if {[info exists argv0] && ([file tail [info script]] eq [file tail $argv0])} { zstd::test } ====== *** Sample output *** ====== zstd version 1.3.0 hello! 49800000
  • Æjaks
    08 Apr 2016to to http://localhost:8080/aejaks2/app/...etc... 2) extract the file ''WEB-INF/web.xml'' from the aejaks.war file, edit it, copy the elements ''<servlet>'' and ''<servlet-mapping>'', rename the ... t know why? [TP] Jacl processes the TCLLIBPATH property and adds paths listed to the ''auto_path'' global variable, but you should use Unix-style pathnames and separators, even with running on