質問編集履歴
4
ソース編集
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,18 +1,16 @@
|
|
1
1
|
Pythonで 作成したMS-Wordの文書を保存ダイアログを出して保存したいのですがtkinter.filedialog.asksaveasfileの時にファイルの保存ダイアログと別に「tk」という別窓も出てしまいます。出ないようにしたい。
|
2
2
|
|
3
3
|
```python
|
4
|
-
コード
|
5
|
-
```
|
6
|
-
|
7
4
|
def __init__(self):
|
8
5
|
self.topLevel.update_idletasks()
|
9
|
-
ファイル保存ダイアログ
|
6
|
+
#ファイル保存ダイアログ
|
10
7
|
def saveBox(dirName, fileName):
|
11
8
|
fileTypes = [('MS-WORD', '.docx')]
|
12
|
-
define options for opening
|
9
|
+
#define options for opening
|
13
10
|
options = {}
|
14
11
|
options['filetypes'] = fileTypes
|
15
12
|
options['initialdir'] = dirName
|
16
13
|
options['initialfile'] = fileName
|
17
14
|
|
18
|
-
return tkinter.filedialog.asksaveasfile(mode='w', **options)
|
15
|
+
return tkinter.filedialog.asksaveasfile(mode='w', **options)
|
16
|
+
```
|
3
ソース編集
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
Pythonで 作成したMS-Wordの文書を保存ダイアログを出して保存したいのですがtkinter.filedialog.asksaveasfileの時にファイルの保存ダイアログと別に「tk」という別窓も出てしまいます。出ないようにしたい。
|
2
2
|
|
3
3
|
```python
|
4
|
+
コード
|
5
|
+
```
|
4
6
|
|
5
7
|
def __init__(self):
|
6
8
|
self.topLevel.update_idletasks()
|
2
ソース編集
title
CHANGED
File without changes
|
body
CHANGED
@@ -4,10 +4,10 @@
|
|
4
4
|
|
5
5
|
def __init__(self):
|
6
6
|
self.topLevel.update_idletasks()
|
7
|
-
|
7
|
+
ファイル保存ダイアログ
|
8
8
|
def saveBox(dirName, fileName):
|
9
9
|
fileTypes = [('MS-WORD', '.docx')]
|
10
|
-
|
10
|
+
define options for opening
|
11
11
|
options = {}
|
12
12
|
options['filetypes'] = fileTypes
|
13
13
|
options['initialdir'] = dirName
|
1
ソース編集
title
CHANGED
File without changes
|
body
CHANGED
@@ -2,8 +2,6 @@
|
|
2
2
|
|
3
3
|
```python
|
4
4
|
|
5
|
-
コード
|
6
|
-
```
|
7
5
|
def __init__(self):
|
8
6
|
self.topLevel.update_idletasks()
|
9
7
|
# ファイル保存ダイアログ
|