bazuna
authorMichael Wagner <michael@wagnertech.de>
Mon, 1 Jul 2024 08:54:24 +0000 (10:54 +0200)
committerMichael Wagner <michael@wagnertech.de>
Mon, 1 Jul 2024 08:54:24 +0000 (10:54 +0200)
python/eh_util/eh_abgleich/MyTest.py

index 877b5ad..a2ffb6b 100755 (executable)
@@ -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[<select_statement>, 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()