IRC log of #zope for Friday, 2012-01-13

*** fmj has joined #zope00:27
*** fmj has joined #zope00:27
*** fmj has quit IRC00:48
*** runyaga has quit IRC00:52
*** alga has quit IRC00:53
*** J1m has quit IRC01:07
*** thetet has quit IRC01:11
*** m8 has quit IRC01:17
*** MrTango has quit IRC01:24
*** evilbungle has quit IRC01:38
*** alecm has joined #zope01:38
*** alecm has joined #zope01:38
*** AnneGilles has quit IRC01:59
*** _mup_ has quit IRC02:00
*** _mup_ has joined #zope02:00
*** ajkaanbal has quit IRC02:14
*** kevc has quit IRC02:47
*** fgs has joined #zope02:54
fgszope.contenttypes could use an update02:55
fgshi btw02:55
*** dayne has joined #zope02:57
mgedminwhat sort of an update?03:07
*** kevc has joined #zope03:07
*** AnneGilles has joined #zope03:17
fgspps has the wrong type03:17
fgsand lots of other common formats are missing03:18
*** tiwula has quit IRC03:19
mgedminI'm sure people will thank you if you make those updates ;)03:38
*** deux_ has joined #zope03:49
fgsgood try ;)03:51
fgsi might submit a diff later for at least pps03:51
fgsas we got bitten by it this week03:52
*** Spanktar has quit IRC03:53
*** J1m has joined #zope03:54
*** nenn3 has quit IRC03:54
*** tiwula has joined #zope04:05
*** J1m has quit IRC04:21
*** do3cc has quit IRC04:25
*** do3cc has joined #zope04:38
*** mcdonc has quit IRC06:07
*** deux_ has left #zope06:30
*** mcdonc has joined #zope06:39
*** mcdonc has quit IRC06:49
*** thevishy has joined #zope07:17
thevishyI am trying to hack a python code to Zope07:18
thevishysorry PHP*07:18
thevishy/$textinputs           = $_POST['textinputs']; # array is the variable07:18
thevishyin Zope however I dont see this as a variable I see ....07:18
thevishyrequest['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
thevishyI see textinputs[] .... as a string and not an array as PHP would have it07:19
koshturn your array into a text string that you can turn back into an array07:23
*** allisterb has quit IRC07:30
thevishybut u mean a simple array ?07:35
thevishyin PHP code , this is how they use it07:35
thevishyforeach( $textinputs as $key=>$val ) {07:36
koshphp arrays are not like what other languages call arrays07:37
koshand you can't just post a data structure to another server07:37
koshposts are strings07:37
koshso encode your data as some kind of string that you can then convert back07:37
*** thevishy has quit IRC07:40
*** thevishy has joined #zope07:40
*** __mac__ has joined #zope07:41
*** __mac__ has quit IRC07:50
*** allisterb has joined #zope07:51
thevishykosh its a urlencoded HTML string07:53
thevishyso 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
thevishyfor one , I see a big string basically07:54
thevishyin the request - cant understand whays key value pair here07:54
koshit is a single string and would have to be parsed, I don't have a clue how php works08:00
koshnormally what I would do is have each one a seperate variable since that makes it far far simpler to deal with08:01
koshgood luck I am heading out08:02
thevishythanks08:13
*** mcdonc has joined #zope08:15
*** alga has joined #zope08:17
*** tiwula has quit IRC08:18
*** tisto has joined #zope08:51
*** __mac__ has joined #zope08:59
*** tisto has quit IRC09:03
*** zagy has joined #zope09:04
*** tisto has joined #zope09:15
*** davetoo has joined #zope09:21
davetooWhy am I having such a hard time finding info/docs about OFS?09:22
davetoo:)09:22
betabuglikely because docs are a mess09:22
betabugdavetoo: what are you looking for?09:23
davetooI'm working with a (big) app based on zope 2.13.8 ... trying to understand the workigns,09:23
davetooand 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 Gephi09:24
betabughu? that's the simplest thing ever (or else I don't get you)09:24
davetooI'm still trying to orient myself09:25
betabugget the root object, then use objectIds() or objectValues() to get the subobjects09:25
davetoo'k09:25
betabug(objectValues gets, the objects - so it's more expensive)09:25
davetoowhat is the purpose of OFS?09:25
davetooI can't even find a README under that folder :(:09:25
betabugyou can give them a list of meta_types if you want only certain type of objects09:25
betabugit's just a bunch of stuff09:26
davetoo'k09:26
betabugread the Zope 2 book, read the "Zope 2 Secrets", maybe read the "Zope 2 dev guide"09:26
betabugworry about the zope code only if you get stuck after that :-)09:26
davetoothing is... I know I've seen some docs about OFS before but can't find it again09:26
davetooSecrets is one I've not heard of before; I'll look for that.09:26
betabugconsider OFS simply like a namespace in the code09:27
davetoook,09:27
davetoonot really a separate Product09:27
betabughttp://docs.zope.org/ -> "Zope secrets"09:27
davetooheh.. 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
betabugindeed09:28
betabugand some of it is for stuff that's outdated by 5 or even 10 years09:28
davetooyeah, 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
betabugright, I know the feeling :-)09:29
davetooThe best thing I've ever done in the time I've been working with this app is to find IPython09:29
betabugdunno, never used that09:30
davetooI know it's got some quirks but .. it makes exploration so easy09:30
betabugI've only recently started to use the debugger really :-)09:30
davetooiot09:30
davetooit's many things, but I mostly use it as an interactive python shell.  It's got great tab completion, introspection,09:30
davetoolots of cool stuff. it's worth looking into.09:31
betabugnice09:31
davetooso objectIds is recursive?09:32
davetoooh, it's not.09:32
betabugno, it's basically like ls in the shell09:32
betabugit gets you the ids of the objects contained09:33
betabugobjectValues will get you the child objects themselves - which can be expensive in terms of RAM and DB caches09:33
davetooI always use .__dict__ :)  ipython has has a magic directive, so %page obj.__dict__ is easy09:33
betabugdepending on what you need really09:33
davetooyeah, I do have to be careful about memory here.09:33
betabugwell, .__dict__ will get you all kind of stuff, objectIds will get you Zope child objects09:34
davetooI had used objectMap() to poke around, in the past09:35
betabugnever seen that one09:35
davetoooh,09:36
davetoooh, nevermind,09:36
davetooI'm tired.09:36
davetoobut then again.. it is actually tehre09:37
davetooreturn tuple(map(lambda dict: dict.copy(), self._objects))09:37
davetooObjectManager.objectMap09:37
davetooshows the object ID and metatype09:38
betabugaha09:40
betabugjust never needed that09:40
*** alexpilz has quit IRC09:48
*** batlock666 has joined #zope09:55
*** davetoo has left #zope09:56
*** goschtl has joined #zope10:00
*** giacomos has joined #zope10:05
*** fmj has joined #zope10:08
*** J1m has joined #zope10:25
*** alexpilz has joined #zope10:30
*** fredvd has joined #zope10:33
*** J1m has quit IRC10:49
*** avoinea has joined #zope10:51
*** __mac__ has quit IRC10:58
*** __mac__ has joined #zope11:01
*** thetet has joined #zope11:16
*** fredvd has quit IRC11:21
*** chrisw has joined #zope11:24
*** avoinea has quit IRC11:27
*** avoinea has joined #zope11:42
*** mitchell`off is now known as mitchell`11:50
*** AnneGilles has quit IRC11:57
*** MrTango has joined #zope12:04
*** TomBlockley has joined #zope12:04
*** AnneGilles has joined #zope12:13
*** AnneGilles_ has joined #zope12:14
*** evilbungle has joined #zope12:16
*** AnneGilles has quit IRC12:17
*** AnneGilles_ is now known as AnneGilles12:17
*** menesis has joined #zope12:30
*** dayne has quit IRC12:35
*** fmj has quit IRC12:37
*** dayne has joined #zope12:37
*** chrisw has quit IRC12:38
*** chrisw has joined #zope12:39
*** chrisw has quit IRC12:39
*** teix has joined #zope12:58
*** tisto is now known as tisto|lunch13:24
*** thevishy has quit IRC13:30
*** goschtl_ has joined #zope13:30
*** thevishy has joined #zope13:31
*** goschtl has quit IRC13:33
*** goschtl_ is now known as goschtl13:33
*** nenn3 has joined #zope14:12
*** AnneGilles has quit IRC14:20
*** tisto|lunch is now known as tisto14:44
*** fredvd has joined #zope14:47
*** avoinea has quit IRC14:47
*** textjunky has joined #zope15:01
textjunkyhi 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 #zope15:02
textjunkyany help appreciated15:02
textjunkytells me the following things don't exist: http://127.0.0.1:8080/acl_users/credentials_basic_auth/login_form15:03
textjunkyhttp://127.0.0.1:8080/acl_users/credentials_cookie_auth/login_form15:04
textjunkythe second one is what is not found when trying to login15:04
textjunkythe first is a permutation i made manually15:04
textjunkythis is zope 2.615:05
textjunkyis the situation recoverable?15:05
textjunkycan i migrate a zope db to a new instance?15:05
textjunkyif i make an emergency user, will it be able to log in, despite my having disabled basic auth?15:06
textjunkysite is still running, just nothing that needs auth is working afaict15:06
textjunkycan i hexedit the zope db?15:06
textjunky<textjunky> i guess i am an idiot15:09
*** menesis has quit IRC15:14
*** mitchell` is now known as mitchell`afk15:17
*** allisterb_ has joined #zope15:24
*** allisterb_ has quit IRC15:24
*** eperez has joined #zope15:26
*** textjunky has quit IRC15:27
*** _mup__ has joined #zope15:30
*** _mup_ has quit IRC15:30
*** _mup__ is now known as _mup_15:30
*** textjunky has joined #zope16:11
*** menesis has joined #zope16:11
*** deux_ has joined #zope16:14
*** tisto is now known as tisto|afk16:18
*** thevishy has quit IRC16:26
*** eperez has quit IRC16:32
*** mitchell`afk is now known as mitchell`16:44
*** __mac__ has quit IRC16:49
*** zhangkaizhao has joined #zope16:51
*** daMaestro has joined #zope16:57
*** tisto|afk is now known as tisto17:00
betabugdisable basic auth? how would one do that?17:02
textjunkymaybe better not to ask ;-)17:09
betabugwhy not? if I undestood what you did, maybe I could offer an idea how to fix it17:10
betabugs/undest/underst/17:10
*** textjunky has quit IRC17:11
*** dayne has quit IRC17:12
*** thetet has quit IRC17:17
koshprobably have to repair zope from the cli17:30
koshbeing able to access zope from interactive python if running zeo is GREAT for fixing stuff17:31
koshtoo bad he left17:31
koshbetabug: so how are you doing today?17:31
* lewellyn hands kosh a spare flamethrower in case textjunky returns17:31
koshyou realy think that I would EVER need a spare flamethrower?17:32
lewellynspare to me. "seeking a better home"17:33
koshhehe17:34
*** J1m has joined #zope17:36
koshhail J1m have you come to see if betabug's homeland has finally walked into the light by going after their bankers? :)17:36
J1mHeh, are you responding to my facebook post on the NYT article?17:40
koshnope I have not looked at that17:41
koshit is just a joke I make with betabug a lot so I wanted to know if you had come to watch17:41
J1mheh, no17:41
*** alga has quit IRC17:41
koshsome 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 term17:42
J1mVery interesting article in the New York Times today about how the geniuses in the US Fed missed the coming troubles in '06.17:42
koshsurprised those countries have not sent out people to "help" the currency traders17:42
J1mI'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 #zope17:43
koshin 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 it17:44
J1m(sufficient levels of cluelessness are indistinguishable from evil)17:44
koshthey used a law to get local governments to buy their stuff knowing that was going to fail17:44
J1mI suspect a lot of banks didn't know it. Almost no one knew what was really happening.17:45
koshand a major lesson you learn is don't write down paper or email memos about this stuff if you do it17:45
J1mwhich doesn't excuse them imo17:45
J1mWe're not nearly as smart as we think we are17:45
J1mok, back to work17:46
koshgoldman 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 stuff17:46
koshhave fun17:46
*** batlock666 has quit IRC18:09
*** runyaga has joined #zope18:15
*** runyaga has quit IRC18:15
*** runyaga has joined #zope18:15
* kosh sets runyaga on fire18:18
*** zagy has quit IRC18:24
* lewellyn grabs marshmallows18:25
*** alexpilz has quit IRC18:32
*** alexpilz has joined #zope18:32
*** fredvd has quit IRC18:37
*** MrTango has quit IRC18:41
*** runyaga has quit IRC18:42
*** daMaestro has quit IRC19:01
*** alexpilz has quit IRC19:04
*** tiwula has joined #zope19:08
*** giacomos has quit IRC19:14
*** Spanktar has joined #zope19:16
*** supton has joined #zope19:28
*** deux_ has quit IRC19:31
*** deux_ has joined #zope19:32
*** __mac__ has joined #zope19:33
*** deux_ has quit IRC19:38
*** nenn3 has quit IRC19:39
*** alexpilz has joined #zope19:51
*** m8 has joined #zope20:01
*** Raine has joined #zope20:04
*** Raine has left #zope20:04
*** goschtl has quit IRC20:04
*** mitchell` is now known as mitchell`off20:11
*** avoinea has quit IRC20:24
*** mcdonc has quit IRC20:27
*** goschtl has joined #zope20:27
*** zhangkaizhao has quit IRC20:33
*** evilbungle has quit IRC20:34
*** goschtl has quit IRC20:35
*** TomBlockley has quit IRC20:38
*** supton has quit IRC21:03
*** tisto_ has joined #zope21:14
*** Arfrever has joined #zope21:15
*** Arfrever has quit IRC21:15
*** tisto has quit IRC21:18
*** mcdonc has joined #zope21:20
*** Arfrever has joined #zope21:20
*** zagy has joined #zope21:37
J1mmcdonc, have you given any consideration to trace logs in waitress?21:42
mcdonci haven't, but repoze.debug generates output similar to that of zope's trace log:  http://docs.repoze.org/debug/responselogger.html#trace-log21:43
J1mYeah, that's the right spirit. but not enough for me. :)21:45
J1mFor example, I often wanna know how long a request is queues waiting for a thread. (In servers w thread pools.)21:46
J1mI assume waitress still has a thread pool.21:46
J1mI 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
J1mzc.zservertracelog was a quick hack (that's lived on as these things do) that I want to replace with something more general.21:48
J1mBut I need the collaboration of the server.21:48
mcdoncright21:48
mcdonci can do that21:49
J1mHere are somethoughts.21:50
J1mI'd like to defer as much to middleware as possible.21:50
J1mI was thinking that the server could put something in the environment that middleware could optionally interact with.21:51
J1mBut not sure exactly what.21:51
J1mSome of what I want is specific to servers with thread pools.21:52
J1mNot sure how common those are.21:52
mcdoncpretty common i think21:54
mcdoncpaste.httpserver has an (optional) threadpool, the cherrypy server has one21:54
mcdoncwaitress, zope.server21:54
J1mso, what if there was an object in the environment with addrs:21:55
mcdoncin any case i can add logging statements to waitress to log to a specific logger when a task is added to the task list21:55
J1mstart-time -- the time the request started21:56
mcdoncthen when it's started, and when it finishes21:56
J1moops start_time21:56
J1mqueue_time -- the time the request is queued21:56
J1mend_callback(f) -- specify a callback to be called at end.21:56
J1mthis would be an alternative to logging.21:56
J1mOK, we have 2 approaches on the table. :)21:57
J1mfor logging, you'd need to log 3 events: start, queue and end.21:57
mgedminduring one of the EuroPythons there was a talk about monitoring web servers by some Googler21:57
mgedminone thing stuck with me: every request gets a unique id21:58
J1mThe server and middlware would need to conspire on the logger name.21:58
J1mYup21:58
mgedminthen there are log messages for start, stop, errors etc. that mention that ID21:58
mgedminever since then I wanted to have a detailed log and pretty visual graphs of this kind of data21:58
mcdoncis there also a way to get the length of the tcp listen queue hmm21:58
J1mwhich means the middware and apps need that id too.21:58
mgedminzc.zservertracelog gives me the first part21:58
mgedminI haven't got around to the visual bits...21:58
mgedminso, a unique request ID might be a nice addition to the spec, perhaps21:59
J1mWe've done some nice visual graphs using rrd driven by tracelogs.21:59
J1mso, I think we need to stuff something in the environment in any case.22:00
J1mDang, sorry, I've got a meeting.22:00
J1mI'll send you an email.22:00
mcdonci'll just make some lame event system and publish accepted, queued, finished events and also log22:00
mcdoncthen we can do whatever the needful is i think22:00
*** ajkaanbal has joined #zope22:19
*** Arfrever has quit IRC22:25
*** Arfrever has joined #zope22:31
*** Arfrever has quit IRC22:49
*** m8 has quit IRC22:58
*** AnneGilles has joined #zope23:02
*** teix has quit IRC23:05
*** m8 has joined #zope23:11
J1mmcdonc, sorry for the drive by. I sent an email.23:23
mcdoncJ1m: np.. i'll respond in a while, thanks for sending23:23
*** mcdonc has quit IRC23:28
*** m8 has quit IRC23:39
*** zagy has quit IRC23:41

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