回答編集履歴

2

修正

2018/12/12 14:31

投稿

hayataka2049
hayataka2049

スコア30933

test CHANGED
@@ -10,6 +10,8 @@
10
10
 
11
11
 
12
12
 
13
+ 参考:
14
+
13
15
  http://effbot.org/tkinterbook/tkinter-file-dialogs.htm
14
16
 
15
17
  http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/tkFileDialog.html

1

説明の改善

2018/12/12 14:31

投稿

hayataka2049
hayataka2049

スコア30933

test CHANGED
@@ -1,10 +1,10 @@
1
- `initialfile`オプションが利用できるようです。
1
+ そのような目的のために`initialfile`オプションが利用できるようです。
2
2
 
3
3
 
4
4
 
5
5
  ```python
6
6
 
7
- file = tkfd.asksaveasfilename(title = "保存場所を選択",filetypes = [("テキストファイル", ".txt")], initialfile="hoge.txt")
7
+ file = tkfd.asksaveasfilename(initialfile="サンプル.txt", title = "保存場所を選択",filetypes = [("テキストファイル", ".txt")])
8
8
 
9
9
  ```
10
10