August 28th, 2013, 01:54 PM
Python - Application logic - Help with understaing
Hello, i am making an application that has GUI and some classes. I ran into a problem of getting an idea for the logic.
here is a brief description of the program:
Module 1 - **dataPreparation.py** -responsible for string processing - made of several classes and methods that receive PATH to directory, collect all files in a LIST, after that for each file based on type of file name it sorts it out to appropriate categories that can be accessed through class instances.
Module 2 - **gui.py** - Responsible for GUI. It crates a simple GUi-layout that offer BROWSE button (to get the PATH), QUIT button to exit application, LISTBOX that lists subfolders from the PATH, and BATCH button that must execute the main processor.
Module 3 - **vntProcessor.py** - Responsible for processing of collected data. This module is based of an API of another application. It receives the values from the BATCH-button and invokes specific methods based on sorting that was performed using MODULE 1.
So, here is the logic problem that i encountered, and i wanted to ask what is the best way to handle it.
I crated **scene7_vntAssembler.py** .
This file imports **Module 1(dataSorting), Module 2(GUI), Module 3(Processor)**
i create an instance of GUI
and call it to start interface ( have a window open)
in the interface, i browse for specific folder, so my PATH variable is set.
my list box is populated with subfolders.
my next step should be to press the BATCH folder and forward all of the values (PATH and ARRAY of SUBFOLDERS) to my Module 3 (processor).
I cannot figure out the way to do that. How to pass the PATH and SUBFOLDER-LIST to module 3? and invoke operations on collected data?
I cannot show all of my code, sorry. But i can show snippets as needed, just tell me what portion you think might be the problem area.
thanks in advance!
August 28th, 2013, 02:22 PM
i forgot to mention,
i am thinking that need to pass the data to
scene7_vntAssembler.py - my CORE file that calls for GUI,
and get a variable that will store values from BATCH button.
i will then be calling methods from processor(Module 3) and datasorting(Module 1)
to process the info and generate final results.