From: Michael Wagner Date: Mon, 6 May 2024 15:17:55 +0000 (+0200) Subject: bazuna X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=2a5cd4308d32c1a9a72f9538b9e1281e003a34a3;p=SVBaL.git bazuna --- diff --git a/python/eh_util/eh_abgleich/MyTest.py b/python/eh_util/eh_abgleich/MyTest.py index 0ba2e45..877b5ad 100755 --- a/python/eh_util/eh_abgleich/MyTest.py +++ b/python/eh_util/eh_abgleich/MyTest.py @@ -33,10 +33,39 @@ def mytest(datei_name): m = daten.get() 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() + + if __name__ == '__main__': numArgs = len(sys.argv) if (numArgs != 2): raise RuntimeError("usage: MyTest DATEI") - mytest(sys.argv[1]) + #mytest(sys.argv[1]) + + test_q(sys.argv[1])