kongalib 2.0.0__cp310-cp310-win_amd64.whl → 2.0.2__cp310-cp310-win_amd64.whl
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 kongalib might be problematic. Click here for more details.
- _kongalib.cp310-win_amd64.pdb +0 -0
- _kongalib.cp310-win_amd64.pyd +0 -0
- kongalib/__init__.py +6 -4
- kongalib/async_client.py +59 -26
- kongalib/client.py +49 -16
- kongalib/constants.py +110 -1853
- kongalib/data_dictionary.py +2 -10
- kongalib/db.py +5 -5
- kongalib/expression.py +7 -2
- kongalib/scripting.py +39 -18
- {kongalib-2.0.0.dist-info → kongalib-2.0.2.dist-info}/METADATA +26 -23
- kongalib-2.0.2.dist-info/RECORD +21 -0
- {kongalib-2.0.0.dist-info → kongalib-2.0.2.dist-info}/WHEEL +1 -1
- {kongalib-2.0.0.dist-info → kongalib-2.0.2.dist-info}/top_level.txt +1 -0
- kongautil.py +14 -2
- kongalib/_kongalib.cp310-win_amd64.pdb +0 -0
- kongalib/_kongalib.cp310-win_amd64.pyd +0 -0
- kongalib-2.0.0.dist-info/RECORD +0 -21
- {kongalib-2.0.0.dist-info → kongalib-2.0.2.dist-info/licenses}/LICENSE +0 -0
- {kongalib-2.0.0.dist-info → kongalib-2.0.2.dist-info}/zip-safe +0 -0
kongalib/data_dictionary.py
CHANGED
|
@@ -23,16 +23,7 @@ TYPE_INT = 3 #: Tipo di campo SQL INT; i valori ottenuti dalla :meth:`~ko
|
|
|
23
23
|
TYPE_BIGINT = 4 #: Tipo di campo SQL BIGINT; i valori ottenuti dalla :meth:`~kongalib.Client.select_data` saranno di tipo ``int``.
|
|
24
24
|
TYPE_FLOAT = 5 #: Tipo di campo SQL FLOAT; i valori ottenuti dalla :meth:`~kongalib.Client.select_data` saranno di tipo ``float``.
|
|
25
25
|
TYPE_DOUBLE = 6 #: Tipo di campo SQL DOUBLE; i valori ottenuti dalla :meth:`~kongalib.Client.select_data` saranno di tipo ``float``.
|
|
26
|
-
TYPE_DECIMAL = 7
|
|
27
|
-
"""Tipo di campo SQL DECIMAL; i valori ottenuti dalla :meth:`~kongalib.Client.select_data` saranno di tipo :class:`kongalib.Decimal`.
|
|
28
|
-
|
|
29
|
-
.. warning:: Konga Server traduce automaticamente questo tipo di dato in BIGINT sul database SQL, e salva i valori decimali come se
|
|
30
|
-
fossero interi moltiplicati per 1000000. Questo consente una precisione fino a 6 cifre decimali, e permette a Konga Server di operare anche
|
|
31
|
-
con driver SQL che non supportano nativamente il tipo dato DECIMAL (come SQLite). La traduzione è completamente trasparente per kongalib, in
|
|
32
|
-
quanto i metodi della classe :class:`kongalib.Client` ricevono e restituiscono oggetti di clase :class:`kongalib.Decimal` per gestire
|
|
33
|
-
i decimali.
|
|
34
|
-
"""
|
|
35
|
-
|
|
26
|
+
TYPE_DECIMAL = 7 #: Tipo di campo SQL DECIMAL; i valori ottenuti dalla :meth:`~kongalib.Client.select_data` saranno di tipo :class:`kongalib.Decimal`.
|
|
36
27
|
TYPE_DATE = 8 #: Tipo di campo SQL DATE; i valori ottenuti dalla :meth:`~kongalib.Client.select_data` saranno di tipo ``datetime.date``.
|
|
37
28
|
TYPE_TIME = 9 #: Tipo di campo SQL TIME; i valori ottenuti dalla :meth:`~kongalib.Client.select_data` saranno di tipo ``datetime.time``.
|
|
38
29
|
TYPE_TIMESTAMP = 10 #: Tipo di campo SQL TIMESTAMP; i valori ottenuti dalla :meth:`~kongalib.Client.select_data` saranno di tipo ``datetime.datetime``.
|
|
@@ -45,6 +36,7 @@ TYPE_LONGTEXT = 16 #: Tipo di campo SQL LONGTEXT; i valori ottenuti dalla :
|
|
|
45
36
|
TYPE_TINYBLOB = 17 #: Tipo di campo SQL TINYBLOB; i valori ottenuti dalla :meth:`~kongalib.Client.select_data` saranno di tipo ``bytes``.
|
|
46
37
|
TYPE_BLOB = 18 #: Tipo di campo SQL BLOB; i valori ottenuti dalla :meth:`~kongalib.Client.select_data` saranno di tipo ``bytes``.
|
|
47
38
|
TYPE_LONGBLOB = 19 #: Tipo di campo SQL LONGBLOB; i valori ottenuti dalla :meth:`~kongalib.Client.select_data` saranno di tipo ``bytes``.
|
|
39
|
+
TYPE_JSON = 20 #: Tipo di campo SQL JSON; i valori ottenuti dalla :meth:`~kongalib.Client.select_data` saranno di tipo ``unicode``.
|
|
48
40
|
|
|
49
41
|
|
|
50
42
|
TABLE_HAS_IMAGES = 0x1 #: Flag informativo di tabella del data dictionary. Se specificato, i record della tabella possono avere immagini collegate.
|
kongalib/db.py
CHANGED
|
@@ -250,14 +250,14 @@ def TimeFromTicks(ticks):
|
|
|
250
250
|
def TimestampFromTicks(ticks):
|
|
251
251
|
return Timestamp(*time.localtime(ticks)[:6])
|
|
252
252
|
|
|
253
|
-
def connect(host, port=0, driver=None, database=None, user=None, password=None):
|
|
254
|
-
"""Esegue una connessione al server Konga identificato da *host* e *port*,
|
|
255
|
-
ed infine si autentica usando *user* e *password*. Restituisce un oggetto :class:`Connection`; da questo
|
|
256
|
-
:class:`Cursor` che permette di eseguire query SQL sul database aperto sulla connessione.
|
|
253
|
+
def connect(host, port=0, driver=None, database=None, user=None, password=None, tenant_key=None):
|
|
254
|
+
"""Esegue una connessione al server Konga identificato da *host* e *port*, usando l'eventuale chiave tenant *tenant_key*, apre *database*
|
|
255
|
+
usando il *driver* specificato, ed infine si autentica usando *user* e *password*. Restituisce un oggetto :class:`Connection`; da questo
|
|
256
|
+
è possibile ottenere un oggetto :class:`Cursor` che permette di eseguire query SQL sul database aperto sulla connessione.
|
|
257
257
|
"""
|
|
258
258
|
conn = Connection()
|
|
259
259
|
try:
|
|
260
|
-
conn.connect({ 'host': host, 'port': port })
|
|
260
|
+
conn.connect({ 'host': host, 'port': port }, options={ 'tenant_key': tenant_key })
|
|
261
261
|
conn.open_database(driver, database)
|
|
262
262
|
conn.authenticate(user, password)
|
|
263
263
|
except _Error as e:
|
kongalib/expression.py
CHANGED
|
@@ -203,6 +203,10 @@ def parse(sql):
|
|
|
203
203
|
def p_expression_binop(p):
|
|
204
204
|
'expression : ID OPERAND VALUE'
|
|
205
205
|
p[0] = Operand(p[1], p[2], p[3])
|
|
206
|
+
|
|
207
|
+
def p_expression_valueop(p):
|
|
208
|
+
'expression : VALUE OPERAND VALUE'
|
|
209
|
+
p[0] = Operand(p[1], p[2], p[3], _HasLogic.LOGIC_NONE, _HasLogic.FLAG_NO_ESCAPE)
|
|
206
210
|
|
|
207
211
|
def p_expression_func_fieldop(p):
|
|
208
212
|
'expression : function OPERAND ID'
|
|
@@ -589,6 +593,7 @@ class Expression(_HasLogic):
|
|
|
589
593
|
e.logic_op = self.logic_op
|
|
590
594
|
for child in self.children:
|
|
591
595
|
e.children.append(child.copy())
|
|
596
|
+
child.parent = e
|
|
592
597
|
return e
|
|
593
598
|
|
|
594
599
|
def append(self, operand, logic_op):
|
|
@@ -618,8 +623,8 @@ class Expression(_HasLogic):
|
|
|
618
623
|
if self.children[index + 1].logic_op & _HasLogic.LOGIC_NOT:
|
|
619
624
|
op += ' NOT'
|
|
620
625
|
else:
|
|
621
|
-
if (len(self.children) == 1) and (self.children[-1].logic_op & _HasLogic.LOGIC_NOT):
|
|
622
|
-
|
|
626
|
+
# if (len(self.children) == 1) and (self.children[-1].logic_op & _HasLogic.LOGIC_NOT):
|
|
627
|
+
# l[-1].append(True)
|
|
623
628
|
op = None
|
|
624
629
|
l.append(op)
|
|
625
630
|
return l
|
kongalib/scripting.py
CHANGED
|
@@ -17,7 +17,7 @@ from __future__ import print_function
|
|
|
17
17
|
from __future__ import absolute_import
|
|
18
18
|
|
|
19
19
|
from kongalib import Error
|
|
20
|
-
from
|
|
20
|
+
from _kongalib import get_application_log_path, set_interpreter_timeout, get_interpreter_timeout, get_interpreter_time_left, _set_process_foreground
|
|
21
21
|
|
|
22
22
|
import sys
|
|
23
23
|
import os
|
|
@@ -148,7 +148,7 @@ def timeout_handler():
|
|
|
148
148
|
|
|
149
149
|
|
|
150
150
|
|
|
151
|
-
def init_interpreter(
|
|
151
|
+
def init_interpreter():
|
|
152
152
|
_State.io.append((sys.stdout, sys.stderr, sys.stdin))
|
|
153
153
|
try:
|
|
154
154
|
proxy._initialize()
|
|
@@ -223,7 +223,8 @@ class _Controller(threading.Thread):
|
|
|
223
223
|
name = None
|
|
224
224
|
while name != 'exit':
|
|
225
225
|
try:
|
|
226
|
-
|
|
226
|
+
ready = multiprocessing.connection.wait([ self.conn ], 0.5)
|
|
227
|
+
if not ready:
|
|
227
228
|
if self.request == _Controller.QUIT_REQUEST:
|
|
228
229
|
break
|
|
229
230
|
continue
|
|
@@ -278,16 +279,15 @@ class _Controller(threading.Thread):
|
|
|
278
279
|
|
|
279
280
|
|
|
280
281
|
|
|
281
|
-
def _trampoline(conn, sem, foreground, dll_paths, queue):
|
|
282
|
+
def _trampoline(conn, sem, foreground, env, dll_paths, queue, level):
|
|
283
|
+
logging.getLogger().setLevel(level)
|
|
282
284
|
logger = logging.getLogger('script._trampoline')
|
|
283
285
|
handler = logging.handlers.QueueHandler(queue)
|
|
284
|
-
handler.setLevel(
|
|
286
|
+
handler.setLevel(level)
|
|
285
287
|
logger.addHandler(handler)
|
|
286
|
-
logger.setLevel(logging.DEBUG)
|
|
287
288
|
logger.debug('entering interpreter process')
|
|
288
289
|
try:
|
|
289
|
-
|
|
290
|
-
_set_process_foreground()
|
|
290
|
+
_set_process_foreground(foreground)
|
|
291
291
|
for path in dll_paths:
|
|
292
292
|
try:
|
|
293
293
|
os.add_dll_directory(path)
|
|
@@ -295,6 +295,11 @@ def _trampoline(conn, sem, foreground, dll_paths, queue):
|
|
|
295
295
|
except:
|
|
296
296
|
if sys.platform == 'win32':
|
|
297
297
|
logger.error('error adding DLL directory: %s' % path)
|
|
298
|
+
for key, value in (env or {}).items():
|
|
299
|
+
key = str(key)
|
|
300
|
+
value = str(value)
|
|
301
|
+
os.environ[key] = value
|
|
302
|
+
logger.debug('added env variable %s=%s' % (key, value))
|
|
298
303
|
|
|
299
304
|
_State.controller = _Controller(conn, sem)
|
|
300
305
|
_State.controller.start()
|
|
@@ -332,6 +337,8 @@ def _trampoline(conn, sem, foreground, dll_paths, queue):
|
|
|
332
337
|
except:
|
|
333
338
|
pass
|
|
334
339
|
_State.controller.join()
|
|
340
|
+
except KeyboardInterrupt:
|
|
341
|
+
logger.debug('user issued a keyboard interrupt')
|
|
335
342
|
except Exception as e:
|
|
336
343
|
import traceback
|
|
337
344
|
logger.critical('unhandled error in interpreter process: %s' % traceback.format_exc())
|
|
@@ -356,7 +363,7 @@ class _ControllerProxy(Proxy):
|
|
|
356
363
|
|
|
357
364
|
|
|
358
365
|
class Interpreter(object):
|
|
359
|
-
def __init__(self, foreground=True):
|
|
366
|
+
def __init__(self, foreground=True, env=None):
|
|
360
367
|
self.proc = None
|
|
361
368
|
self.exc_info = None
|
|
362
369
|
self.conn = None
|
|
@@ -365,7 +372,8 @@ class Interpreter(object):
|
|
|
365
372
|
self.queue = multiprocessing.Queue()
|
|
366
373
|
self.proxy = None
|
|
367
374
|
self.foreground = foreground
|
|
368
|
-
self.
|
|
375
|
+
self.env = env
|
|
376
|
+
self.logger_listener = logging.handlers.QueueListener(self.queue, *logging.getLogger().handlers, respect_handler_level=True)
|
|
369
377
|
|
|
370
378
|
def __del__(self):
|
|
371
379
|
with self.lock:
|
|
@@ -386,7 +394,7 @@ class Interpreter(object):
|
|
|
386
394
|
self.conn, self.client_conn = multiprocessing.Pipe()
|
|
387
395
|
self.proxy = _ControllerProxy(self.conn).controller
|
|
388
396
|
self.logger_listener.start()
|
|
389
|
-
self.proc = multiprocessing.Process(target=_trampoline, args=(self.client_conn, self.sem, self.foreground, _DLL_PATHS, self.queue), daemon=True)
|
|
397
|
+
self.proc = multiprocessing.Process(target=_trampoline, args=(self.client_conn, self.sem, self.foreground, self.env, _DLL_PATHS, self.queue, logging.getLogger().level), daemon=True)
|
|
390
398
|
self.proc.start()
|
|
391
399
|
exitcode = self.proc.exitcode
|
|
392
400
|
if exitcode is not None:
|
|
@@ -426,7 +434,10 @@ class Interpreter(object):
|
|
|
426
434
|
self.proc = None
|
|
427
435
|
self.lock.release()
|
|
428
436
|
try:
|
|
429
|
-
|
|
437
|
+
try:
|
|
438
|
+
proc.terminate()
|
|
439
|
+
except:
|
|
440
|
+
pass
|
|
430
441
|
proc.join(3)
|
|
431
442
|
if proc.is_alive():
|
|
432
443
|
try:
|
|
@@ -437,13 +448,18 @@ class Interpreter(object):
|
|
|
437
448
|
self.lock.acquire()
|
|
438
449
|
|
|
439
450
|
def is_running(self):
|
|
440
|
-
|
|
441
|
-
|
|
451
|
+
conn = self.conn
|
|
452
|
+
proc = self.proc
|
|
453
|
+
return (conn is None) or ((proc is not None) and proc.is_alive())
|
|
442
454
|
|
|
443
455
|
def set_timeout(self, timeout=None, restore=False):
|
|
444
456
|
with self.lock:
|
|
445
457
|
if self.proxy is not None:
|
|
446
|
-
|
|
458
|
+
func = self.proxy.set_timeout
|
|
459
|
+
else:
|
|
460
|
+
func = None
|
|
461
|
+
if func is not None:
|
|
462
|
+
return func(timeout, restore)
|
|
447
463
|
|
|
448
464
|
def get_time_left(self):
|
|
449
465
|
with self.lock:
|
|
@@ -513,6 +529,7 @@ class _Method(object):
|
|
|
513
529
|
if DEBUG:
|
|
514
530
|
debug_log('[Proxy] call sent in %f secs. Waiting reply: %s' % (time.time() - s, str((self.handler._name, self.name))))
|
|
515
531
|
|
|
532
|
+
multiprocessing.connection.wait([ self.handler._conn ])
|
|
516
533
|
e, result = self.handler._conn.recv()
|
|
517
534
|
if DEBUG:
|
|
518
535
|
s = time.time()
|
|
@@ -560,7 +577,8 @@ class _ServerProxy(threading.Thread):
|
|
|
560
577
|
self.conn = self.listener.accept()
|
|
561
578
|
debug_log("[ServerProxy] got proxy")
|
|
562
579
|
while True:
|
|
563
|
-
|
|
580
|
+
ready = multiprocessing.connection.wait([ self.conn ], 0.5)
|
|
581
|
+
if ready:
|
|
564
582
|
data = self.conn.recv()
|
|
565
583
|
handler, name, args, kwargs = data
|
|
566
584
|
if handler in self.handlers:
|
|
@@ -635,7 +653,9 @@ class BuiltinHandler(object):
|
|
|
635
653
|
|
|
636
654
|
def format_exception(self, type, value, tb):
|
|
637
655
|
import traceback
|
|
638
|
-
|
|
656
|
+
if not all([ isinstance(x, str) for x in tb ]):
|
|
657
|
+
tb = traceback.format_list(tb)
|
|
658
|
+
text = [ 'Traceback (most recent call last):\n' ] + tb + traceback.format_exception_only(type, value)
|
|
639
659
|
return ''.join(text)
|
|
640
660
|
|
|
641
661
|
def print_exception(self, type, value, tb):
|
|
@@ -721,6 +741,7 @@ def execute(script=None, filename=None, argv=None, path=None, timeout=0, handler
|
|
|
721
741
|
else:
|
|
722
742
|
debug_log("[ServerProxy] unhandled execute exception: %s" % traceback.format_exc())
|
|
723
743
|
type, value, tb = sys.exc_info()
|
|
744
|
+
tb = traceback.format_tb(tb)
|
|
724
745
|
def do_filter(entry):
|
|
725
746
|
filename = entry[0].replace('\\', '/')
|
|
726
747
|
if filename.endswith('kongalib/scripting.py') or filename.endswith('__script_host__.py'):
|
|
@@ -733,7 +754,7 @@ def execute(script=None, filename=None, argv=None, path=None, timeout=0, handler
|
|
|
733
754
|
debug_log('proxy.builtin.print_exception exception:\n%s' % traceback.format_exc())
|
|
734
755
|
finally:
|
|
735
756
|
_handlers['builtin']._set_interpreter(None)
|
|
736
|
-
|
|
757
|
+
interpreter = None
|
|
737
758
|
_handlers['builtin']._atexit()
|
|
738
759
|
try:
|
|
739
760
|
debug_log("[ServerProxy] done")
|
|
@@ -1,36 +1,42 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: kongalib
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.2
|
|
4
4
|
Summary: Konga client library
|
|
5
|
-
|
|
6
|
-
Author: EasyByte Software
|
|
7
|
-
Author-email: konga@easybyte.it
|
|
5
|
+
Author-email: EasyByte Software <konga@easybyte.it>
|
|
8
6
|
License: LGPL
|
|
7
|
+
Project-URL: homepage, https://github.com/easybyte-software/kongalib
|
|
8
|
+
Project-URL: documentation, https://public.easybyte.it/docs/current/technical/kongalib/index.html
|
|
9
|
+
Project-URL: repository, https://github.com/easybyte-software/kongalib.git
|
|
9
10
|
Keywords: konga,client,erp
|
|
10
11
|
Classifier: Natural Language :: Italian
|
|
11
12
|
Classifier: Programming Language :: Python
|
|
12
13
|
Classifier: Programming Language :: Python :: 3
|
|
13
14
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.8
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.9
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.10
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
19
22
|
Classifier: Programming Language :: C++
|
|
20
23
|
Classifier: Development Status :: 5 - Production/Stable
|
|
21
24
|
Classifier: Environment :: Console
|
|
22
25
|
Classifier: Intended Audience :: Developers
|
|
23
26
|
Classifier: Intended Audience :: Information Technology
|
|
24
27
|
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
25
|
-
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
|
|
26
28
|
Classifier: Operating System :: MacOS :: MacOS X
|
|
27
29
|
Classifier: Operating System :: Microsoft :: Windows
|
|
28
30
|
Classifier: Operating System :: POSIX :: Linux
|
|
29
31
|
Classifier: Topic :: Office/Business
|
|
30
32
|
Classifier: Topic :: Office/Business :: Financial
|
|
31
33
|
Classifier: Topic :: Software Development :: Libraries
|
|
34
|
+
Requires-Python: >=3.8
|
|
35
|
+
Description-Content-Type: text/x-rst
|
|
32
36
|
License-File: LICENSE
|
|
33
37
|
Requires-Dist: colorama
|
|
38
|
+
Requires-Dist: nest_asyncio
|
|
39
|
+
Dynamic: license-file
|
|
34
40
|
|
|
35
41
|
Kongalib
|
|
36
42
|
========
|
|
@@ -44,9 +50,9 @@ Kongalib
|
|
|
44
50
|
.. image:: https://img.shields.io/badge/License-LGPLv3-blue.svg
|
|
45
51
|
:alt: LGPL v3 License
|
|
46
52
|
:target: https://www.gnu.org/licenses/lgpl-3.0.en.html
|
|
47
|
-
.. image:: https://
|
|
53
|
+
.. image:: https://github.com/easybyte-software/kongalib/actions/workflows/build_wheels.yml/badge.svg?event=workflow_dispatch
|
|
48
54
|
:alt: Build Status
|
|
49
|
-
:target: https://
|
|
55
|
+
:target: https://github.com/easybyte-software/kongalib/actions/workflows/build_wheels.yml
|
|
50
56
|
|
|
51
57
|
Libreria Python di comunicazione con i server `EasyByte Konga`_. Tramite
|
|
52
58
|
*kongalib* è possibile connettersi ad un server Konga (integrato in Konga Pro o
|
|
@@ -73,16 +79,16 @@ Se si desidera è possibile compilare i sorgenti. I prerequisiti per compilare
|
|
|
73
79
|
|
|
74
80
|
**Windows**
|
|
75
81
|
|
|
76
|
-
Sono supportate le versioni di Windows dalla
|
|
82
|
+
Sono supportate le versioni di Windows dalla 10 in su. Come prerequisiti è
|
|
77
83
|
necessario installare:
|
|
78
84
|
|
|
79
|
-
- Microsoft Visual Studio 2017
|
|
85
|
+
- Microsoft Visual Studio 2017 o successiva
|
|
80
86
|
- `SDK di Konga`_
|
|
81
87
|
|
|
82
88
|
|
|
83
89
|
**MacOS X**
|
|
84
90
|
|
|
85
|
-
Sono supportate le versioni di macOS dalla 10.
|
|
91
|
+
Sono supportate le versioni di macOS dalla 10.9 in su. Come prerequisiti è
|
|
86
92
|
necessario installare:
|
|
87
93
|
|
|
88
94
|
- XCode (assicurarsi di aver installato anche i tool da linea di comando)
|
|
@@ -92,9 +98,9 @@ necessario installare:
|
|
|
92
98
|
**Linux**
|
|
93
99
|
|
|
94
100
|
Benchè il pacchetto binario wheel per Linux supporti tutte le distribuzioni
|
|
95
|
-
Linux moderne (specifica `
|
|
101
|
+
Linux moderne (specifica `manylinux_2_28`_), al momento la compilazione da parte di
|
|
96
102
|
terzi è supportata ufficialmente solo se si usa una distribuzione Linux basata su
|
|
97
|
-
Debian, in particolare Ubuntu Linux dalla versione
|
|
103
|
+
Debian, in particolare Ubuntu Linux dalla versione 20.04 in su. Sono necessari i
|
|
98
104
|
seguenti pacchetti *deb*:
|
|
99
105
|
|
|
100
106
|
- build-essential
|
|
@@ -102,18 +108,15 @@ seguenti pacchetti *deb*:
|
|
|
102
108
|
- python-dev
|
|
103
109
|
- `easybyte-konga-dev`_
|
|
104
110
|
|
|
105
|
-
La compilazione
|
|
111
|
+
La compilazione come da standard Python è possibile sempre tramite *pip*, eseguendo
|
|
112
|
+
dalla directory dei sorgenti::
|
|
106
113
|
|
|
107
|
-
|
|
114
|
+
pip install .
|
|
108
115
|
|
|
109
116
|
|
|
110
117
|
.. note:: Sotto piattaforma Windows per la corretta compilazione è necessario
|
|
111
|
-
impostare la variabile d'ambiente `KONGASDK`
|
|
112
|
-
dell'`SDK di Konga`_.
|
|
113
|
-
Visual Studio 2017 e non è compatibile con Python 2.x (che sotto Windows
|
|
114
|
-
richiede Visual Studio 2008); se si desidera usare *kongalib* con Python 2.x
|
|
115
|
-
sotto Windows, è necessario usare la *wheel* precompilata installabile
|
|
116
|
-
tramite *pip*.
|
|
118
|
+
impostare la variabile d'ambiente `KONGASDK` alla directory d'installazione
|
|
119
|
+
dell'`SDK di Konga`_.
|
|
117
120
|
|
|
118
121
|
|
|
119
122
|
Risorse
|
|
@@ -143,5 +146,5 @@ Risorse
|
|
|
143
146
|
.. _Script di utilità comune per Konga: https://github.com/easybyte-software/konga_scripts
|
|
144
147
|
.. _SDK di Konga: http://public.easybyte.it/downloads/current
|
|
145
148
|
.. _easybyte-konga-dev: http://public.easybyte.it/downloads/current
|
|
146
|
-
..
|
|
149
|
+
.. _manylinux_2_28: https://github.com/pypa/manylinux
|
|
147
150
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
_kongalib.cp310-win_amd64.pdb,sha256=-7fOa1mV-4yfpqLQ4ky7ccEfodaIvGl1KCCmrwt1NXQ,7344128
|
|
2
|
+
_kongalib.cp310-win_amd64.pyd,sha256=erDzZb9JNts0EyaS_l-QNN7LUsu1-hS0u3tE0ym4Qsw,2537984
|
|
3
|
+
kongaui.py,sha256=0sSKUsOo5vLNH3wyUUl4icOL4z4CXqoPAR2fqYQZE7o,20598
|
|
4
|
+
kongautil.py,sha256=PSObmHX6kVf54mtIyBXtxzf4CMHUsj_ppDNSWjY3Y2c,24005
|
|
5
|
+
kongalib/__init__.py,sha256=VPFvthIAm7K668_Fxx_4Wf6rwZCAs6dwBz6DfZtwrLU,12979
|
|
6
|
+
kongalib/async_client.py,sha256=tb6iOHpz3SIRlSyEI5aQ-VpEccmVFSK0V4N5p50wiPY,48219
|
|
7
|
+
kongalib/client.py,sha256=-5YT1V9quD6WKkrp9LgDjO4Y-kq6nQEPTfCRGbi2TfA,59033
|
|
8
|
+
kongalib/constants.py,sha256=r59fg2-CCTWRvKOusxXe9FTBrSAmFt5Esn70DsyEn8s,8793
|
|
9
|
+
kongalib/data_dictionary.py,sha256=a-_aTlZeJPGkxkxzG040A2yrfXf_Stup3CTurh_93B0,11298
|
|
10
|
+
kongalib/db.py,sha256=qnSon_7N5Po0-ww-88mL7DZlGX7_ASIM4tMY9bGGBnk,8354
|
|
11
|
+
kongalib/expression.py,sha256=A7-erKQPF4VroB3ERCTvLYyOv5_gm1a-rxToLNhd8VY,21230
|
|
12
|
+
kongalib/json.py,sha256=-8h3e92hLzsElxZhLgpcoQWfakSYyY0i7vsxB7Z7qtk,2341
|
|
13
|
+
kongalib/lex.py,sha256=tV9VGF97XHRFf0eBICVzTILzH878i_slXLsoktFnZTQ,41797
|
|
14
|
+
kongalib/scripting.py,sha256=SrYq2pubnj-qHl3_oNBEp1caA8zMmsBjQLUxyt_aydE,20410
|
|
15
|
+
kongalib/yacc.py,sha256=UHnHKzBknH7qzIT7xJFIHYKBTzOIxWILtGPdSI29XcE,131768
|
|
16
|
+
kongalib-2.0.2.dist-info/licenses/LICENSE,sha256=LPNKwDiu5awG-TPd0dqYJuC7k4PBPY4LCI_O0LSpW1s,7814
|
|
17
|
+
kongalib-2.0.2.dist-info/METADATA,sha256=sJvnA0zOKI4KGUBXP_xi0f9Axm91pdGBxGCk5DFjcUM,5402
|
|
18
|
+
kongalib-2.0.2.dist-info/WHEEL,sha256=KUuBC6lxAbHCKilKua8R9W_TM71_-9Sg5uEP3uDWcoU,101
|
|
19
|
+
kongalib-2.0.2.dist-info/top_level.txt,sha256=htHdvBd1NQjLXNwXgTzCMPtyfCtorpw6jUZzu09vDYY,37
|
|
20
|
+
kongalib-2.0.2.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
|
21
|
+
kongalib-2.0.2.dist-info/RECORD,,
|
kongautil.py
CHANGED
|
@@ -139,7 +139,7 @@ def connect(host=None, port=None, driver=None, database=None, username=None, pas
|
|
|
139
139
|
parametri come variabili all'interno di un file di configurazione, nella sezione ``[kongautil.connect]``; tale file deve avere
|
|
140
140
|
il nome passato a questa funzione con il parametro ``config``, altrimenti verranno ricercati nell'ordine anche il file con lo
|
|
141
141
|
stesso nome dello script lanciato da terminale, ma con estensione ``.cfg``, il file ``kongalib.cfg`` sempre nella stessa directory
|
|
142
|
-
da cui si esegue lo script e infine il file ``~/.kongalib`` (sotto Unix) o ``%userprofile
|
|
142
|
+
da cui si esegue lo script e infine il file ``~/.kongalib`` (sotto Unix) o ``%userprofile%\\kongalib.cfg`` (sotto Windows)."""
|
|
143
143
|
if _proxy.is_valid():
|
|
144
144
|
info = _proxy.util.get_connection_info()
|
|
145
145
|
if info is not None:
|
|
@@ -423,7 +423,7 @@ def print_log(log, title, target=PRINT_TARGET_PREVIEW, filename=None):
|
|
|
423
423
|
:func:`print_layout`, passando i parametri *target* e *filename*; viceversa se si esegue fuori da Konga, il log verrà stampato su terminale."""
|
|
424
424
|
if _proxy.is_valid():
|
|
425
425
|
template = """<?xml version='1.0' encoding='utf-8'?>
|
|
426
|
-
<layout version="
|
|
426
|
+
<layout version="3" name="%(title)s" title="%(title)s" orientation="vertical" margin_top="75" margin_right="75" margin_bottom="75" margin_left="75">
|
|
427
427
|
<init>
|
|
428
428
|
<![CDATA[set_datasource(Datasource(['id', 'type', 'message'], DATA, 'Master'))
|
|
429
429
|
]]></init>
|
|
@@ -489,6 +489,18 @@ def print_log(log, title, target=PRINT_TARGET_PREVIEW, filename=None):
|
|
|
489
489
|
|
|
490
490
|
|
|
491
491
|
|
|
492
|
+
def show_log(log, title, size=None, iconsize=32):
|
|
493
|
+
"""Visualizza il contenuto dell'oggetto *log* di classe :class:`kongalib.Log`; se si esegue questa funzione dall'interno di Konga, il log verrà
|
|
494
|
+
visualizzato in una finestra dedicata; viceversa se si esegue fuori da Konga, il comportamento di questa funzione equivale a chiamare
|
|
495
|
+
:func:`print_log` con gli stessi argomenti. La finestra del log mostrerà *title* come messaggio informativo e se specificato avrà dimensione *size*;
|
|
496
|
+
è possibile specificare anche la dimensione delle icone dei singoli messaggi tramite il parametro *iconsize*."""
|
|
497
|
+
if _proxy.is_valid():
|
|
498
|
+
log = _proxy.util.show_log(log.get_messages(), title, size, iconsize)
|
|
499
|
+
else:
|
|
500
|
+
print_log(log, title)
|
|
501
|
+
|
|
502
|
+
|
|
503
|
+
|
|
492
504
|
def suspend_timeout():
|
|
493
505
|
"""Sospende il timeout di esecuzione dello script. La funzione non comporta eccezioni ma non ha alcun effetto se eseguita al di fuori di Konga."""
|
|
494
506
|
if _proxy.is_valid():
|
|
Binary file
|
|
Binary file
|
kongalib-2.0.0.dist-info/RECORD
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
kongaui.py,sha256=0sSKUsOo5vLNH3wyUUl4icOL4z4CXqoPAR2fqYQZE7o,20598
|
|
2
|
-
kongautil.py,sha256=6MOLwqxPoub7rezbiq06yBoSPecJISINO6oL2Hf4R_0,23265
|
|
3
|
-
kongalib/__init__.py,sha256=vLzkRCqVlOR0CuUIYp_7lS_STxpKfqJtlVh3UBGTgfI,12910
|
|
4
|
-
kongalib/_kongalib.cp310-win_amd64.pdb,sha256=QVsJ24_Y2gfEijK8NdpFmjcSFYQH5dkF4c4Pby9VtDo,8286208
|
|
5
|
-
kongalib/_kongalib.cp310-win_amd64.pyd,sha256=k0gU6a4RwBEX6VVc-gvM_LvNFNPAx9PH0VnbfuHMElg,2584064
|
|
6
|
-
kongalib/async_client.py,sha256=z8ceGsJv5dD1Zv-TQRsITd_bVh_DHAl5sZ4Xi5sR2xE,46276
|
|
7
|
-
kongalib/client.py,sha256=IkNlc7z7bidO_DNnTd4LDeLxFsI6gkhqZ0jSQa-gWm4,56876
|
|
8
|
-
kongalib/constants.py,sha256=00VYwrvp8zoilLAytniVlToc4bCfpnkIFMPiEGM96C0,128527
|
|
9
|
-
kongalib/data_dictionary.py,sha256=BJbDNnG9HllSSr7gYMz9zVTuOQUqaksT3JT-SL4WWWw,11735
|
|
10
|
-
kongalib/db.py,sha256=Th97qGQvS2xtkNPr_CEUCxwL_8c07E0l4rafe0ZsV8w,8252
|
|
11
|
-
kongalib/expression.py,sha256=gLf0oG4CX3LG0XUpGSsTb8fvXMVIVOWNAnJ_QQK2YpM,21049
|
|
12
|
-
kongalib/json.py,sha256=-8h3e92hLzsElxZhLgpcoQWfakSYyY0i7vsxB7Z7qtk,2341
|
|
13
|
-
kongalib/lex.py,sha256=tV9VGF97XHRFf0eBICVzTILzH878i_slXLsoktFnZTQ,41797
|
|
14
|
-
kongalib/scripting.py,sha256=nu8DbHpo1yXIyKa2s8449xnGEZRMk2bHnBF0BZRQdE0,19711
|
|
15
|
-
kongalib/yacc.py,sha256=UHnHKzBknH7qzIT7xJFIHYKBTzOIxWILtGPdSI29XcE,131768
|
|
16
|
-
kongalib-2.0.0.dist-info/LICENSE,sha256=LPNKwDiu5awG-TPd0dqYJuC7k4PBPY4LCI_O0LSpW1s,7814
|
|
17
|
-
kongalib-2.0.0.dist-info/METADATA,sha256=etd2bJNmuLV-GmMzOAIv8SgBiVpl-R-Til3PC6UVOvI,5301
|
|
18
|
-
kongalib-2.0.0.dist-info/WHEEL,sha256=jrOhEbqKwvzRFSJcbYXlJCyVkgVdHg4_7__YHrdTUfw,102
|
|
19
|
-
kongalib-2.0.0.dist-info/top_level.txt,sha256=JEIFfKoGVQvVGWo76Ykxl-l6nKi9yA1dnkGVqEObuDU,27
|
|
20
|
-
kongalib-2.0.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
|
21
|
-
kongalib-2.0.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|