def main(): # Ensure gamestate integration cfg is in csgo's cfg directory csgo_dir = get_csgo_path(os.path.join(get_steam_path(), "steamapps")) if csgo_dir is not None: copyfile( "gamestate_integration_ccs.cfg", os.path.join(csgo_dir, "csgo", "cfg", "gamestate_integration_ccs.cfg"), ) oalInit() loop = asyncio.get_event_loop() app = WxAsyncApp() gui.MainFrame( None, title="CSGO Custom Sounds", size=wx.Size(320, 230), style=wx.DEFAULT_FRAME_STYLE & ~(wx.RESIZE_BORDER | wx.MAXIMIZE_BOX), ) loop.run_until_complete(app.MainLoop()) # Freeing OpenAL buffers might fail if they are still in use # We don't really care since the OS will clean up anyway. try: oalQuit() except: # noqa pass
def main(): """ My function """ # add your code here ldap_client = tk.Tk() ldap_client.geometry("800x400") ldap_client.title("LDAP Client") gui.MainFrame(ldap_client) ldap_client.mainloop()
def main(): # Ensure gamestate integration cfg is in csgo's cfg directory # TODO linux csgo_dir = get_csgo_path(get_steam_path() + "\\steamapps") if csgo_dir is not None: copyfile("gamestate_integration_ccs.cfg", csgo_dir + "\\csgo\\cfg\\gamestate_integration_ccs.cfg") app = wx.App() gui.MainFrame(None, title="CSGO Custom Sounds", size=wx.Size(320, 420), style=wx.DEFAULT_FRAME_STYLE & ~(wx.RESIZE_BORDER | wx.MAXIMIZE_BOX)) app.MainLoop()
import wx import gui import imgproc import os if __name__ == '__main__': app = wx.App() image_processor = imgproc.ImageProcessor() frame = gui.MainFrame(image_processor) app.MainLoop() if os.path.exists(os.path.join(os.getcwd(), "_tmp.mp4")): os.remove(os.path.join(os.getcwd(), "_tmp.mp4"))
def handle_program_name(self, message): unpacked = unpack(message.data[9:]) name = "".join([chr(c) for c in unpacked if c > 0]) speak(name) print(name) def handle_program_change(self, message): stop() s = "bank " + ( "ABCDEFGH"[self.bank]) + " program " + str(message.program + 1) speak(s) self.request_name(self.bank, message.program) def request_name(self, bank, program): msg = mido.Message( type="sysex", data=[0x0, 0x20, 0x32, 0x20, 0x0, 0x0c, bank, program]) self.outport.send(msg) # main app = WxAsyncApp() frame = gui.MainFrame(None, wx.ID_ANY, "") frame.Show() app.SetTopWindow(frame) logger = Logger(frame.log_text) synth = DeepMind(logger, frame) loop = asyncio.events.get_event_loop() loop.run_until_complete(app.MainLoop())
def setId(self, id): self.frame = gui.MainFrame(self, gameName) self.thingStore = thing.ThingStore(self.frame, self.server) t = self.thingStore.get(id) self.frame.setSelf(t) self.server.setName(self.adminName)