q2rad 0.1.178__tar.gz → 0.1.179__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of q2rad might be problematic. Click here for more details.
- {q2rad-0.1.178 → q2rad-0.1.179}/PKG-INFO +1 -1
- {q2rad-0.1.178 → q2rad-0.1.179}/pyproject.toml +1 -1
- {q2rad-0.1.178 → q2rad-0.1.179}/q2rad/q2actions.py +2 -2
- {q2rad-0.1.178 → q2rad-0.1.179}/q2rad/q2appselector.py +2 -2
- {q2rad-0.1.178 → q2rad-0.1.179}/q2rad/q2lines.py +2 -2
- {q2rad-0.1.178 → q2rad-0.1.179}/q2rad/q2make.py +9 -9
- {q2rad-0.1.178 → q2rad-0.1.179}/q2rad/q2queries.py +1 -2
- {q2rad-0.1.178 → q2rad-0.1.179}/q2rad/q2rad.py +1 -1
- {q2rad-0.1.178 → q2rad-0.1.179}/q2rad/q2raddb.py +28 -28
- {q2rad-0.1.178 → q2rad-0.1.179}/q2rad/q2reports.py +1 -2
- {q2rad-0.1.178 → q2rad-0.1.179}/q2rad/q2utils.py +35 -2
- q2rad-0.1.179/q2rad/version.py +1 -0
- q2rad-0.1.178/q2rad/version.py +0 -1
- {q2rad-0.1.178 → q2rad-0.1.179}/LICENSE +0 -0
- {q2rad-0.1.178 → q2rad-0.1.179}/README.md +0 -0
- {q2rad-0.1.178 → q2rad-0.1.179}/q2rad/__init__.py +0 -0
- {q2rad-0.1.178 → q2rad-0.1.179}/q2rad/__main__.py +0 -0
- {q2rad-0.1.178 → q2rad-0.1.179}/q2rad/q2appmanager.py +0 -0
- {q2rad-0.1.178 → q2rad-0.1.179}/q2rad/q2constants.py +0 -0
- {q2rad-0.1.178 → q2rad-0.1.179}/q2rad/q2forms.py +0 -0
- {q2rad-0.1.178 → q2rad-0.1.179}/q2rad/q2market.py +0 -0
- {q2rad-0.1.178 → q2rad-0.1.179}/q2rad/q2modules.py +0 -0
- {q2rad-0.1.178 → q2rad-0.1.179}/q2rad/q2packages.py +0 -0
- {q2rad-0.1.178 → q2rad-0.1.179}/q2rad/q2stylesettings.py +0 -0
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
|
|
16
16
|
from q2db.cursor import Q2Cursor
|
|
17
17
|
from q2gui.q2model import Q2CursorModel
|
|
18
|
-
from q2rad.q2raddb import
|
|
19
|
-
from q2rad.q2utils import choice_form, choice_column, Q2_save_and_run, Q2Form, int_
|
|
18
|
+
from q2rad.q2raddb import last_error, insert
|
|
19
|
+
from q2rad.q2utils import q2cursor, choice_form, choice_column, Q2_save_and_run, Q2Form, int_
|
|
20
20
|
from q2gui import q2app
|
|
21
21
|
# from q2rad import Q2Form
|
|
22
22
|
|
|
@@ -27,8 +27,8 @@ import json
|
|
|
27
27
|
import os
|
|
28
28
|
|
|
29
29
|
from q2rad import Q2App
|
|
30
|
-
from q2rad.q2utils import Q2Form
|
|
31
|
-
from q2rad.q2raddb import
|
|
30
|
+
from q2rad.q2utils import q2cursor, Q2Form
|
|
31
|
+
from q2rad.q2raddb import insert
|
|
32
32
|
from q2rad.q2appmanager import AppManager
|
|
33
33
|
from q2rad.q2raddb import open_url
|
|
34
34
|
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
from q2gui.q2model import Q2CursorModel
|
|
17
17
|
from q2rad.q2raddb import Q2Cursor, insert
|
|
18
18
|
from q2gui.q2dialogs import q2AskYN
|
|
19
|
-
from q2rad.q2utils import choice_table, choice_column, choice_form, Q2_save_and_run
|
|
20
|
-
from q2rad.q2raddb import
|
|
19
|
+
from q2rad.q2utils import q2cursor, choice_table, choice_column, choice_form, Q2_save_and_run
|
|
20
|
+
from q2rad.q2raddb import last_error
|
|
21
21
|
|
|
22
22
|
from q2rad.q2utils import Q2Form, int_
|
|
23
23
|
|
|
@@ -16,8 +16,7 @@ import os
|
|
|
16
16
|
import sys
|
|
17
17
|
import shutil
|
|
18
18
|
from q2terminal.q2terminal import Q2Terminal
|
|
19
|
-
from q2rad.q2utils import Q2Form, open_folder # noqa F401
|
|
20
|
-
from q2rad.q2raddb import q2cursor
|
|
19
|
+
from q2rad.q2utils import q2cursor, Q2Form, open_folder # noqa F401
|
|
21
20
|
from q2gui.q2dialogs import q2mess, q2wait, q2ask
|
|
22
21
|
from q2rad.q2appselector import Q2AppSelect
|
|
23
22
|
from q2db.db import Q2Db
|
|
@@ -63,7 +62,7 @@ def make_binary(self):
|
|
|
63
62
|
datatype="char",
|
|
64
63
|
data=os.path.basename(q2app.q2_app.app_url) if q2app.q2_app.app_url else "q2-app",
|
|
65
64
|
)
|
|
66
|
-
form.add_control("onefile", "One file", datatype="char", control="check")
|
|
65
|
+
# form.add_control("onefile", "One file", datatype="char", control="check")
|
|
67
66
|
form.ok_button = 1
|
|
68
67
|
form.cancel_button = 1
|
|
69
68
|
form.show_form("Build binary")
|
|
@@ -75,7 +74,8 @@ def make_binary(self):
|
|
|
75
74
|
|
|
76
75
|
make_folder = os.path.abspath(form.s.make_folder)
|
|
77
76
|
binary_name = form.s.binary_name
|
|
78
|
-
onefile = "--onefile" if form.s.onefile else ""
|
|
77
|
+
# onefile = "--onefile" if form.s.onefile else ""
|
|
78
|
+
onefile = ""
|
|
79
79
|
if not os.path.isdir(make_folder):
|
|
80
80
|
os.mkdir(make_folder)
|
|
81
81
|
if not os.path.isdir(make_folder):
|
|
@@ -123,11 +123,11 @@ def make_binary(self):
|
|
|
123
123
|
shutil.copytree("assets", os.path.abspath(f"{dist_folder}/assets"))
|
|
124
124
|
create_q2apps_sqlite(f"{dist_folder}")
|
|
125
125
|
|
|
126
|
-
if onefile:
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
126
|
+
# if onefile:
|
|
127
|
+
# dist_folder = os.path.abspath(f"{make_folder}/dist")
|
|
128
|
+
# for x in os.listdir(dist_folder):
|
|
129
|
+
# if os.path.isfile(os.path.join(dist_folder, x)):
|
|
130
|
+
# shutil.move(os.path.join(dist_folder, x), os.path.join(dist_folder, binary_name, x))
|
|
131
131
|
|
|
132
132
|
w.close()
|
|
133
133
|
|
|
@@ -18,8 +18,7 @@ from q2db.cursor import Q2Cursor
|
|
|
18
18
|
from q2gui.q2model import Q2CursorModel, Q2Model
|
|
19
19
|
from q2gui.q2widget import Q2Widget
|
|
20
20
|
from q2gui.q2app import Q2Actions
|
|
21
|
-
from q2rad.
|
|
22
|
-
from q2rad.q2utils import Q2_save_and_run
|
|
21
|
+
from q2rad.q2utils import q2cursor, Q2_save_and_run
|
|
23
22
|
from q2gui.q2utils import set_dict_default
|
|
24
23
|
import json
|
|
25
24
|
import gettext
|
|
@@ -46,7 +46,7 @@ from q2rad.q2actions import Q2Actions
|
|
|
46
46
|
from q2rad.q2raddb import * # noqa:F403
|
|
47
47
|
|
|
48
48
|
from q2gui import q2app
|
|
49
|
-
from q2rad.
|
|
49
|
+
from q2rad.q2utils import q2cursor
|
|
50
50
|
from q2rad.q2appmanager import AppManager
|
|
51
51
|
from q2rad.q2stylesettings import AppStyleSettings
|
|
52
52
|
from q2terminal.q2terminal import Q2Terminal
|
|
@@ -70,34 +70,34 @@ def read_url(url, waitbar=False, chunk_size=10000000):
|
|
|
70
70
|
return b""
|
|
71
71
|
|
|
72
72
|
|
|
73
|
-
class q2cursor(Q2Cursor):
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
73
|
+
# class q2cursor(Q2Cursor):
|
|
74
|
+
# def __init__(self, sql="", q2_db=None):
|
|
75
|
+
# if q2_db is None:
|
|
76
|
+
# q2_db = q2app.q2_app.db_data
|
|
77
|
+
# super().__init__(q2_db, sql)
|
|
78
|
+
# if q2_db.last_sql_error:
|
|
79
|
+
# print(q2_db.last_sql_error)
|
|
80
|
+
|
|
81
|
+
# def q2form(self):
|
|
82
|
+
# form = Q2Form(self.sql)
|
|
83
|
+
# for x in self.record(0):
|
|
84
|
+
# form.add_control(x, x, datalen=250)
|
|
85
|
+
# form.set_model(Q2CursorModel(self))
|
|
86
|
+
# return form
|
|
87
|
+
|
|
88
|
+
# def browse(self):
|
|
89
|
+
# if self.row_count() <= 0:
|
|
90
|
+
# q2Mess(
|
|
91
|
+
# f"""Query<br>
|
|
92
|
+
# <b>{html.escape(self.sql)}</b><br>
|
|
93
|
+
# returned no records,<br>
|
|
94
|
+
# <font color=red>
|
|
95
|
+
# {self.last_sql_error()}
|
|
96
|
+
# """
|
|
97
|
+
# )
|
|
98
|
+
# else:
|
|
99
|
+
# self.q2form().run()
|
|
100
|
+
# return self
|
|
101
101
|
|
|
102
102
|
|
|
103
103
|
def get_default_db(q2_db):
|
|
@@ -23,8 +23,7 @@ from q2gui.q2utils import dotdict, set_dict_default, num, int_
|
|
|
23
23
|
from q2report.q2report import Q2Report, Q2Report_rows
|
|
24
24
|
from q2rad.q2queries import re_find_param
|
|
25
25
|
from q2rad.q2queries import Q2QueryEdit
|
|
26
|
-
from q2rad.
|
|
27
|
-
from q2rad.q2utils import Q2_save_and_run
|
|
26
|
+
from q2rad.q2utils import q2cursor, Q2_save_and_run
|
|
28
27
|
from q2gui import q2app
|
|
29
28
|
from q2gui.q2dialogs import Q2WaitShow, q2WaitMax, q2WaitStep, q2working
|
|
30
29
|
import json
|
|
@@ -18,12 +18,15 @@ import random
|
|
|
18
18
|
import string
|
|
19
19
|
import threading
|
|
20
20
|
import subprocess
|
|
21
|
+
import html
|
|
21
22
|
|
|
22
23
|
from q2rad import Q2Form as _Q2Form
|
|
23
|
-
from
|
|
24
|
+
from q2db.cursor import Q2Cursor
|
|
25
|
+
from q2rad.q2raddb import num
|
|
24
26
|
from q2gui.q2model import Q2Model
|
|
27
|
+
from q2gui.q2model import Q2CursorModel
|
|
25
28
|
from q2gui import q2app
|
|
26
|
-
from q2gui.q2dialogs import q2working
|
|
29
|
+
from q2gui.q2dialogs import q2working, q2Mess
|
|
27
30
|
from q2gui.q2app import Q2Actions
|
|
28
31
|
from q2gui.q2app import Q2Controls
|
|
29
32
|
from q2gui.q2utils import int_
|
|
@@ -190,6 +193,36 @@ class Q2Form(_Q2Form):
|
|
|
190
193
|
report.run()
|
|
191
194
|
|
|
192
195
|
|
|
196
|
+
class q2cursor(Q2Cursor):
|
|
197
|
+
def __init__(self, sql="", q2_db=None):
|
|
198
|
+
if q2_db is None:
|
|
199
|
+
q2_db = q2app.q2_app.db_data
|
|
200
|
+
super().__init__(q2_db, sql)
|
|
201
|
+
if q2_db.last_sql_error:
|
|
202
|
+
print(q2_db.last_sql_error)
|
|
203
|
+
|
|
204
|
+
def q2form(self):
|
|
205
|
+
form = Q2Form(self.sql)
|
|
206
|
+
for x in self.record(0):
|
|
207
|
+
form.add_control(x, x, datalen=250)
|
|
208
|
+
form.set_model(Q2CursorModel(self))
|
|
209
|
+
return form
|
|
210
|
+
|
|
211
|
+
def browse(self):
|
|
212
|
+
if self.row_count() <= 0:
|
|
213
|
+
q2Mess(
|
|
214
|
+
f"""Query<br>
|
|
215
|
+
<b>{html.escape(self.sql)}</b><br>
|
|
216
|
+
returned no records,<br>
|
|
217
|
+
<font color=red>
|
|
218
|
+
{self.last_sql_error()}
|
|
219
|
+
"""
|
|
220
|
+
)
|
|
221
|
+
else:
|
|
222
|
+
self.q2form().run()
|
|
223
|
+
return self
|
|
224
|
+
|
|
225
|
+
|
|
193
226
|
def q2choice(records=[], title="Make your choice", column_title=["Column"]):
|
|
194
227
|
if len(records) == 0:
|
|
195
228
|
return None
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.179"
|
q2rad-0.1.178/q2rad/version.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.1.178"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|