| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 | 
							- import sys
 
- import pathlib
 
- test_file = pathlib.Path(__file__).absolute()
 
- test_dir = test_file.parent
 
- project_dir = test_dir.parent
 
- source_dir = project_dir / "src"
 
- sys.path.append(str(source_dir))
 
- import CxPini as pini
 
- check = pini.key()
 
- count = 0
 
- def dump():
 
-     global count
 
-     global check
 
-     count = count + 1
 
-     print("Dump: " + str(count))
 
-     print("Key: " + str(check.name))
 
-     print("Value: " + str(check.value))
 
-     print("Value type: " + str(check.value_type))
 
-     print("Comment: " + str(check.comment))
 
-     print("Result: ")
 
-     print(str(check))
 
-     print()
 
- dump()
 
- check.comment = "Sample"
 
- dump()
 
- check.name = "key"
 
- dump()
 
- check.value = "      value"
 
- dump()
 
- check.value = 10
 
- dump()
 
- check.name = None
 
- dump()
 
- check.name = "key"
 
- dump()
 
- print("Get result: " + str(check.get(20)))
 
- print()
 
- check.value = "other"
 
- dump()
 
- print("Get result: " + str(check.get("def")))
 
- print()
 
- check.value = None
 
- dump()
 
- print("Get result: " + str(check.get("def")))
 
- print()
 
 
  |