mirror of
https://github.com/mumble-voip/mumble.git
synced 2025-10-26 11:19:16 +00:00
Example of on-the-fly slice-fetch for Python
This commit is contained in:
parent
7ba42b7902
commit
a2b4f850fc
20
scripts/testdynamic.py
Executable file
20
scripts/testdynamic.py
Executable file
@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8
|
||||
import Ice, IcePy, sys, tempfile
|
||||
|
||||
ice = Ice.initialize(sys.argv)
|
||||
|
||||
proxy = ice.stringToProxy('Meta:tcp -h 127.0.0.1 -p 6502')
|
||||
slice = IcePy.Operation('getSlice', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (), (), IcePy._t_string, ()).invoke(proxy, ((), None))
|
||||
|
||||
slicefile = tempfile.NamedTemporaryFile(suffix = '.ice')
|
||||
slicefile.write(slice)
|
||||
slicefile.flush()
|
||||
Ice.loadSlice(slicefile.name)
|
||||
slicefile.close()
|
||||
|
||||
import Murmur
|
||||
|
||||
meta = Murmur.MetaPrx.checkedCast(proxy)
|
||||
|
||||
print meta.getVersion()
|
||||
Loading…
Reference in New Issue
Block a user