IRC log of #zope3-dev for Saturday, 2005-05-07

*** hazmat has joined #zope3-dev00:03
*** niemeyer has quit IRC00:08
*** hazmat_ has joined #zope3-dev00:17
*** hazmat has quit IRC00:25
*** SureshZ has quit IRC00:52
*** srichter has quit IRC01:39
*** J1m has quit IRC01:52
*** srichter has joined #zope3-dev01:57
*** ChanServ sets mode: +o srichter01:58
*** GaryPoster has quit IRC02:15
*** GaryPoster has joined #zope3-dev02:22
*** projekt01 has left #zope3-dev02:35
*** GaryPoster has quit IRC02:40
*** SteveA has quit IRC02:52
*** viyyer has quit IRC03:14
*** viyyer has joined #zope3-dev04:09
*** hazmat_ has quit IRC04:21
*** hazmat has joined #zope3-dev05:25
*** hazmat has quit IRC05:37
*** RaFromBRC has quit IRC06:33
*** hazmat has joined #zope3-dev06:38
*** RaFromBRC has joined #zope3-dev06:48
*** RaFromBRC has quit IRC06:50
*** viyyer has quit IRC07:10
*** hazmat has quit IRC08:24
*** hazmat has joined #zope3-dev08:26
*** SteveA has joined #zope3-dev08:43
*** viyyer has joined #zope3-dev08:49
*** bskahan has joined #zope3-dev09:00
*** viyyer has quit IRC09:38
*** bskahan has quit IRC10:04
*** viyyer has joined #zope3-dev10:04
*** juka has joined #zope3-dev10:42
*** juka has quit IRC10:47
*** hazmat has quit IRC11:23
*** viyyer has left #zope3-dev11:27
*** J1m_ has joined #zope3-dev13:46
*** dipesh has joined #zope3-dev14:04
dipeshhi devels14:04
dipeshmay I am allowed to ask how to use print "test" in a with RestrictedPython compiled python scriptcode? ... I always get the exception "name '_print_' is not defined" ... sounds logical that RestrictedPython tries to wrap print into _print_ ... so, do I need to spend my own implementation or is there a way to use the restricted print? Already a lot of thanks to any hint that could point me to the right direction. thanks :)14:21
*** mohsen has quit IRC14:27
VladDracperhaps you need to install a _print_ handler somehow?14:28
VladDracI know that in Zope2 restricted python, print actually prints to the string 'printed'14:28
dipeshVladDrac: ah, sounds logical. I am bit ashmed to say that I know a lot about python c api, but nbot python itself :-/ ... did you have some "keyword" or a filename where handles are used that way inside zope so I could search for it and get deeper into handle-stuff :)14:29
dipeshah, string "printed" ... ok, should be enough to get more infos out of the code. thanks :)14:31
VladDracin lib/python/RestrictedPython/RestrictedMutator in Zope 2.7.4 there is14:31
VladDrac_printed_expr = stmtNode("_print()").expr14:32
VladDrac_print_target_node = stmtNode("_print = _print_()")14:32
VladDracand a visitPrint14:32
VladDracwell, stuff is happening there :)14:32
VladDracit seems to override some of the parsing14:33
dipeshyes, at ;14:33
dipeshdef simple_print_before():14:33
dipesh    print "foo"14:33
dipeshdef simple_print_after():14:33
dipesh    _print = _print_()14:33
dipesh    print >> _print, "foo"14:33
dipeshI tried something like simple_print_before but it throws with those "_print_ not defined" ... RestrictedPython and PrintCollector and all other modules imports are successfully imported.14:35
dipeshI use compile_restricted() and then just PyEval_EvalCode() the PyCodeObject* compile_restricted() returns... works nice with e.g. "a = 2 + 3" or other "not restricted" code, but fails on e.g. _print_ ... saying that. registering handle means to add a Function as item "_print_" to the dictonary?14:38
dipeshbefore evaluating the compiled pycode object?14:39
dipeshok, enough idears to try it. thanks a lot VladDrac :)14:42
dipeshs/it/them out/;14:42
J1m_dipesh, are you talking about Zope 2 or Zope 3?14:46
dipeshJ1m_: Zope3 cause we're in zope3-dev ... but imho RestrictedPython doesn't differ that much on Zope2 and Zope3.14:47
J1m_Your opinion is off.14:47
J1m_1. RestrictedPython has a *much* smaller role in Z3.14:48
J1m_2. I doubt we will ever have use for "print" in the Z3 usage of restricted Python.14:48
J1m_In Z3, most protection is provided by security proxies.14:48
dipeshJ1m_: I am writting a c++ wrapper around RestrictedPython to use the great security for python scripts Zope3 spends in the embedded python system we use at koffice/kexi.14:48
J1m_Also, in the Z3 releases, we aren't using any restricted code exept in page templates and dtml.14:49
dipeshsecurity proxies. oh, ok. sounds like another part of Zope3 I've to look at.14:49
J1m_What is your goal?14:49
J1m_You should absolutely look at zope security.14:50
dipesha restricted environment to spend some kind of sandbox security for python scripts... at koffice/kexi those python code could be stored remotly and therefore the code is untrusted...14:51
J1m_If you want an "untrusted python" system, you should look at zope,security and you should read the document on untrusted interpreters.14:51
dipeshvery lot of thanks, J1m_!!! will do so right now :)14:51
*** tarek has quit IRC14:54
*** efge has joined #zope3-dev14:57
SteveAdipesh: if you're coming to europython, i'll be giving a talk on the system14:57
* SteveA --> foodshop14:58
dipeshSteveA: or #europython ?15:00
dipeshor the conference?15:01
*** efge has quit IRC15:01
SteveAi mean, at the conference15:02
*** efge has joined #zope3-dev15:02
dipeshSweden, far away from germany :) ... my timeframe is, like usual, to less anyway to have time for conferences. don't will be at akademy, kde meating, this year too.15:03
dipeshand it's in spain :)15:04
*** bskahan has joined #zope3-dev15:19
*** `anthony has quit IRC15:29
*** `anthony has joined #zope3-dev15:33
*** SureshZ has joined #zope3-dev15:38
*** SureshZ has quit IRC15:59
*** bskahan has quit IRC16:00
*** zagy is now known as z|a16:48
*** J1m_ has quit IRC16:49
*** SureshZ has joined #zope3-dev17:31
*** bskahan has joined #zope3-dev17:45
*** bskahan has quit IRC17:57
*** efge has quit IRC17:58
*** efge has joined #zope3-dev18:30
*** SureshZ has quit IRC18:36
*** mkerrin has joined #zope3-dev18:45
*** __gotchaway has joined #zope3-dev18:50
*** __gotchaway is now known as __gotcha18:51
*** MiUlEr has joined #zope3-dev20:03
*** mkerrin has quit IRC20:14
*** hazmat has joined #zope3-dev20:18
*** MiUlEr has quit IRC20:28
*** mgedmin has joined #zope3-dev20:44
*** SureshZ has joined #zope3-dev20:54
*** mgedmin has quit IRC21:55
*** omegadan has joined #zope3-dev22:26
omegadananybody in the mood for answering a zope3 question? :)22:28
*** hazmat_ has joined #zope3-dev22:41
*** hazmat has quit IRC22:49
*** hazmat_ is now known as hazmat22:49
*** ChanServ sets mode: +o hazmat22:49
*** SureshZ has left #zope3-dev22:55
srichteromegadan: shoot23:19
*** projekt01 has joined #zope3-dev23:25
*** tvon has quit IRC23:26
*** tvon has joined #zope3-dev23:26
omegadansrichter: Im about to start a zope3 app which needs to store 100,000's of objects, which will need to be searchable by some of their properties ... What facilities does zope3 provide for this? or am I best off using a sql adapater?23:38
omegadanIm failry new with zope, I wish there was a best practicies document for it :)23:40
*** Aiste has joined #zope3-dev23:40
*** Aiste has quit IRC23:40
omegadanhah shit, you're steven ricther ... ive got your book right here :)23:41
srichterthe ZODB will do fine23:41
srichterlook at the catalog and index packages23:41
srichterI think the README.txt is pretty good23:42
omegadanI will look into those things, thanks23:43
omegadanzope needs a best-practicies document ... perhaps when I am more sophisticated I will write one :)23:44
srichterwell, it is well-known that the catalog is the answer for query problems23:45
srichterit was just not available in 3.0 and as such is not covered in the book23:45
srichter(otherwise it would have been)23:45
omegadanI was under the impresion tha the catalog was still not avaliable23:49
srichterit will be in 3.123:50
omegadanaye, and that wont be around for another 6 months or so?23:50
omegadanwhat would be the best work around until that time?23:50

Generated by 2.15.1 by Marius Gedminas - find it at!