Skip to content

Instantly share code, notes, and snippets.

@fabiocerqueira
Created January 5, 2017 00:40
Show Gist options
  • Select an option

  • Save fabiocerqueira/828d0252c77705d730d98c349ffc4ba0 to your computer and use it in GitHub Desktop.

Select an option

Save fabiocerqueira/828d0252c77705d730d98c349ffc4ba0 to your computer and use it in GitHub Desktop.
import sys
import asyncio
from PyQt5.QtWidgets import QApplication
from quamash import QEventLoop
app = QApplication(sys.argv)
loop = QEventLoop(app)
asyncio.set_event_loop(loop)
async def main():
print(loop is asyncio.get_event_loop())
if __name__ == '__main__':
try:
loop.run_until_complete(main())
finally:
loop.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment