Python Forum

Full Version: Connecting GUI code with working logic code
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a working non-GUI python script to do some scraping and showing me some financial data and it is working and I trust it so I would like to add on a recently written GUI section in a way that keeps the GUI somewhat apart from my 'logic part'. I was wondering if I can run the GUI part and just pipe in the results and then let my tested logic work on that. Maybe later I can integrate these two concerns but any ideas on a way to do this while keeping the code mostly apart? The GUI part has only a small role - to generate about eight strings for financial accounts. So I could run the GUI part and then let the other code take over without integrating the code too much? Thanks.
import?
Yes I'll work on that but my quick solution was just to have the first script call the second. It's okay for now.

    s1= ' '.join(final_list) # the bank arguments
some_command="python3 "+f_path +" "+ s1
subprocess.run(some_command, shell=True)