Skip to content

Instantly share code, notes, and snippets.

@yyamasak
Created March 17, 2015 11:52
Show Gist options
  • Save yyamasak/dbfc9a8e77fdda57bdec to your computer and use it in GitHub Desktop.
Save yyamasak/dbfc9a8e77fdda57bdec to your computer and use it in GitHub Desktop.
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
}
@yyamasak
Copy link
Author

Use twapi::read_inifile_section_names instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment