質問編集履歴

6

コードの挿入

2020/06/30 03:14

投稿

katsumasa35
katsumasa35

スコア4

test CHANGED
File without changes
test CHANGED
@@ -18,7 +18,7 @@
18
18
 
19
19
  エラーメッセージ
20
20
 
21
- ```Traceback (most recent call last):
21
+ `Traceback (most recent call last):
22
22
 
23
23
  File "ark.py", line 24, in <module>
24
24
 
@@ -28,7 +28,9 @@
28
28
 
29
29
  fp = builtins.open(filename, "w+b")
30
30
 
31
- FileNotFoundError: [Errno 2] No such file or directory: 'Desktop\PdfToImage\image_file\wanz_01.jpeg'
31
+ FileNotFoundError: [Errno 2] No such file or directory: 'Desktop\PdfToImage\image_file\wanz_01.jpeg'`
32
+
33
+
32
34
 
33
35
 
34
36
 

5

コードの挿入

2020/06/30 03:14

投稿

katsumasa35
katsumasa35

スコア4

test CHANGED
File without changes
test CHANGED
@@ -38,7 +38,7 @@
38
38
 
39
39
 
40
40
 
41
- ```Python
41
+ `Python`
42
42
 
43
43
  コード
44
44
 

4

コードの挿入

2020/06/30 03:13

投稿

katsumasa35
katsumasa35

スコア4

test CHANGED
File without changes
test CHANGED
@@ -42,7 +42,37 @@
42
42
 
43
43
  コード
44
44
 
45
+ `import pdf2image
46
+
47
+ import os
48
+
49
+ from pathlib import Path
50
+
51
+ from pdf2image import convert_from_path
52
+
53
+ import tkinter, tkinter.filedialog, tkinter.messagebox
54
+
55
+ from PIL import Image
56
+
57
+
58
+
59
+ root = tkinter.Tk()
60
+
61
+ root.withdraw()
62
+
63
+ fTyp = [("","*")]
64
+
65
+ iDir = os.path.abspath(os.path.dirname("__file__"))
66
+
67
+ tkinter.messagebox.showinfo('正誤判定','処理ファイルを選択してください')
68
+
69
+ file = tkinter.filedialog.askopenfilename(filetypes = fTyp,initialdir = iDir)
70
+
71
+
72
+
73
+ tkinter.messagebox.showinfo('○×プログラム',file)
74
+
45
- `poppler_dir = Path("__file__").parent.absolute() / "poppler/bin"
75
+ poppler_dir = Path("__file__").parent.absolute() / "poppler/bin"
46
76
 
47
77
  os.environ["PATH"] += os.pathsep + str(poppler_dir)
48
78
 

3

書式の改善

2020/06/30 03:06

投稿

katsumasa35
katsumasa35

スコア4

test CHANGED
File without changes
test CHANGED
@@ -42,9 +42,7 @@
42
42
 
43
43
  コード
44
44
 
45
- ```
46
-
47
- poppler_dir = Path("__file__").parent.absolute() / "poppler/bin"
45
+ `poppler_dir = Path("__file__").parent.absolute() / "poppler/bin"
48
46
 
49
47
  os.environ["PATH"] += os.pathsep + str(poppler_dir)
50
48
 
@@ -96,7 +94,7 @@
96
94
 
97
95
 
98
96
 
99
- print(result1)
97
+ print(result1)`
100
98
 
101
99
 
102
100
 

2

コードの挿入

2020/06/30 02:59

投稿

katsumasa35
katsumasa35

スコア4

test CHANGED
File without changes
test CHANGED
@@ -38,7 +38,7 @@
38
38
 
39
39
 
40
40
 
41
- ```python
41
+ ```Python
42
42
 
43
43
  コード
44
44
 

1

コードの挿入

2020/06/30 02:00

投稿

katsumasa35
katsumasa35

スコア4

test CHANGED
File without changes
test CHANGED
@@ -36,41 +36,13 @@
36
36
 
37
37
 
38
38
 
39
+
40
+
39
41
  ```python
40
42
 
41
- ソースコード
43
+ コード
42
44
 
43
- ```import pdf2image
45
+ ```
44
-
45
- import os
46
-
47
- from pathlib import Path
48
-
49
- from pdf2image import convert_from_path
50
-
51
- import tkinter, tkinter.filedialog, tkinter.messagebox
52
-
53
- from PIL import Image
54
-
55
-
56
-
57
- root = tkinter.Tk()
58
-
59
- root.withdraw()
60
-
61
- fTyp = [("","*")]
62
-
63
- iDir = os.path.abspath(os.path.dirname("__file__"))
64
-
65
- tkinter.messagebox.showinfo('正誤判定','処理ファイルを選択してください')
66
-
67
- file = tkinter.filedialog.askopenfilename(filetypes = fTyp,initialdir = iDir)
68
-
69
-
70
-
71
- tkinter.messagebox.showinfo('○×プログラム',file)
72
-
73
-
74
46
 
75
47
  poppler_dir = Path("__file__").parent.absolute() / "poppler/bin"
76
48