回答編集履歴
3
書き込み時のエンコーディングを指定
test
CHANGED
@@ -26,8 +26,8 @@
|
|
26
26
|
|
27
27
|
|
28
28
|
|
29
|
-
with open("settings.ini", "w") as configfile:
|
29
|
+
with open("settings.ini", "w", encoding="utf-8") as configfile:
|
30
30
|
|
31
|
-
config.write(configfile, True
|
31
|
+
config.write(configfile, True)
|
32
32
|
|
33
33
|
```
|
2
補足を追加
test
CHANGED
@@ -28,6 +28,6 @@
|
|
28
28
|
|
29
29
|
with open("settings.ini", "w") as configfile:
|
30
30
|
|
31
|
-
config.write(configfile, True)
|
31
|
+
config.write(configfile, True, encoding="utf-8")
|
32
32
|
|
33
33
|
```
|
1
Pythonのコメントは#だよね
test
CHANGED
@@ -22,7 +22,7 @@
|
|
22
22
|
|
23
23
|
|
24
24
|
|
25
|
-
config['DEFAULT']['line1'] = str(1)
|
25
|
+
config['DEFAULT']['line1'] = str(1) # 値は文字列として設定
|
26
26
|
|
27
27
|
|
28
28
|
|