Answer the question
In order to leave comments, you need to log in
How to call methods from GUI?
Good afternoon dear IT specialists. I beg you to help me with one problem. I'm trying to write a simple program, the
meaning of which is to filter two excel files and display errors encountered in these files. This is my second programming experience
, as I realized for myself that programming needs to be learned by solving specific problems.
To be honest, it is not easy for me, but the desire is there. I understand that you will be horrified by my g..code, and that a lot of things were done
wrong at all (although I stole QAbstractTableModel from github), but I ran into a huge problem. I understand that this is a fundamental ignorance of OOP,
but still I ask you for help. I wrote a simple logic using Pandas and most likely can be made simpler and with the least amount of RAM,
but I will improve it as I learn python. The program works and counts everything. But only I can use it. Edit paths to archives in the .py file, etc.
maybe not everyone. So I decided to make a GUI. And this is a huge problem. The interface is ready and even works a little. But I don't understand how to pass
the paths to Excel files to .py files (for example, ParseExcelOMS) and, most importantly, I don't understand at all how to run the ParseExcelOMS.py file so that it starts parsing the file.
As I understand it, I will have to create some kind of method (function) for this implementation. In general, I am completely confused and do not know what to read and where to move.
In the end, I want what I would have succeeded.
There is a 1.xls and 2.xls file. In the GUI, I select one file and click Filter (Button_Calculate_OMS). As a result, progressBar_OMS should be activated
, a DataFrame should be formed and the number of people received as a result of the filter will be displayed in Count_Sum_OMS. The same goes for the second file. Then
I simply compare them, and I can save the result in Excel or view it right away. If you run the files separately, then everything turns out.
But I don't understand how to call all this from the GUI.
If Excel files are so necessary, I will try to change them and upload them. In the original, I can’t because they contain personal data of users.
https://github.com/AlexeyRepkin77/DispFilter#dispfilter "
ParseExcelOMS.py file
https://pastebin.com/6EUMr31t
ParseExcelMIS.py file
https://pastebin.com/L6WXsnzC
ParseDublicate.py
file
https://pastebin. com/Aje5vn9s Visual.py
file
https://pastebin.com/GQCV1GDf
General.py file
https://pastebin.com/ZeBDPdmm
GUI DispFilterGUI.py
https://pastebin.com/b1NxeMpv
Answer the question
In order to leave comments, you need to log in
It seems to me that you have taken on many tasks at once and are trying to solve them at the same time.
A good solution would be like this:
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question