Selaa lähdekoodia

Update to latest python meme version

Stopped working NPM style. Hopeful about Python's future.
Clément Wolf 1 vuosi sitten
vanhempi
commit
bfa5a854ab
3 muutettua tiedostoa jossa 5 lisäystä ja 5 poistoa
  1. 1 1
      gui.py
  2. 3 3
      main.py
  3. 1 1
      setup.py

+ 1 - 1
gui.py

@@ -117,7 +117,7 @@ class MainFrame(wx.Frame):
 
     async def UpdateSounds(self, event):
         self.updateSoundsBtn.Disable()
-        StartCoroutine(self.client.reload_sounds, self)
+        await self.client.reload_sounds()
 
     async def OnMinimize(self, event):
         if self.IsIconized():

+ 3 - 3
main.py

@@ -64,7 +64,7 @@ def get_csgo_path(steamapps_folder):
     print("CS:GO not found :/")
 
 
-def main():
+async 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:
@@ -82,7 +82,7 @@ def main():
         size=wx.Size(320, 230),
         style=wx.DEFAULT_FRAME_STYLE & ~(wx.RESIZE_BORDER | wx.MAXIMIZE_BOX),
     )
-    loop.run_until_complete(app.MainLoop())
+    await 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.
@@ -93,4 +93,4 @@ def main():
 
 
 if __name__ == "__main__":
-    main()
+    asyncio.run(main())

+ 1 - 1
setup.py

@@ -16,7 +16,7 @@ setup(
     package_data={},
     install_requires=[
         "aiofiles==0.*,>=0.4.0",
-        "pyogg==0.6.11a1",
+        "pyogg==0.6.14a1",
         "pyopenal==0.7.11a1",
         "wxasync==0.*,>=0.41.0",
     ],