From 3d173aef8dce26db04c3a34ed770f91c781b2aa2 Mon Sep 17 00:00:00 2001 From: Michael Wagner Date: Mon, 1 Jul 2024 10:54:24 +0200 Subject: [PATCH] bazuna --- python/eh_util/eh_abgleich/MyTest.py | 31 ++++++---------------------- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/python/eh_util/eh_abgleich/MyTest.py b/python/eh_util/eh_abgleich/MyTest.py index 877b5ad..a2ffb6b 100755 --- a/python/eh_util/eh_abgleich/MyTest.py +++ b/python/eh_util/eh_abgleich/MyTest.py @@ -34,30 +34,11 @@ def mytest(datei_name): print ("Ausweise erstellt.") def test_q(): - import q - import sqlite3 - sqlite3.enable_callback_tracebacks(True) - - p, qrc_filename = q.parse_qrc_file() - - args, options, parser = q.initialize_command_line_parser(p, qrc_filename) - ''' - args: list[, 1] - options: Namespace: Namespace(version=False, verbose=False, save_db_to_disk_filename=None, caching_mode='none', dump_defaults=False, max_attached_sqlite_databases=10, skip_header=False, delimiter=';', pipe_delimited=False, tab_delimited=False, encoding='UTF-8', gzipped=False, analyze_only=False, mode='relaxed', column_count=None, keep_leading_whitespace_in_values=False, disable_double_double_quoting=True, disable_escaped_double_quoting=True, disable_column_type_detection=False, input_quoting_mode='minimal', max_column_length_limit=131072, with_universal_newlines=False, output_delimiter=None, pipe_delimited_output=False, tab_delimited_output=False, output_header=False, beautify=False, formatting=None, output_encoding='none', output_quoting_mode='minimal', list_user_functions=False, overwrite_qsql=False, query_filename=None, query_encoding='UTF-8', leftover=['select c1,c5 from /home/sparky2021/SVBaL/tmp/export.csv']) - ''' - #dump_defaults_and_stop__if_needed(options, parser) - - #dump_version_and_stop__if_needed(options) - - STDOUT, default_input_params, q_output_printer, query_strs = q.parse_options(args, options) - - data_streams_dict = q.initialize_default_data_streams() - - q_engine = q.QTextAsData(default_input_params=default_input_params,data_streams_dict=data_streams_dict) - - q.execute_queries(STDOUT, options, q_engine, q_output_printer, query_strs) - - q_engine.done() + import qif + qif = qif.QIF({"d" : ";", "H" : 1}) + data = qif.request("select Vorname,Nachname from /home/sparky2021/SVBaL/tmp/export.csv") + + print(data) if __name__ == '__main__': @@ -67,5 +48,5 @@ if __name__ == '__main__': #mytest(sys.argv[1]) - test_q(sys.argv[1]) + test_q() -- 2.20.1