[01:33:41] ** bitmonk has left IRC () [05:17:24] [connected at Mon Jan 14 05:17:24 2008] [05:17:24] <> *** Looking up your hostname... [05:17:24] <> *** Checking ident [05:17:24] <> *** No identd (auth) response [05:17:24] <> *** Found your hostname [05:17:24] <> *** Your host is clarke.freenode.net[clarke.freenode.net/6667], running version hyperion-1.0.2b [05:17:26] [I have joined #peak] [05:17:26] ** clarke.freenode.net set the topic to does anyone remember the real topic ? - not really ... [06:03:20] ** apoirier has joined us [08:21:58] zookosleep is now known as zooko [09:05:03] It seems that peak.rules can't be used 'programmatically' [09:05:09] def pprint_list(ob): [09:05:20] print "pretty-printing a list" [09:05:29] pprint_list = when(pprint, (list,)) [09:05:36] is not working [09:09:28] How can I create a decorator that do `when()` like. With what API ? [11:14:08] ** bitmonk has joined us [12:29:29] ** pje has joined us [12:42:01] ** bitmonk has left IRC () [12:58:00] ** ionel_mc has joined us [13:09:04] hi pje [13:09:53] did you see my question about how to use `peak.rules.when()` in my own decorator, not as a direct decorator of my function ? [13:19:12] no, that was before I was online. [13:19:27] do this: when(gf, pred)(method) [13:20:33] note that if you do that in another function, and pred is a string, its locals/globals will come from the enclosing function, not the original caller. [13:20:53] I will probably make it easier later to ask an engine to parse something for you, so you can work around that. [13:21:12] There is a 'parse_rule()' function but it's a bit... unwieldy at the moment. [13:27:11] pje: any other solutions besides don't mix eggs with wininst ? [13:27:18] pje:yes, exactly where I'am currently : the frame analysed is not correct and I don't manage to use `parse_rule()` directlty [13:28:29] pje:with `dispatch`, this works fine : [13:28:43] cond = render.parseRule(cond, sys._getframe(1)) [13:28:44] render.addMethod(cond, f) [13:29:23] I'd suggest doing this: line 182 of peak.rules.core [13:29:31] add 'depth' and 'frame' options [13:29:39] defaulting to 2 and none [13:29:55] then on line 201, add 'depth, frame' to the arguments [13:30:20] I'll add those to the real thing later, once I've written a test. [13:30:54] That way, all the decorators (including custom ones) will have the option of taking a frame or depth to set things up. [13:31:22] ionel_mc, no, I do not know of any way to safely mix types of installers. [13:31:42] that's pretty much true of any packaging system(s) managing the same files [13:31:48] pje, has anyoen had problems with this before? [13:31:52] *anyone [13:31:59] with what? mixing installers? [13:45:42] apoirier, did that fix your problem? [13:46:30] I'am testing [13:51:40] `depth` is not used if `frame' is set, isn't it ? [13:54:05] pje, yes [14:18:56] correct [14:19:06] (apoirier) [14:22:18] ** zooko has left us [14:24:06] I now have the correct results in my tests [14:24:09] :) [14:24:29] but not yet when in my framework [14:34:05] I have to go. I will report to you my results [14:34:13] Thanks [14:34:39] ** apoirier has left IRC ("KVIrc 3.2.6 Anomalies http://www.kvirc.net/") [15:15:07] ** tav_ has joined us [15:16:38] ** tav has left IRC (Nick collision from services.) [15:16:40] tav_ is now known as tav [16:01:42] pje is now known as pje_mtg [16:03:40] pje_mtg is now known as pje [17:28:55] ** bitmonk has joined us [17:33:05] ** bitmonk has left IRC (Client Quit) [21:02:34] ** pje has left IRC ("Client exiting") [22:19:17] ** zooko has joined us [22:19:20] ** zooko has left us [23:06:48] ** thinkeryzu has left IRC (Remote closed the connection)