質問編集履歴
2
試したことの追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -112,6 +112,26 @@
|
|
112
112
|
|
113
113
|
|
114
114
|
|
115
|
+
```
|
116
|
+
|
117
|
+
#for row in c.execute("select * from 'master_data' where jan == '4901306047569'' limit 1"):
|
118
|
+
|
119
|
+
#print (row[0])
|
120
|
+
|
121
|
+
#print (row[1].encode('utf-8'))
|
122
|
+
|
123
|
+
#print (row[3])
|
124
|
+
|
125
|
+
#with open('result_from_python.jpg', 'wb') as f:
|
126
|
+
|
127
|
+
#f.write(row[2])
|
128
|
+
|
129
|
+
```
|
130
|
+
|
131
|
+
の部分をコメントアウトしない場合は、同じエラーメッセージが表示されました。
|
132
|
+
|
133
|
+
|
134
|
+
|
115
135
|
|
116
136
|
|
117
137
|
|
1
試したことの追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -60,6 +60,62 @@
|
|
60
60
|
|
61
61
|
|
62
62
|
|
63
|
+
###試したこと
|
64
|
+
|
65
|
+
```
|
66
|
+
|
67
|
+
for row in c.execute("select name from sqlite_master where type='table'"):
|
68
|
+
|
69
|
+
print(row)
|
70
|
+
|
71
|
+
```
|
72
|
+
|
73
|
+
を加えて書き直した以下のコードを実行したところ、ターミナルで「$」がすぐ下の行に出るだけでした。
|
74
|
+
|
75
|
+
```Python
|
76
|
+
|
77
|
+
# -*- coding: utf-8 -*-
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
import sqlite3
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
#dbname = 'master_data.db'
|
86
|
+
|
87
|
+
dbname = 'master_data.db'
|
88
|
+
|
89
|
+
c = sqlite3.connect(dbname).cursor()
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
for row in c.execute("select name from sqlite_master where type='table'"):
|
94
|
+
|
95
|
+
print(row)
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
#for row in c.execute("select * from 'master_data' where jan == '4901306047569'' limit 1"):
|
100
|
+
|
101
|
+
#print (row[0])
|
102
|
+
|
103
|
+
#print (row[1].encode('utf-8'))
|
104
|
+
|
105
|
+
#print (row[3])
|
106
|
+
|
107
|
+
#with open('result_from_python.jpg', 'wb') as f:
|
108
|
+
|
109
|
+
#f.write(row[2])
|
110
|
+
|
111
|
+
```
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
63
119
|
###補足情報(言語/FW/ツール等のバージョンなど)
|
64
120
|
|
65
121
|
Python 3.6.0 :: Anaconda 4.3.0
|