본문으로 바로가기

Ini 1.0.0.0

category Tcl & Tk/확장 패키지 (Extension Package) 2025. 2. 14. 09:59

홈페이지 : http://www.du.edu/~mschwart/tcl-tk.htm

INI 파일을 취급하는 확장 패키지로 윈도우즈와 유닉스를 지원합니다. 소스코드 포함입니다.

# Tests most of the functions in the ini extension.
# Assumes it is tested where the archive was unpacked.
# Results should be exactly the same as in "expect0.ini"
  lappend auto_path .
  package require ini
  ini dir .

  # Enter some starting values
  ini set -section "Section1" -key "Entry1" -value "Value1" -private testprof.ini
  ini set -section "Section1" -key "Entry2" -value "Value2" -private testprof.ini
  ini set -section "Section1" -key "Entry3" -value "Value3" -private testprof.ini
  ini set -section "Section2" -key "Entry1" -value "Value1" -private testprof.ini
  ini set -section "Section2" -key "Entry2" -value "Value2" -private testprof.ini
  ini set -section "Section2" -key "Entry3" -value "Value3" -private testprof.ini
  ini set -section "Section1" -key "Entry4" -value "Value4" -private testprof.ini
  ini set -section "Section1" -key "Entry2" -value "New Value2 inserted" -private testprof.ini
  ini set -section "Section3" -key "Entry1" -value "Value1a" -private testprof.ini
  ini set -section "Section3" -key "Entry2" -value "Value2a" -private testprof.ini
  ini set -section "Section3" -key "Entry3" -value "Value3a" -private testprof.ini
  ini set -section "Section3" -key "Entry4" -value "Value4a" -private testprof.ini
  ini set -section "Section3" -key "Entry2" -value "Value2b" -private testprof.ini
  ini set -section "Multi word section" -key "Multi word entry" -value "multi word value" -private testprof.ini

  # Delete some values
  ini delete -section "Section1" -key "Entry2" -private testprof.ini 
  ini delete -section "Section3" -key "Entry5" -private testprof.ini 
                                                           
  ini delete -section "Section5" -key "Entry1" -private testprof.ini 
                                                           

  # Delete a section
  ini delete -section "Section2"  -private testprof.ini

ini8411.zip
0.03MB

'Tcl & Tk > 확장 패키지 (Extension Package)' 카테고리의 다른 글

Hdc 0.2.0.1  (0) 2025.02.14
Gdi 0.9.9.11  (0) 2025.02.14
Mapimail 1.0.2.1  (0) 2025.02.14
Wmf 0.5.0.2  (0) 2025.02.14
Printer 0.9.6.14  (0) 2025.02.14