jgiorgi | prologic, is there a current method of executing the circuits main loop once? | 01:30 |
---|---|---|
jgiorgi | im working with a simple gui app and i need to iterate gui loop, iterate circuits loop, repeat | 01:31 |
prologic | umm | 01:34 |
prologic | no don't do it that way:) | 01:34 |
prologic | but to answer your question | 01:34 |
prologic | self.root.tick() | 01:34 |
prologic | or <manager_instance>.tick() | 01:34 |
prologic | better to write a generate_events handler | 01:34 |
prologic | that ticks over the gui loop | 01:34 |
prologic | grep the codebase for generate_events | 01:35 |
jgiorgi | hrmm i guess | 01:35 |
prologic | basically think of generate_events as the @ticke replacement | 01:35 |
prologic | well they are | 01:35 |
prologic | we just simplifed the whole thing | 01:35 |
prologic | if you want a new event source | 01:35 |
prologic | write a generate_events handler | 01:35 |
jgiorgi | alright | 01:35 |
prologic | be it gtk, qt, pygame, pyinotify | 01:36 |
prologic | in fact I think the pyinotify component implements a generate_events handler | 01:36 |
prologic | I'm pretty sure | 01:36 |
prologic | btw my desktop is mostly all up and hunki dori | 01:36 |
jgiorgi | awesome! | 01:36 |
jgiorgi | wish i could say the same | 01:36 |
prologic | ahh no sorry | 01:37 |
prologic | circuits.io.notify doesn't do that | 01:37 |
prologic | the pyinotify apis are not async firnedly | 01:37 |
prologic | but in any case | 01:37 |
jgiorgi | yeah they really aren't | 01:37 |
jgiorgi | and that makes me very mad that nobody thought to make it possible to run without a loop when that change is at best 3 lines | 01:38 |
jgiorgi | but meh, that's the first rule of computing | 01:38 |
prologic | ahh | 01:38 |
prologic | there's an example in examples of this | 01:38 |
prologic | examples/circ.py | 01:38 |
prologic | which implements a new event source | 01:38 |
prologic | ncurses events from urwid | 01:39 |
jgiorgi | interesting | 01:39 |
jgiorgi | i debated doing this in ncurses but decided against it | 01:39 |
prologic | also | 01:40 |
prologic | all the pollers use generate_events | 01:40 |
prologic | as well as the Timer | 01:40 |
prologic | and Process | 01:40 |
prologic | also | 01:40 |
prologic | if you do implement a good gui generate_events handler | 01:41 |
prologic | and other useful things | 01:41 |
prologic | be sure to throw them in circuits.contrib | 01:41 |
prologic | might be useful to otehrs :) | 01:41 |
jgiorgi | i'll throw it in contrib :) | 01:41 |
jgiorgi | it'll be very basic, i'm just killing time writing a game, trying to get my head around work again | 01:41 |
prologic | sure | 01:42 |
prologic | nps | 01:42 |
prologic | I'm still working on my desktop | 01:42 |
prologic | and trying to get back into the swing of things | 01:42 |
prologic | i.e: circuits 2.2 | 01:42 |
prologic | need to install python 2.6, 3.2, 3.3, 3.4 and pypy | 01:42 |
*** ircnotifier has joined #circuits | 02:08 | |
ircnotifier | dc98e5fd6f13 by prologic: Added support for sending notifications to multiple channels (comma separated) | 02:26 |
*** ircnotifier has quit IRC | 02:26 | |
*** ircnotifier has joined #circuits | 02:26 | |
jgiorgi | prologic, sorry forgot to mark that as resolved but yeah it works and i have a codebase operating on that primitive quite well | 04:29 |
prologic | awesome | 04:32 |
*** jgiorgi has quit IRC | 05:00 | |
*** jgiorgi has joined #circuits | 05:19 | |
*** jgiorgi has quit IRC | 05:19 | |
*** jgiorgi has joined #circuits | 05:19 | |
*** jgiorgi-home has joined #circuits | 07:45 | |
jgiorgi-home | wtf!? | 09:03 |
*** jgiorgi-home has quit IRC | 09:03 | |
prologic | what? | 09:26 |
*** koobs has quit IRC | 12:09 | |
*** koobs has joined #circuits | 12:09 | |
*** Osso has joined #circuits | 17:49 | |
*** Osso has quit IRC | 17:51 | |
*** Osso has joined #circuits | 17:55 | |
*** jgiorgi has quit IRC | 18:45 | |
*** jgiorgi has joined #circuits | 18:45 | |
*** Osso has quit IRC | 20:23 |
Generated by irclog2html.py 2.11.0 by Marius Gedminas - find it at mg.pov.lt!