Created
March 17, 2015 11:52
-
-
Save yyamasak/dbfc9a8e77fdda57bdec to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
proc read_inifile_section_names {f} { | |
set sections {} | |
set ch [open $f r] | |
while {[gets $ch line] != -1} { | |
if {[regexp {^\[(.+)\]$} $line -> section]} { | |
lappend sections $section | |
} | |
} | |
close $ch | |
return $sections | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use twapi::read_inifile_section_names instead.