Version 2 of TeaKpot.tk

Updated 2008-11-08 23:24:13 by LV

This is an early attempt to wrap a GUI around teacup, an interface to ActiveState's teapot technology.

The following code doesn't work, quite yet. Some of the problems include:

  • the teacup invocations on my machine are quite slow
  • the data is displayed as csv records, in very small windows
  • the install proc doesn't work - it isn't expanding the
#! tclsh8.5

package require Tk
package require csv

set ::newer [list]
set ::uninstalled [list]

proc install {args} {
 set cmdlist [::csv::split $args]
 set cmd "teacup install --force --with-recommends [lindex $cmdlist 1] [lindex $cmdlist 2] -is [lindex $cmdlist 0] -v"
 puts "$cmd"
 puts [exec {*}$cmd]
}

proc newer {} { 
    set ::newer [exec teacup list --as csv --only newer]
    pack [scrolledlistbox .slbNewer $::newer install] -fill both -expand 1
    return
}

proc uninstalled {} { 
    set ::uninstalled [exec teacup list --as csv --only uninstalled]
    pack [scrolledlistbox .slbUninstalled $::uninstalled install] -fill both -expand 1
    return
}

# This next file is from http://wiki.tcl.tk/15614
source scrolledlistbox.tcl


newer
uninstalled