namespace eval EveUtils { set tsvPath "tsv/" proc parsePairs { tsvName } { set f [open [file nativename $EveUtils::tsvPath$tsvName] r] while { [eof $f] == 0 } { set splitLine [split [gets $f] "\t"] set pairMap([lindex $splitLine 0]) [lindex $splitLine 1] } # Return array populated with A:B pairs return [array get pairMap] } proc insertCommas { num {sep ,} } { while { [regsub {^([-+]?\d+)(\d\d\d)} $num "\\1$sep\\2" num] } {} return $num }