IRC log of #zope for Wednesday, 2010-03-31

*** purserj has quit IRC00:01
*** purserj has joined #zope00:01
*** kevinkal has quit IRC00:03
*** webmaven has joined #zope00:03
*** neo|4D has quit IRC00:04
*** sunew has quit IRC00:04
*** sidnei has quit IRC00:10
*** sunew has joined #zope00:13
*** sunew_ has joined #zope00:14
*** sunew has quit IRC00:14
*** sunew_ has quit IRC00:14
*** sunew has joined #zope00:15
*** sawdog has quit IRC00:18
*** __gotcha has joined #zope00:20
*** aaronv has quit IRC00:23
*** jim_SFU has quit IRC00:25
*** sidnei has joined #zope00:26
*** grahal has quit IRC00:36
*** benji has quit IRC00:50
*** sunew has quit IRC00:59
*** MrTango has quit IRC01:00
*** azazel has joined #zope01:06
azazelhi all01:07
azazelanyone knows anything about NoInteraction exceptions raised during running tests?01:08
*** neo|4D has joined #zope01:11
*** __gotcha has quit IRC01:17
*** drudi has quit IRC01:18
*** fredvd has joined #zope01:19
*** alecm has quit IRC01:23
*** alecm_ has joined #zope01:23
*** alecm_ is now known as alecm01:23
*** r0ver1 has quit IRC01:39
*** aaronv has joined #zope01:44
*** webmaven has quit IRC01:45
*** fredvd has quit IRC01:56
*** pthulin has quit IRC01:58
*** Theuni1 has quit IRC02:00
*** neo|4D has quit IRC02:12
*** mcdonc has quit IRC02:14
TresEquisazazel: buggy tests02:14
TresEquisif that exception is being raised, then somebody failed to set up the thread-local representing the current request and principals02:15
*** TresEquis has left #zope02:15
azazelTresEquis: the reason can be that a view is rendered in a non-functional testcase?02:16
*** tiwula has quit IRC02:51
*** mcdonc has joined #zope03:03
*** tarek has quit IRC03:14
*** SpankyFromBRC has quit IRC03:17
*** ders has joined #zope03:43
*** davisagli has left #zope03:51
*** ders has quit IRC03:56
*** benji has joined #zope03:56
*** ders has joined #zope03:57
*** matthewwilkes_ has joined #zope04:01
*** MatthewWilkes has quit IRC04:02
*** ders has quit IRC04:03
*** ders has joined #zope04:07
*** kevinkalupson has joined #zope04:11
*** alvaro has quit IRC04:12
*** morphex has quit IRC04:17
*** matthewwilkes_ has left #zope04:24
*** purserj has quit IRC04:29
*** aaronv has quit IRC04:29
*** baijum has joined #zope04:41
*** baijum has quit IRC04:41
*** TresEquis has joined #zope04:42
*** purserj has joined #zope04:42
*** TresEquis has quit IRC04:44
*** TresEquis has joined #zope04:47
*** davisagli has joined #zope04:49
*** mr_jolly has quit IRC05:14
*** ders has quit IRC05:17
*** ders has joined #zope05:18
*** kevinkalupson is now known as kevinkal05:24
*** huajie has joined #zope05:25
*** TresEquis has quit IRC05:26
*** ders_ has joined #zope05:37
*** ders has quit IRC05:37
*** ders_ is now known as ders05:37
*** azazel has quit IRC05:45
*** benji has quit IRC06:04
*** ders has quit IRC06:09
*** tiwula has joined #zope06:12
*** davisagli has quit IRC07:12
*** davisagli has joined #zope07:13
*** shreyas has joined #zope07:18
shreyas<tal:content="here/getSampleID">    here I want  the value of getSampleID  passed to a barcode generator python script and resulting  barcode  should come  in place of    getSampleID07:22
shreyashow to call the barcode generator script there  in place of    getSampleID   in   <tal:content=" here/getSampleID">07:25
*** davisagli has quit IRC07:31
*** baijum has joined #zope07:48
*** tiwula has quit IRC07:59
*** lisppaste6 has quit IRC08:01
*** davisagli has joined #zope08:06
*** baijum has quit IRC08:23
*** Theuni1 has joined #zope08:42
*** Theuni2 has joined #zope08:51
*** Theuni1 has quit IRC08:51
*** JaRoel|4D has quit IRC08:55
*** Theuni2 has quit IRC09:04
*** alecm has quit IRC09:18
*** phimic has joined #zope09:21
*** runyaga has quit IRC09:25
*** redir has quit IRC09:28
*** MrWu has joined #zope09:28
*** regebro has joined #zope09:30
*** huajie has quit IRC09:36
*** pthulin has joined #zope09:38
*** Kabz|4D has joined #zope09:38
*** opsec has quit IRC09:45
*** baijum has joined #zope09:50
*** pthulin has quit IRC09:54
*** agroszer has joined #zope09:57
*** JaRoel|4D has joined #zope09:57
*** zagy has joined #zope09:59
*** opsec has joined #zope09:59
*** eperez has quit IRC10:03
planetzopebotFrameworks in Uganda (Mock It!)  http://mockit.blogspot.com/2010/03/frameworks-in-uganda.html10:04
*** runyaga has joined #zope10:10
*** cbcunc has quit IRC10:16
*** allisterb has quit IRC10:20
*** agroszer has quit IRC10:21
*** neo|4D has joined #zope10:26
*** agroszer has joined #zope10:27
*** MrWu has quit IRC10:32
*** planetzopebot has quit IRC10:33
*** planetzopebot has joined #zope10:34
*** JaRoel|4D has quit IRC10:37
*** JaRoel|4D has joined #zope10:39
*** tarek has joined #zope10:43
*** __gotcha has joined #zope10:51
*** eperez has joined #zope10:53
*** axelix has quit IRC10:56
*** fredvd has joined #zope10:59
*** hever has joined #zope11:02
*** shreyas has quit IRC11:06
*** hever has quit IRC11:36
*** davisagli has quit IRC11:41
*** MrTango has joined #zope11:48
*** mr_jolly has joined #zope12:00
*** mr_jolly has left #zope12:03
*** huajie has joined #zope12:13
*** hever has joined #zope12:19
*** shreyas has joined #zope12:25
*** teix has joined #zope12:32
*** evilbungle has joined #zope12:33
*** TomBlockley has joined #zope12:36
*** shreyas has quit IRC12:45
*** thetet has joined #zope12:46
*** huajie has quit IRC12:54
*** shreyas has joined #zope12:55
*** eperez has quit IRC12:59
*** skt_ has joined #zope13:01
*** touff has quit IRC13:02
*** maiky has joined #zope13:28
*** tarek has quit IRC13:47
*** tarek has joined #zope13:48
*** r0ver has joined #zope13:54
*** shreyas has quit IRC13:56
*** ders has joined #zope14:04
*** aaronv has joined #zope14:08
*** benji has joined #zope14:11
*** r0ver has quit IRC14:17
*** fredvd is now known as fredvd|lunch14:20
*** benji has quit IRC14:25
*** eperez has joined #zope14:26
*** ders_ has joined #zope14:32
*** ders has quit IRC14:32
*** ders_ is now known as ders14:32
*** ders_ has joined #zope14:46
*** ders has quit IRC14:50
*** ders_ is now known as ders14:50
*** sunew has joined #zope14:52
*** dayne1 has joined #zope15:09
*** fredvd|lunch is now known as fredvd15:13
betabughow do I return image data from a python script?15:13
betabugtrying to do a quick prototype here, but if I return context[imagename] I get the html link15:14
*** baijum has quit IRC15:15
*** kevinkal has quit IRC15:18
*** benji has joined #zope15:19
*** kleist has joined #zope15:19
*** sunew has quit IRC15:22
*** huajie has joined #zope15:33
*** dunny has quit IRC15:36
betabugapparently .index_html(request, response) does the trick, no idea if it's the correct way, but it's enough for my prototype15:41
*** kevinkalupson has joined #zope15:46
*** baijum has joined #zope15:56
*** JaRoel|4D has quit IRC15:56
*** JaRoel|4D has joined #zope15:58
*** dayne1 has quit IRC15:59
*** baijum has quit IRC16:00
*** kevinkalupson is now known as kevinkal16:03
*** skt_ has quit IRC16:10
*** JT has quit IRC16:12
*** thetet has quit IRC16:16
*** grahal has joined #zope16:26
grahalwhat does "[test]" mean next to a egg in a buildout?16:26
grahaleggs = <whatever> [test]16:27
*** ders has left #zope16:31
*** drudi has joined #zope16:37
*** RichardBarrell has quit IRC16:42
*** drudi has quit IRC16:44
*** ders has joined #zope16:44
*** ders has left #zope16:46
*** tisto has joined #zope16:50
*** evilbungle_ has joined #zope16:54
*** evilbungle has quit IRC16:57
TheJesterbetabug or str(imageobj) also should work16:58
TheJesterthat handles the chunked reading stuff16:59
TheJesteretc16:59
*** jwhisnant has joined #zope17:01
*** drudi has joined #zope17:02
*** TomBlockley_ has joined #zope17:10
*** TomBlockley has quit IRC17:12
*** TomBlockley_ is now known as TomBlockley17:12
*** sunew has joined #zope17:13
*** sunew has quit IRC17:25
*** agroszer has quit IRC17:26
*** ders has joined #zope17:29
*** evilbungle_ has quit IRC17:30
*** evilbungle has joined #zope17:30
*** redir has joined #zope17:34
*** fredvd is now known as fred|sport17:36
*** alvaro has joined #zope17:36
*** Arfrever has quit IRC17:37
*** redir has quit IRC17:41
*** TomBlockley has quit IRC17:44
*** TomBlockley has joined #zope17:45
*** morphex has joined #zope17:46
*** redir has joined #zope17:47
*** jim_SFU has joined #zope17:48
*** huajie has quit IRC17:49
*** cbcunc has joined #zope17:51
*** daMaestro has joined #zope17:57
planetzopebotSilva 2.2 Released (Zope.org)  http://www.zope.org/Members/infrae/news/Silva_2.2_Released18:04
*** TomBlockley has quit IRC18:05
*** TomBlockley has joined #zope18:06
*** mgedmin has joined #zope18:07
*** Arfrever has joined #zope18:18
*** ders has quit IRC18:23
*** alecm has joined #zope18:33
*** axelix has joined #zope18:33
*** allisterb has joined #zope18:51
*** cbcunc has quit IRC18:59
smg'day all19:08
mgedmino/19:10
alecmMorning sm!19:10
smalecm! hey mgedmin19:12
*** JaRoel|4D has quit IRC19:13
*** neo|4D has quit IRC19:18
*** mcdonc has quit IRC19:19
*** Kabz|4D has quit IRC19:22
*** kleist has quit IRC19:27
*** tarek has quit IRC19:41
*** tiwula has joined #zope19:42
*** tarek has joined #zope19:42
*** davisagli has joined #zope19:49
*** tarek has quit IRC19:56
*** tarek has joined #zope19:57
*** mcdonc has joined #zope20:02
*** __gotcha has quit IRC20:03
*** r0ver has joined #zope20:09
*** alecm has quit IRC20:10
*** axelix has quit IRC20:26
*** evilbungle has quit IRC20:37
*** pthulin has joined #zope20:40
*** TomBlockley has quit IRC20:42
*** TomBlockley has joined #zope20:42
*** TomBlockley has quit IRC20:43
*** digilord has joined #zope20:45
digilordHello.  I have a class that takes data from ZODB when a user presses a button and generates a set of XML files on disk.  Will the Zope security model allow this?  If not how would I accomplish it?20:47
digilordThis is for Zope320:47
mgedminZope 3 has no TTW-code and no extra restrictions20:48
mgedminit's just Python, feel free to write to files on disk as you please20:48
shenlongwhoa20:48
digilordGreat thanks!20:48
*** rogererens has joined #zope20:49
*** rogererens has left #zope20:51
*** mcdonc has quit IRC20:58
*** alvaro has quit IRC20:59
*** alvaro has joined #zope20:59
*** mcdonc has joined #zope21:01
*** sidnei has quit IRC21:01
*** allisterb has quit IRC21:09
*** allisterb has joined #zope21:22
*** evilbungle has joined #zope21:23
*** allisterb has quit IRC21:26
*** allisterb has joined #zope21:31
*** webmaven has joined #zope21:33
*** __gotcha has joined #zope21:33
*** hever has quit IRC21:35
*** TresEquis has joined #zope21:35
*** hever has joined #zope21:40
*** hever has quit IRC21:40
*** BGaddie has joined #zope21:51
*** TresEquis has quit IRC21:55
*** webmaven has quit IRC21:56
*** prinzdezibel has joined #zope21:56
prinzdezibelHi there. How can I grab the zodb root element when breaking into debug mode with set_trace() ?21:57
mgedminprinzdezibel, depends21:59
mgedminwhere did you put your breakpoint21:59
mgedmindo you have some sort of a persistent object easily accessible from pdb?21:59
prinzdezibelafter registering21:59
mgedminif so, say, self.context._p_jar.root() ought to give you the root object22:00
prinzdezibelmgedmin: yup--22:00
* mgedmin doesn't know what "registering" means22:00
prinzdezibelworks.22:00
prinzdezibelmgedmin: second22:01
prinzdezibelsomehting like that: getUtility(IIntIds).register(genericSet.setobject_actuator)22:01
prinzdezibelmgedmin: Another thing: I have an object. Can I somehow retrieve the absolute path22:01
prinzdezibelin zodb object-graph?22:02
mgedmindepends22:02
mgedminif it has a valid chain of __parent__/__name__ attributes, then yes22:02
mgedminotherwise, no22:02
mgedminzodb doesn't store reverse references22:02
mgedmincomputing them would require a complete object graph traversal22:03
TheJesterself.getPhysicalPath() should work regardless22:03
mgedminwhich is possible, but slow22:03
prinzdezibelok. This means I need to walk up the chain with __parent__ atttribute22:03
prinzdezibeluntil I reach the root ?22:03
prinzdezibelTheJester: I have read about getPhysicalPath()22:03
prinzdezibelBut I have no such method on my object22:04
mgedminzope 3 has zope.traversing.api.getPath22:04
mgedminzope 2 has something else22:04
mgedminacquisition proxies and stuff22:04
prinzdezibelI'm zope 322:04
mgedminprinzdezibel, incidentally, what are you trying to achieve?22:04
mgedmina tool like zodbbrowser could be useful if you want to look around and inspect the zodb contents22:05
prinzdezibelI want to have a mapper wich maps object ids (strings) to actual objects.22:05
TheJesterSo your object is not based on SimpleItem or Application or Traversable (in Zope 2)22:05
prinzdezibelI'm fairly new, TheJester , but I supose no.22:06
mgedminwhat are object ids?  oids?22:06
mgedmin__name__s?22:06
TheJesterI suspect there is much wheel reinventing going on22:07
prinzdezibelunique names the  user gives them22:07
mgedminany_persistent_object._p_jar.get(oid) -> persistent_object_with_that_oid22:07
mgedminuser-given names are probably used for __name__22:07
prinzdezibelmgedmin: Ok, that sound's to me that I could do it a better way.22:09
prinzdezibelLet me try to explain.22:09
prinzdezibelThe user creates new persistent objects and give them a name22:10
prinzdezibelthis name is reflected in the url, right?22:10
*** daMaestro has quit IRC22:10
mgedminright22:10
mgedminat least that's the usual way of doing things22:10
prinzdezibelso now I want him to refer in one object to another.22:10
mgedminokay22:11
prinzdezibelSo one option would be:22:11
prinzdezibelLet him hill in the url path to the other object by hand.22:11
prinzdezibelOR22:11
prinzdezibelLet him deal with a self-chosen identifier22:11
prinzdezibelwhich way to go?22:12
mgedminwhat's the use-case here, exactly?22:12
TheJesterneither22:12
TheJesterdisplay a list of suitable objects in a drop-down and let them chooose the "right thing" d8)22:12
prinzdezibelOne object has a relation to another one.22:12
prinzdezibelBut this relation (aggregation, compositioin)22:13
prinzdezibelis not defined at built-time22:13
prinzdezibelbut at runtime through the user22:13
mgedminhow is this relationship constrained?22:13
TheJesterDoes it matter?22:13
TheJesterdd8)22:13
mgedminmaybe22:14
TheJesterevery piece of contnt pretty much has that relationship to "something else"22:14
mgedminif it's "objects in the same container", then storing __name__ might be sufficient22:14
TheJesterPrice, category, year of issue, something esoteric22:14
mgedminif it's "arbitrary objects of arbitrary type in the same DB", then no22:14
*** sidnei has joined #zope22:14
TheJesterStill doesn't matter, it's just a reference to something22:14
TheJesterProvided by the user22:15
prinzdezibelYes, I could put that reference at runtime to the python object, right.22:15
mgedminthree basic ways of storing references: direct object reference (I strongly advise against it), using zope.intids or zope.keyreference, or storing object name/path22:15
*** TresEquis has joined #zope22:16
mgedminintids is probably the best choice22:16
TheJesterzodb handles references just fine22:16
prinzdezibelmgedmin: Why are you against direct references?22:16
mgedminexcept then the user deletes that object but your reference prevents GC and you end up with SystemErrors in weird places because your object has a __parent__ of None22:17
prinzdezibel(not the way I intend to do it anyway, but I'm curious.)22:17
TheJesterweakref() ftw22:17
mgedminand ZMI copy + paste ends up not cloning that object since it's locatable but has no __parent__ set, so you end up with two objects referring to the same deleted object22:17
TheJesterd8)22:17
TheJesterWhat ZMI ?22:18
TheJesterd8)22:18
mgedminintids/keyreferences give you the equivalent of weakrefs22:18
TheJesterweakrefs are for people who don't want to implement proper data integrity d8)22:18
*** Hypergraphe has joined #zope22:18
mgedminZODB is for people who enjoy reimplementing database engines ...22:18
*** eperez has quit IRC22:18
*** daMaestro has joined #zope22:19
*** tisto has quit IRC22:19
*** teix has left #zope22:20
prinzdezibelmgedmin: my first idea was to go with storing object name/path22:22
prinzdezibelbut maybe zope.initids is more suitable..22:22
*** evilbungle has quit IRC22:23
prinzdezibelso the direct reference thing is debatable, eh?22:23
*** webmaven has joined #zope22:23
mgedminit causes pain, in my experience22:23
prinzdezibelOk, assume I go the intid way22:24
*** alecm has joined #zope22:24
prinzdezibelI want to present the user of all available objects that are suitable for referencing.22:25
prinzdezibeland want him to select via dropdown list22:25
prinzdezibelHow can I collect all objects that I know are suitable (they are instances of a certain class)22:25
mgedmincheck out zope.catalog22:25
prinzdezibelthank you!22:26
mgedminthe grok book has a nice chapter on using catalogs and indexes22:26
prinzdezibelby coincidence it lays beside me :)22:27
mgedminalthough of course it uses the grok sugar for registering and setting them up22:27
mgedminbut it has a nice explanation about what the heck is a catalog and how is it different from an index and how do you define what objects are indexed and how you find them later22:27
*** r0ver has quit IRC22:30
*** tisto has joined #zope22:32
*** r0ver has joined #zope22:35
prinzdezibelmgedmin: Are you talking about the grok book form carlos de la guardia. and if so, which chapter do you mean?22:38
mgedminyes and the one that talks about searching22:39
mgedminchapter 622:40
prinzdezibelthe catalog.22:40
prinzdezibelthx22:40
*** Kabz|4D has joined #zope22:42
*** supton has joined #zope22:49
prinzdezibelTheJester: Btw, is  getPhysicalPath something plone specific ?22:54
TheJesterNo, it's in Zope2 objects22:55
prinzdezibelbut not   in zope3 ?!22:55
TheJesterNearly all Zope objects come from SimpleItem which has it defined22:55
TheJester(Zope2 objects)22:55
prinzdezibelok22:55
TheJesterBut as I say also Traversable22:56
TheJesterSo that covers about 99% of Zope2 things d8)22:56
*** runyaga_ has joined #zope22:57
TresEquisprinzdezibel: not in Zope3, you are correct23:00
prinzdezibelthx23:00
TresEquisyou need to adapt to some interface defined in zope.traversal, I think23:00
*** runyaga has quit IRC23:00
TresEquissorry, zope.traversing23:00
*** kevinkal has quit IRC23:01
TresEquissomething like:23:01
TresEquisgetAdapter(context, zope.traversing.interfaces.ITraversalAPI).getPath()23:01
moo---TresEquis: do you know whether Five provides zope.traversing support?23:02
mgedminTresEquis, zope.traversing.api.getPath(context)23:02
mgedminor IPhysicallyLocatable(context).getPath()23:03
TresEquisah23:03
TresEquisILocationInfo?23:03
mgedminwhat you wrote also ought to work, except it's longer for no particularly good reason23:03
TresEquisno, I misread the docs23:03
TresEquisthe ITraversableAPI interface is not for adapters23:03
TresEquisit just (redundantly) declares the API of the api module23:04
mgedminyeah, interfaces for modules are/were a very Zope-3-ish thing23:04
TresEquisI don't think the module is even registered as a utility23:04
mgedminno23:04
mgedminand yes, you're right, I was wrong when I said you were right23:05
TresEquiswhich makes the whole exercise completely pointless23:05
TresEquisI guess there could be code somewhere which does a 'queryUtility(ITraversalAPI, zope.traversing.api)'23:05
TresEquisto allow for testing, or something23:06
mgedminyou mean to allow for stubbing in tests?23:06
mgedminsimpler to do that by providing a different IPhysicallyLocatable adapter and using the real api23:06
mgedmineven more simple by setting the __parent__ attributes the way you want23:06
mgedminafaiu module interfaces were solely for documentation purposes23:06
mgedminthey didn't really catch on23:07
TresEquisright, especially since the module API functions have slightly *different* docstrings (drift)23:08
*** cbcunc has joined #zope23:10
TresEquisHowdy, Chris23:10
TresEquisHowdy, Chris (cbcunc)23:12
cbcuncTresEquis!23:12
*** Kabz|4D has quit IRC23:12
*** Kabz|4D has joined #zope23:13
r0verhello, are there a simple component which implements tags in zope2 ? (these tags used in stuff like tagclouds and so on...)23:13
*** prinzdezibel has quit IRC23:14
*** River_Rat has quit IRC23:21
*** tisto has quit IRC23:23
TresEquisr0ver: http://svn.zope.org/lovely.tag/23:24
TresEquisis a Z3 thing23:25
r0verdoes it work on zope2.12 ?23:25
TresEquisyou might be able to make it work23:26
r0ver:)23:26
r0verthks!23:26
TresEquisPlone has a couple of tagcloud related add-ons23:27
r0veri've been watching gtag by martin aspeli, but i'm not sure if they use plone machinery. I'm just using plain zope2.1223:27
TresEquisIt might be easiest to start from scratch using a KeywordIndex23:28
TresEquisthe bits which make the tag text size bigger or smaller are the only parts which aren't straightforward ;)23:29
TresEquisthe rest is all UI :)23:29
r0verwell... if i'm lucky enough someone else already solved that :)23:29
*** grahal has quit IRC23:32
*** JaRoel|4D has joined #zope23:36
*** jwhisnant has quit IRC23:49

Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!