Python Forum
Integrate/import a gui code to my main.py
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Integrate/import a gui code to my main.py
#7
How you go about doing the "main" part depends on what "main" is doing. If main can be done quickly, you can put the main processing in a function and bind a control to call the function. If main takes a long time but can be broken up into little pieces of work you can implement main as a state machine and attach it to an event to be worked on whenever the GUI is not busy processing other events. If main is some a monolithic bunch of processing you might want to do main as a subprocess or do it in a separate thread. As Axel_Erfurt says, nobody can offer any useful suggestions without knowing what main does.
Reply


Messages In This Thread
RE: Integrate/import a gui code to my main.py - by deanhystad - Feb-03-2021, 08:49 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Error on import: SyntaxError: source code string cannot contain null bytes kirkwilliams2049 7 19,784 Aug-03-2023, 06:00 PM
Last Post: Gribouillis
  try catch question ,get data from main code korenron 7 4,485 Nov-03-2020, 09:28 AM
Last Post: korenron
  Code import .CSV file to MySQL table rtakle 4 3,849 Apr-30-2020, 03:16 PM
Last Post: anbu23
  Error in python code 'import callbot' Lou_Reed 3 40,090 Jan-07-2020, 09:33 PM
Last Post: Clunk_Head
  Why is from code import * different from entering that code directly into the REPL? sebi 5 4,399 Apr-03-2019, 11:40 AM
Last Post: sebi
  code keeps running if i use from threading import timer? birddseedd 3 3,533 Jan-25-2019, 05:00 AM
Last Post: stullis
  ImportError: cannot import name 'Main' => Cannot install module with pip Oby4455 5 20,578 Jan-09-2018, 06:51 PM
Last Post: Gribouillis
  project/main.py import from project/bin/APP_NAME Myersj281 3 4,752 Jul-19-2017, 04:41 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020