[viff-devel] GUI programming for Python/VIFF
Martin Geisler
mg at daimi.au.dk
Thu Feb 26 03:16:34 PST 2009
Håvard Vegge <havardv at stud.ntnu.no> writes:
> I don't know what you mean with the issue "synchronization of program
> counters", but as far as my simple GUI application goes, it just
> works. At least for now...
Great! Tomas is currently lying at the beach in Barbados[1]..., but when
he get's back I hope he will share his experiences with GUI programs.
[1]: http://fc09.ifca.ai/
> Another question related to GUI; say we have n players which all have
> some secret input. Is it possible to make a progress bar of how many
> inputs that is currently submitted? Or is this information
> unavailable?
When you do
a, b, c = runtime.shamir_share(range(1, n+1), Zp, my_input)
you can attach callbacks to the three shares. If self.pbar is a
gtk.ProgressBar something like this should do the trick:
self.shares = 0
def step(value):
self.shares += 1
self.pbar.set_fraction(self.shares / float(n))
return value
a.addCallback(step)
b.addCallback(step)
c.addCallback(step)
The idea is to make the callback update the progress bar, but otherwise
pass the value through unharmed.
--
Martin Geisler
VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.viff.dk/pipermail/viff-devel-viff.dk/attachments/20090226/e0aab17d/attachment.pgp>
More information about the viff-devel
mailing list