from iconizer.console.launcher import CrossGuiLauncher
from iconizer.qtconsole.PyQtGuiFactory import PyQtGuiFactory


class Iconizer(object):
    def __init__(self):
        self.server = CrossGuiLauncher(PyQtGuiFactory())
        self.server.start()
        self.server.start_cross_gui_launcher_no_return()

    def execute(self, app_descriptor_dict):
        #Send request to start a new app
        self.server.launch(app_descriptor_dict)


def main():
    Iconizer()

if __name__ == '__main__':
    main()
from iconizer.console.launcher import CrossGuiLauncher
from iconizer.qtconsole.PyQtGuiFactory import PyQtGuiFactory


class Iconizer(object):
    def start_gui(self):
        self.server = CrossGuiLauncher(PyQtGuiFactory())
        self.server.start()
        self.server.start_cross_gui_launcher_no_return()

    def execute(self, app_descriptor_dict):
        #Send request to start a new app
        self.server.launch(app_descriptor_dict)


def main():
    Iconizer().start_gui()

if __name__ == '__main__':
    main()
Move GUI creation out of __init__ function.
Move GUI creation out of __init__ function.

  from iconizer.console.launcher import CrossGuiLauncher
  from iconizer.qtconsole.PyQtGuiFactory import PyQtGuiFactory
  
  
  class Iconizer(object):
-     def __init__(self):
+     def start_gui(self):
          self.server = CrossGuiLauncher(PyQtGuiFactory())
          self.server.start()
          self.server.start_cross_gui_launcher_no_return()
  
      def execute(self, app_descriptor_dict):
          #Send request to start a new app
          self.server.launch(app_descriptor_dict)
  
  
  def main():
-     Iconizer()
+     Iconizer().start_gui()
  
  if __name__ == '__main__':
      main()
Move GUI creation out of __init__ function.
## Code Before:
from iconizer.console.launcher import CrossGuiLauncher
from iconizer.qtconsole.PyQtGuiFactory import PyQtGuiFactory


class Iconizer(object):
    def __init__(self):
        self.server = CrossGuiLauncher(PyQtGuiFactory())
        self.server.start()
        self.server.start_cross_gui_launcher_no_return()

    def execute(self, app_descriptor_dict):
        #Send request to start a new app
        self.server.launch(app_descriptor_dict)


def main():
    Iconizer()

if __name__ == '__main__':
    main()
## Instruction:
Move GUI creation out of __init__ function.
## Code After:
from iconizer.console.launcher import CrossGuiLauncher
from iconizer.qtconsole.PyQtGuiFactory import PyQtGuiFactory


class Iconizer(object):
    def start_gui(self):
        self.server = CrossGuiLauncher(PyQtGuiFactory())
        self.server.start()
        self.server.start_cross_gui_launcher_no_return()

    def execute(self, app_descriptor_dict):
        #Send request to start a new app
        self.server.launch(app_descriptor_dict)


def main():
    Iconizer().start_gui()

if __name__ == '__main__':
    main()