*** fmj has joined #zope | 00:27 | |
*** fmj has joined #zope | 00:27 | |
*** fmj has quit IRC | 00:48 | |
*** runyaga has quit IRC | 00:52 | |
*** alga has quit IRC | 00:53 | |
*** J1m has quit IRC | 01:07 | |
*** thetet has quit IRC | 01:11 | |
*** m8 has quit IRC | 01:17 | |
*** MrTango has quit IRC | 01:24 | |
*** evilbungle has quit IRC | 01:38 | |
*** alecm has joined #zope | 01:38 | |
*** alecm has joined #zope | 01:38 | |
*** AnneGilles has quit IRC | 01:59 | |
*** _mup_ has quit IRC | 02:00 | |
*** _mup_ has joined #zope | 02:00 | |
*** ajkaanbal has quit IRC | 02:14 | |
*** kevc has quit IRC | 02:47 | |
*** fgs has joined #zope | 02:54 | |
fgs | zope.contenttypes could use an update | 02:55 |
---|---|---|
fgs | hi btw | 02:55 |
*** dayne has joined #zope | 02:57 | |
mgedmin | what sort of an update? | 03:07 |
*** kevc has joined #zope | 03:07 | |
*** AnneGilles has joined #zope | 03:17 | |
fgs | pps has the wrong type | 03:17 |
fgs | and lots of other common formats are missing | 03:18 |
*** tiwula has quit IRC | 03:19 | |
mgedmin | I'm sure people will thank you if you make those updates ;) | 03:38 |
*** deux_ has joined #zope | 03:49 | |
fgs | good try ;) | 03:51 |
fgs | i might submit a diff later for at least pps | 03:51 |
fgs | as we got bitten by it this week | 03:52 |
*** Spanktar has quit IRC | 03:53 | |
*** J1m has joined #zope | 03:54 | |
*** nenn3 has quit IRC | 03:54 | |
*** tiwula has joined #zope | 04:05 | |
*** J1m has quit IRC | 04:21 | |
*** do3cc has quit IRC | 04:25 | |
*** do3cc has joined #zope | 04:38 | |
*** mcdonc has quit IRC | 06:07 | |
*** deux_ has left #zope | 06:30 | |
*** mcdonc has joined #zope | 06:39 | |
*** mcdonc has quit IRC | 06:49 | |
*** thevishy has joined #zope | 07:17 | |
thevishy | I am trying to hack a python code to Zope | 07:18 |
thevishy | sorry PHP* | 07:18 |
thevishy | /$textinputs = $_POST['textinputs']; # array is the variable | 07:18 |
thevishy | in Zope however I dont see this as a variable I see .... | 07:18 |
thevishy | request['textinputs[]'] | 07:19 |
thevishy | '%3Cp%3E%0A%09This%20is%20some%20%3Cstrong%3Esample%20text%3C%2Fstrong%3E.%20You%20are%20using%20%3Ca%20href%3D%22http%3A%2F%2Fckeditor.com%2F%22%3ECKEditor%3C%2Fa%3E.%3C%2Fp%3E%0A' | 07:19 |
thevishy | I see textinputs[] .... as a string and not an array as PHP would have it | 07:19 |
kosh | turn your array into a text string that you can turn back into an array | 07:23 |
*** allisterb has quit IRC | 07:30 | |
thevishy | but u mean a simple array ? | 07:35 |
thevishy | in PHP code , this is how they use it | 07:35 |
thevishy | foreach( $textinputs as $key=>$val ) { | 07:36 |
kosh | php arrays are not like what other languages call arrays | 07:37 |
kosh | and you can't just post a data structure to another server | 07:37 |
kosh | posts are strings | 07:37 |
kosh | so encode your data as some kind of string that you can then convert back | 07:37 |
*** thevishy has quit IRC | 07:40 | |
*** thevishy has joined #zope | 07:40 | |
*** __mac__ has joined #zope | 07:41 | |
*** __mac__ has quit IRC | 07:50 | |
*** allisterb has joined #zope | 07:51 | |
thevishy | kosh its a urlencoded HTML string | 07:53 |
thevishy | so I am wondering in Python how would I do the equivalent of PHP's foreach( $textinputs as $key=>$val ) { echo "textinputs[$key] = decodeURIComponent(\"" . $val . "\");\n"; | 07:53 |
thevishy | for one , I see a big string basically | 07:54 |
thevishy | in the request - cant understand whays key value pair here | 07:54 |
kosh | it is a single string and would have to be parsed, I don't have a clue how php works | 08:00 |
kosh | normally what I would do is have each one a seperate variable since that makes it far far simpler to deal with | 08:01 |
kosh | good luck I am heading out | 08:02 |
thevishy | thanks | 08:13 |
*** mcdonc has joined #zope | 08:15 | |
*** alga has joined #zope | 08:17 | |
*** tiwula has quit IRC | 08:18 | |
*** tisto has joined #zope | 08:51 | |
*** __mac__ has joined #zope | 08:59 | |
*** tisto has quit IRC | 09:03 | |
*** zagy has joined #zope | 09:04 | |
*** tisto has joined #zope | 09:15 | |
*** davetoo has joined #zope | 09:21 | |
davetoo | Why am I having such a hard time finding info/docs about OFS? | 09:22 |
davetoo | :) | 09:22 |
betabug | likely because docs are a mess | 09:22 |
betabug | davetoo: what are you looking for? | 09:23 |
davetoo | I'm working with a (big) app based on zope 2.13.8 ... trying to understand the workigns, | 09:23 |
davetoo | and in particular... how to walk down the object tree from the top ... | 09:24 |
davetoo | ..with filters... to try to create a graph to visualize in Gephi | 09:24 |
betabug | hu? that's the simplest thing ever (or else I don't get you) | 09:24 |
davetoo | I'm still trying to orient myself | 09:25 |
betabug | get the root object, then use objectIds() or objectValues() to get the subobjects | 09:25 |
davetoo | 'k | 09:25 |
betabug | (objectValues gets, the objects - so it's more expensive) | 09:25 |
davetoo | what is the purpose of OFS? | 09:25 |
davetoo | I can't even find a README under that folder :(: | 09:25 |
betabug | you can give them a list of meta_types if you want only certain type of objects | 09:25 |
betabug | it's just a bunch of stuff | 09:26 |
davetoo | 'k | 09:26 |
betabug | read the Zope 2 book, read the "Zope 2 Secrets", maybe read the "Zope 2 dev guide" | 09:26 |
betabug | worry about the zope code only if you get stuck after that :-) | 09:26 |
davetoo | thing is... I know I've seen some docs about OFS before but can't find it again | 09:26 |
davetoo | Secrets is one I've not heard of before; I'll look for that. | 09:26 |
betabug | consider OFS simply like a namespace in the code | 09:27 |
davetoo | ok, | 09:27 |
davetoo | not really a separate Product | 09:27 |
betabug | http://docs.zope.org/ -> "Zope secrets" | 09:27 |
davetoo | heh.. there's so much, and yet so little, out there :) Easy to go around in circles (and dead links) trying to find this stuff. | 09:28 |
betabug | indeed | 09:28 |
betabug | and some of it is for stuff that's outdated by 5 or even 10 years | 09:28 |
davetoo | yeah, and hopefully I won't need to know it, but .. in supporting this app I at least need to know where to look if I do get stuck. | 09:29 |
betabug | right, I know the feeling :-) | 09:29 |
davetoo | The best thing I've ever done in the time I've been working with this app is to find IPython | 09:29 |
betabug | dunno, never used that | 09:30 |
davetoo | I know it's got some quirks but .. it makes exploration so easy | 09:30 |
betabug | I've only recently started to use the debugger really :-) | 09:30 |
davetoo | iot | 09:30 |
davetoo | it's many things, but I mostly use it as an interactive python shell. It's got great tab completion, introspection, | 09:30 |
davetoo | lots of cool stuff. it's worth looking into. | 09:31 |
betabug | nice | 09:31 |
davetoo | so objectIds is recursive? | 09:32 |
davetoo | oh, it's not. | 09:32 |
betabug | no, it's basically like ls in the shell | 09:32 |
betabug | it gets you the ids of the objects contained | 09:33 |
betabug | objectValues will get you the child objects themselves - which can be expensive in terms of RAM and DB caches | 09:33 |
davetoo | I always use .__dict__ :) ipython has has a magic directive, so %page obj.__dict__ is easy | 09:33 |
betabug | depending on what you need really | 09:33 |
davetoo | yeah, I do have to be careful about memory here. | 09:33 |
betabug | well, .__dict__ will get you all kind of stuff, objectIds will get you Zope child objects | 09:34 |
davetoo | I had used objectMap() to poke around, in the past | 09:35 |
betabug | never seen that one | 09:35 |
davetoo | oh, | 09:36 |
davetoo | oh, nevermind, | 09:36 |
davetoo | I'm tired. | 09:36 |
davetoo | but then again.. it is actually tehre | 09:37 |
davetoo | return tuple(map(lambda dict: dict.copy(), self._objects)) | 09:37 |
davetoo | ObjectManager.objectMap | 09:37 |
davetoo | shows the object ID and metatype | 09:38 |
betabug | aha | 09:40 |
betabug | just never needed that | 09:40 |
*** alexpilz has quit IRC | 09:48 | |
*** batlock666 has joined #zope | 09:55 | |
*** davetoo has left #zope | 09:56 | |
*** goschtl has joined #zope | 10:00 | |
*** giacomos has joined #zope | 10:05 | |
*** fmj has joined #zope | 10:08 | |
*** J1m has joined #zope | 10:25 | |
*** alexpilz has joined #zope | 10:30 | |
*** fredvd has joined #zope | 10:33 | |
*** J1m has quit IRC | 10:49 | |
*** avoinea has joined #zope | 10:51 | |
*** __mac__ has quit IRC | 10:58 | |
*** __mac__ has joined #zope | 11:01 | |
*** thetet has joined #zope | 11:16 | |
*** fredvd has quit IRC | 11:21 | |
*** chrisw has joined #zope | 11:24 | |
*** avoinea has quit IRC | 11:27 | |
*** avoinea has joined #zope | 11:42 | |
*** mitchell`off is now known as mitchell` | 11:50 | |
*** AnneGilles has quit IRC | 11:57 | |
*** MrTango has joined #zope | 12:04 | |
*** TomBlockley has joined #zope | 12:04 | |
*** AnneGilles has joined #zope | 12:13 | |
*** AnneGilles_ has joined #zope | 12:14 | |
*** evilbungle has joined #zope | 12:16 | |
*** AnneGilles has quit IRC | 12:17 | |
*** AnneGilles_ is now known as AnneGilles | 12:17 | |
*** menesis has joined #zope | 12:30 | |
*** dayne has quit IRC | 12:35 | |
*** fmj has quit IRC | 12:37 | |
*** dayne has joined #zope | 12:37 | |
*** chrisw has quit IRC | 12:38 | |
*** chrisw has joined #zope | 12:39 | |
*** chrisw has quit IRC | 12:39 | |
*** teix has joined #zope | 12:58 | |
*** tisto is now known as tisto|lunch | 13:24 | |
*** thevishy has quit IRC | 13:30 | |
*** goschtl_ has joined #zope | 13:30 | |
*** thevishy has joined #zope | 13:31 | |
*** goschtl has quit IRC | 13:33 | |
*** goschtl_ is now known as goschtl | 13:33 | |
*** nenn3 has joined #zope | 14:12 | |
*** AnneGilles has quit IRC | 14:20 | |
*** tisto|lunch is now known as tisto | 14:44 | |
*** fredvd has joined #zope | 14:47 | |
*** avoinea has quit IRC | 14:47 | |
*** textjunky has joined #zope | 15:01 | |
textjunky | hi just locked everyone out of a friends zope without making a backup, by disabling 'basic auth' imagining that cookie auth would suddenly start working :\ | 15:02 |
*** avoinea has joined #zope | 15:02 | |
textjunky | any help appreciated | 15:02 |
textjunky | tells me the following things don't exist: http://127.0.0.1:8080/acl_users/credentials_basic_auth/login_form | 15:03 |
textjunky | http://127.0.0.1:8080/acl_users/credentials_cookie_auth/login_form | 15:04 |
textjunky | the second one is what is not found when trying to login | 15:04 |
textjunky | the first is a permutation i made manually | 15:04 |
textjunky | this is zope 2.6 | 15:05 |
textjunky | is the situation recoverable? | 15:05 |
textjunky | can i migrate a zope db to a new instance? | 15:05 |
textjunky | if i make an emergency user, will it be able to log in, despite my having disabled basic auth? | 15:06 |
textjunky | site is still running, just nothing that needs auth is working afaict | 15:06 |
textjunky | can i hexedit the zope db? | 15:06 |
textjunky | <textjunky> i guess i am an idiot | 15:09 |
*** menesis has quit IRC | 15:14 | |
*** mitchell` is now known as mitchell`afk | 15:17 | |
*** allisterb_ has joined #zope | 15:24 | |
*** allisterb_ has quit IRC | 15:24 | |
*** eperez has joined #zope | 15:26 | |
*** textjunky has quit IRC | 15:27 | |
*** _mup__ has joined #zope | 15:30 | |
*** _mup_ has quit IRC | 15:30 | |
*** _mup__ is now known as _mup_ | 15:30 | |
*** textjunky has joined #zope | 16:11 | |
*** menesis has joined #zope | 16:11 | |
*** deux_ has joined #zope | 16:14 | |
*** tisto is now known as tisto|afk | 16:18 | |
*** thevishy has quit IRC | 16:26 | |
*** eperez has quit IRC | 16:32 | |
*** mitchell`afk is now known as mitchell` | 16:44 | |
*** __mac__ has quit IRC | 16:49 | |
*** zhangkaizhao has joined #zope | 16:51 | |
*** daMaestro has joined #zope | 16:57 | |
*** tisto|afk is now known as tisto | 17:00 | |
betabug | disable basic auth? how would one do that? | 17:02 |
textjunky | maybe better not to ask ;-) | 17:09 |
betabug | why not? if I undestood what you did, maybe I could offer an idea how to fix it | 17:10 |
betabug | s/undest/underst/ | 17:10 |
*** textjunky has quit IRC | 17:11 | |
*** dayne has quit IRC | 17:12 | |
*** thetet has quit IRC | 17:17 | |
kosh | probably have to repair zope from the cli | 17:30 |
kosh | being able to access zope from interactive python if running zeo is GREAT for fixing stuff | 17:31 |
kosh | too bad he left | 17:31 |
kosh | betabug: so how are you doing today? | 17:31 |
* lewellyn hands kosh a spare flamethrower in case textjunky returns | 17:31 | |
kosh | you realy think that I would EVER need a spare flamethrower? | 17:32 |
lewellyn | spare to me. "seeking a better home" | 17:33 |
kosh | hehe | 17:34 |
*** J1m has joined #zope | 17:36 | |
kosh | hail J1m have you come to see if betabug's homeland has finally walked into the light by going after their bankers? :) | 17:36 |
J1m | Heh, are you responding to my facebook post on the NYT article? | 17:40 |
kosh | nope I have not looked at that | 17:41 |
kosh | it is just a joke I make with betabug a lot so I wanted to know if you had come to watch | 17:41 |
J1m | heh, no | 17:41 |
*** alga has quit IRC | 17:41 | |
kosh | some of the huge currency traders have really screwed over some countries and at the same time those traders publically have said how what they did really helped the country long term | 17:42 |
J1m | Very interesting article in the New York Times today about how the geniuses in the US Fed missed the coming troubles in '06. | 17:42 |
kosh | surprised those countries have not sent out people to "help" the currency traders | 17:42 |
J1m | I've had similar thoughts about all of the local governments around the world that got screwed by clueless financial advisers and got left holding the bag. | 17:43 |
*** alga has joined #zope | 17:43 | |
kosh | in some cases local governments bought AAA bonds which they are required to by law (guess you paid for that law) and those bonds where not really AAA and the banks knew it | 17:44 |
J1m | (sufficient levels of cluelessness are indistinguishable from evil) | 17:44 |
kosh | they used a law to get local governments to buy their stuff knowing that was going to fail | 17:44 |
J1m | I suspect a lot of banks didn't know it. Almost no one knew what was really happening. | 17:45 |
kosh | and a major lesson you learn is don't write down paper or email memos about this stuff if you do it | 17:45 |
J1m | which doesn't excuse them imo | 17:45 |
J1m | We're not nearly as smart as we think we are | 17:45 |
J1m | ok, back to work | 17:46 |
kosh | goldman sachs had some internal memos get out where they knew that what they where selling was going to fail and not even close to AAA so they sold it to places like school disticts which by law had to put money being saved for new buildings etc into AAA bond stuff | 17:46 |
kosh | have fun | 17:46 |
*** batlock666 has quit IRC | 18:09 | |
*** runyaga has joined #zope | 18:15 | |
*** runyaga has quit IRC | 18:15 | |
*** runyaga has joined #zope | 18:15 | |
* kosh sets runyaga on fire | 18:18 | |
*** zagy has quit IRC | 18:24 | |
* lewellyn grabs marshmallows | 18:25 | |
*** alexpilz has quit IRC | 18:32 | |
*** alexpilz has joined #zope | 18:32 | |
*** fredvd has quit IRC | 18:37 | |
*** MrTango has quit IRC | 18:41 | |
*** runyaga has quit IRC | 18:42 | |
*** daMaestro has quit IRC | 19:01 | |
*** alexpilz has quit IRC | 19:04 | |
*** tiwula has joined #zope | 19:08 | |
*** giacomos has quit IRC | 19:14 | |
*** Spanktar has joined #zope | 19:16 | |
*** supton has joined #zope | 19:28 | |
*** deux_ has quit IRC | 19:31 | |
*** deux_ has joined #zope | 19:32 | |
*** __mac__ has joined #zope | 19:33 | |
*** deux_ has quit IRC | 19:38 | |
*** nenn3 has quit IRC | 19:39 | |
*** alexpilz has joined #zope | 19:51 | |
*** m8 has joined #zope | 20:01 | |
*** Raine has joined #zope | 20:04 | |
*** Raine has left #zope | 20:04 | |
*** goschtl has quit IRC | 20:04 | |
*** mitchell` is now known as mitchell`off | 20:11 | |
*** avoinea has quit IRC | 20:24 | |
*** mcdonc has quit IRC | 20:27 | |
*** goschtl has joined #zope | 20:27 | |
*** zhangkaizhao has quit IRC | 20:33 | |
*** evilbungle has quit IRC | 20:34 | |
*** goschtl has quit IRC | 20:35 | |
*** TomBlockley has quit IRC | 20:38 | |
*** supton has quit IRC | 21:03 | |
*** tisto_ has joined #zope | 21:14 | |
*** Arfrever has joined #zope | 21:15 | |
*** Arfrever has quit IRC | 21:15 | |
*** tisto has quit IRC | 21:18 | |
*** mcdonc has joined #zope | 21:20 | |
*** Arfrever has joined #zope | 21:20 | |
*** zagy has joined #zope | 21:37 | |
J1m | mcdonc, have you given any consideration to trace logs in waitress? | 21:42 |
mcdonc | i haven't, but repoze.debug generates output similar to that of zope's trace log: http://docs.repoze.org/debug/responselogger.html#trace-log | 21:43 |
J1m | Yeah, that's the right spirit. but not enough for me. :) | 21:45 |
J1m | For example, I often wanna know how long a request is queues waiting for a thread. (In servers w thread pools.) | 21:46 |
J1m | I assume waitress still has a thread pool. | 21:46 |
J1m | I sometimes (much less often) wanna know how long the server spends receiving input (for servers that buffer) or sending output (zope.server conspires against this). | 21:47 |
J1m | zc.zservertracelog was a quick hack (that's lived on as these things do) that I want to replace with something more general. | 21:48 |
J1m | But I need the collaboration of the server. | 21:48 |
mcdonc | right | 21:48 |
mcdonc | i can do that | 21:49 |
J1m | Here are somethoughts. | 21:50 |
J1m | I'd like to defer as much to middleware as possible. | 21:50 |
J1m | I was thinking that the server could put something in the environment that middleware could optionally interact with. | 21:51 |
J1m | But not sure exactly what. | 21:51 |
J1m | Some of what I want is specific to servers with thread pools. | 21:52 |
J1m | Not sure how common those are. | 21:52 |
mcdonc | pretty common i think | 21:54 |
mcdonc | paste.httpserver has an (optional) threadpool, the cherrypy server has one | 21:54 |
mcdonc | waitress, zope.server | 21:54 |
J1m | so, what if there was an object in the environment with addrs: | 21:55 |
mcdonc | in any case i can add logging statements to waitress to log to a specific logger when a task is added to the task list | 21:55 |
J1m | start-time -- the time the request started | 21:56 |
mcdonc | then when it's started, and when it finishes | 21:56 |
J1m | oops start_time | 21:56 |
J1m | queue_time -- the time the request is queued | 21:56 |
J1m | end_callback(f) -- specify a callback to be called at end. | 21:56 |
J1m | this would be an alternative to logging. | 21:56 |
J1m | OK, we have 2 approaches on the table. :) | 21:57 |
J1m | for logging, you'd need to log 3 events: start, queue and end. | 21:57 |
mgedmin | during one of the EuroPythons there was a talk about monitoring web servers by some Googler | 21:57 |
mgedmin | one thing stuck with me: every request gets a unique id | 21:58 |
J1m | The server and middlware would need to conspire on the logger name. | 21:58 |
J1m | Yup | 21:58 |
mgedmin | then there are log messages for start, stop, errors etc. that mention that ID | 21:58 |
mgedmin | ever since then I wanted to have a detailed log and pretty visual graphs of this kind of data | 21:58 |
mcdonc | is there also a way to get the length of the tcp listen queue hmm | 21:58 |
J1m | which means the middware and apps need that id too. | 21:58 |
mgedmin | zc.zservertracelog gives me the first part | 21:58 |
mgedmin | I haven't got around to the visual bits... | 21:58 |
mgedmin | so, a unique request ID might be a nice addition to the spec, perhaps | 21:59 |
J1m | We've done some nice visual graphs using rrd driven by tracelogs. | 21:59 |
J1m | so, I think we need to stuff something in the environment in any case. | 22:00 |
J1m | Dang, sorry, I've got a meeting. | 22:00 |
J1m | I'll send you an email. | 22:00 |
mcdonc | i'll just make some lame event system and publish accepted, queued, finished events and also log | 22:00 |
mcdonc | then we can do whatever the needful is i think | 22:00 |
*** ajkaanbal has joined #zope | 22:19 | |
*** Arfrever has quit IRC | 22:25 | |
*** Arfrever has joined #zope | 22:31 | |
*** Arfrever has quit IRC | 22:49 | |
*** m8 has quit IRC | 22:58 | |
*** AnneGilles has joined #zope | 23:02 | |
*** teix has quit IRC | 23:05 | |
*** m8 has joined #zope | 23:11 | |
J1m | mcdonc, sorry for the drive by. I sent an email. | 23:23 |
mcdonc | J1m: np.. i'll respond in a while, thanks for sending | 23:23 |
*** mcdonc has quit IRC | 23:28 | |
*** m8 has quit IRC | 23:39 | |
*** zagy has quit IRC | 23:41 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!