We're currently using the command-line interface but that will prove difficult to manage when distributing, so we would ideally understand how the heck to use magic-wormhole API. This might need some nudging on the magic-wormhole IRC channel or somewhere we can find people who can help us do this.
We're currently using the command-line interface but that will prove difficult to manage when distributing, so we would ideally understand how the heck to use magic-wormhole API. This might need some nudging on the magic-wormhole IRC channel or somewhere we can find people who can help us do this.
I nagged again on the #magic-wormhole IRC channel but no response. I suspect the main developer is not present there. I will open a ticket on the repository and ask if they know how to mix the Twisted / Gtk / Trio event loop madness and still use the library. Could be a mess lol...
I nagged again on the `#magic-wormhole` IRC channel but no response. I suspect the main developer is not present there. I will open a ticket on the repository and ask if they know how to mix the Twisted / Gtk / Trio event loop madness and still use the library. Could be a mess lol...
Also, found a simple example from their docs:
> https://magic-wormhole.readthedocs.io/en/latest/api.html
```python
import wormhole
from twisted.internet.defer import inlineCallbacks
@inlineCallbacks
def go():
w = wormhole.create(appid, relay_url, reactor)
w.allocate_code()
code = yield w.get_code()
print "code:", code
w.send_message(b"outbound data")
inbound = yield w.get_message()
yield w.close()
```
Soooo, dunno, maybe easier to just learn how to run twisted stuff on its own and then figure out how to make that work with gtk rather than try to pipe it down all the layers. Will need some investigation.
Trio hackers seem to think this is possible:
> yeah, in theory you could use https://twistedmatrix.com/documents/current/api/twisted.internet.asyncioreactor.html + trio-asyncio to run arbitrary twisted code on trio
Soooo, dunno, maybe easier to just learn how to run twisted stuff on its own and then figure out how to make that work with gtk rather than try to pipe it down all the layers. Will need some investigation.
We're currently using the command-line interface but that will prove difficult to manage when distributing, so we would ideally understand how the heck to use magic-wormhole API. This might need some nudging on the magic-wormhole IRC channel or somewhere we can find people who can help us do this.
I nagged again on the
#magic-wormhole
IRC channel but no response. I suspect the main developer is not present there. I will open a ticket on the repository and ask if they know how to mix the Twisted / Gtk / Trio event loop madness and still use the library. Could be a mess lol...Also, found a simple example from their docs:
Welll, I gave it a shot:
Trio hackers seem to think this is possible:
Soooo, dunno, maybe easier to just learn how to run twisted stuff on its own and then figure out how to make that work with gtk rather than try to pipe it down all the layers. Will need some investigation.