| *** hazmat has joined #zope3-dev | 00:03 | |
| *** niemeyer has quit IRC | 00:08 | |
| *** hazmat_ has joined #zope3-dev | 00:17 | |
| *** hazmat has quit IRC | 00:25 | |
| *** SureshZ has quit IRC | 00:52 | |
| *** srichter has quit IRC | 01:39 | |
| *** J1m has quit IRC | 01:52 | |
| *** srichter has joined #zope3-dev | 01:57 | |
| *** ChanServ sets mode: +o srichter | 01:58 | |
| *** GaryPoster has quit IRC | 02:15 | |
| *** GaryPoster has joined #zope3-dev | 02:22 | |
| *** projekt01 has left #zope3-dev | 02:35 | |
| *** GaryPoster has quit IRC | 02:40 | |
| *** SteveA has quit IRC | 02:52 | |
| *** viyyer has quit IRC | 03:14 | |
| *** viyyer has joined #zope3-dev | 04:09 | |
| *** hazmat_ has quit IRC | 04:21 | |
| *** hazmat has joined #zope3-dev | 05:25 | |
| *** hazmat has quit IRC | 05:37 | |
| *** RaFromBRC has quit IRC | 06:33 | |
| *** hazmat has joined #zope3-dev | 06:38 | |
| *** RaFromBRC has joined #zope3-dev | 06:48 | |
| *** RaFromBRC has quit IRC | 06:50 | |
| *** viyyer has quit IRC | 07:10 | |
| *** hazmat has quit IRC | 08:24 | |
| *** hazmat has joined #zope3-dev | 08:26 | |
| *** SteveA has joined #zope3-dev | 08:43 | |
| *** viyyer has joined #zope3-dev | 08:49 | |
| *** bskahan has joined #zope3-dev | 09:00 | |
| *** viyyer has quit IRC | 09:38 | |
| *** bskahan has quit IRC | 10:04 | |
| *** viyyer has joined #zope3-dev | 10:04 | |
| *** juka has joined #zope3-dev | 10:42 | |
| *** juka has quit IRC | 10:47 | |
| *** hazmat has quit IRC | 11:23 | |
| *** viyyer has left #zope3-dev | 11:27 | |
| *** J1m_ has joined #zope3-dev | 13:46 | |
| *** dipesh has joined #zope3-dev | 14:04 | |
| dipesh | hi devels | 14:04 | 
|---|---|---|
| dipesh | may 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 IRC | 14:27 | |
| VladDrac | perhaps you need to install a _print_ handler somehow? | 14:28 | 
| VladDrac | I know that in Zope2 restricted python, print actually prints to the string 'printed' | 14:28 | 
| dipesh | VladDrac: 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 | 
| dipesh | ah, string "printed" ... ok, should be enough to get more infos out of the code. thanks :) | 14:31 | 
| VladDrac | in lib/python/RestrictedPython/RestrictedMutator in Zope 2.7.4 there is | 14:31 | 
| VladDrac | _printed_expr = stmtNode("_print()").expr | 14:32 | 
| VladDrac | _print_target_node = stmtNode("_print = _print_()") | 14:32 | 
| VladDrac | and a visitPrint | 14:32 | 
| VladDrac | well, stuff is happening there :) | 14:32 | 
| VladDrac | it seems to override some of the parsing | 14:33 | 
| dipesh | yes, at before_and_after.py ; | 14:33 | 
| dipesh | def simple_print_before(): | 14:33 | 
| dipesh | print "foo" | 14:33 | 
| dipesh | def simple_print_after(): | 14:33 | 
| dipesh | _print = _print_() | 14:33 | 
| dipesh | print >> _print, "foo" | 14:33 | 
| dipesh | I tried something like simple_print_before but it throws with those "_print_ not defined" ... RestrictedPython and PrintCollector and all other modules testRestrictions.py imports are successfully imported. | 14:35 | 
| dipesh | I 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 | 
| dipesh | before evaluating the compiled pycode object? | 14:39 | 
| dipesh | ok, enough idears to try it. thanks a lot VladDrac :) | 14:42 | 
| dipesh | s/it/them out/; | 14:42 | 
| J1m_ | dipesh, are you talking about Zope 2 or Zope 3? | 14:46 | 
| dipesh | J1m_: 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 | 
| dipesh | J1m_: 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 | 
| dipesh | security 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 | 
| dipesh | a 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 | 
| dipesh | very lot of thanks, J1m_!!! will do so right now :) | 14:51 | 
| *** tarek has quit IRC | 14:54 | |
| *** efge has joined #zope3-dev | 14:57 | |
| SteveA | dipesh: if you're coming to europython, i'll be giving a talk on the zope.security system | 14:57 | 
| * SteveA --> foodshop | 14:58 | |
| dipesh | SteveA: http://www.europython.org or #europython ? | 15:00 | 
| dipesh | or the conference? | 15:01 | 
| *** efge has quit IRC | 15:01 | |
| SteveA | i mean, at the conference | 15:02 | 
| *** efge has joined #zope3-dev | 15:02 | |
| dipesh | Sweden, 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 | 
| dipesh | and it's in spain :) | 15:04 | 
| *** bskahan has joined #zope3-dev | 15:19 | |
| *** `anthony has quit IRC | 15:29 | |
| *** `anthony has joined #zope3-dev | 15:33 | |
| *** SureshZ has joined #zope3-dev | 15:38 | |
| *** SureshZ has quit IRC | 15:59 | |
| *** bskahan has quit IRC | 16:00 | |
| *** zagy is now known as z|a | 16:48 | |
| *** J1m_ has quit IRC | 16:49 | |
| *** SureshZ has joined #zope3-dev | 17:31 | |
| *** bskahan has joined #zope3-dev | 17:45 | |
| *** bskahan has quit IRC | 17:57 | |
| *** efge has quit IRC | 17:58 | |
| *** efge has joined #zope3-dev | 18:30 | |
| *** SureshZ has quit IRC | 18:36 | |
| *** mkerrin has joined #zope3-dev | 18:45 | |
| *** __gotchaway has joined #zope3-dev | 18:50 | |
| *** __gotchaway is now known as __gotcha | 18:51 | |
| *** MiUlEr has joined #zope3-dev | 20:03 | |
| *** mkerrin has quit IRC | 20:14 | |
| *** hazmat has joined #zope3-dev | 20:18 | |
| *** MiUlEr has quit IRC | 20:28 | |
| *** mgedmin has joined #zope3-dev | 20:44 | |
| *** SureshZ has joined #zope3-dev | 20:54 | |
| *** mgedmin has quit IRC | 21:55 | |
| *** omegadan has joined #zope3-dev | 22:26 | |
| omegadan | anybody in the mood for answering a zope3 question? :) | 22:28 | 
| *** hazmat_ has joined #zope3-dev | 22:41 | |
| *** hazmat has quit IRC | 22:49 | |
| *** hazmat_ is now known as hazmat | 22:49 | |
| *** ChanServ sets mode: +o hazmat | 22:49 | |
| *** SureshZ has left #zope3-dev | 22:55 | |
| srichter | omegadan: shoot | 23:19 | 
| *** projekt01 has joined #zope3-dev | 23:25 | |
| *** tvon has quit IRC | 23:26 | |
| *** tvon has joined #zope3-dev | 23:26 | |
| omegadan | srichter: 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 | 
| omegadan | Im failry new with zope, I wish there was a best practicies document for it :) | 23:40 | 
| *** Aiste has joined #zope3-dev | 23:40 | |
| *** Aiste has quit IRC | 23:40 | |
| omegadan | hah shit, you're steven ricther ... ive got your book right here :) | 23:41 | 
| srichter | the ZODB will do fine | 23:41 | 
| srichter | look at the catalog and index packages | 23:41 | 
| srichter | I think the zope.app.catalog README.txt is pretty good | 23:42 | 
| omegadan | I will look into those things, thanks | 23:43 | 
| omegadan | zope needs a best-practicies document ... perhaps when I am more sophisticated I will write one :) | 23:44 | 
| srichter | well, it is well-known that the catalog is the answer for query problems | 23:45 | 
| srichter | it was just not available in 3.0 and as such is not covered in the book | 23:45 | 
| srichter | (otherwise it would have been) | 23:45 | 
| omegadan | I was under the impresion tha the catalog was still not avaliable | 23:49 | 
| srichter | it will be in 3.1 | 23:50 | 
| omegadan | aye, and that wont be around for another 6 months or so? | 23:50 | 
| omegadan | what would be the best work around until that time? | 23:50 | 
Generated by irclog2html.py 4.0.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!