@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet


Comments:

<0> when I've seen that it's always shown the exception it's ignoring
<1> nope :/
<1> and it's not in the open() call
<1> i've printed something after it and it's fine
<1> hmm
<1> it occurs inside the loop
<1> shouldn't it occur in connect() instead? i'm thinking it gets an invalid socket and tries to use it
<1> ok, it was something else :/
<1> hmm, no
<1> i'll log off and try to debug it, thanks for your help



<1> bye :)
<1> hello again
<1> xihr, are you here?
<0> y
<1> hi :P
<1> i need some insight (again)
<1> hello?
<0> y
<1> ok
<1> i want to add a server to my client
<1> so someone can connect and see what's being get/sent
<1> like a proxy server, but reverse
<1> the program will FIRST act as a client, then if anyone connects to it it will relay
<1> do you think it's better for me to write the data in the output buffer of the server and send it when it's available, or to monitor when the connection exists and send it then?
<1> actually that sounded a bit dumb, i think monitoring is the way to go
<1> ah, i have to go, later all
<2> anybody out there willing to give some advice on an https connection issue?
<2> specifically trying to automate the login to a secure site. I've gone through the Voidspace article on cookielib and urllib2, used their examples, but I don't seem to be able to maintain the login...
<2> nobody out there? :-(
<2> anyone here dealt with session cookies before?
<2> or at least know a ref source I can start with?
<3> http://www.cs.virginia.edu/~lab2q/lesson_7
<4> firephree: have you checked out e.g. RFC 2965 already?
<2> looking at it now.
<2> lost my VNC for a minute there.
<2> cookielib doesn't handle these sessions, does it.
<2> drizzd, I like it, but I'm trying to set it up from the other side.
<2> as a client, logging into a site with a script and maintaining the session so I can 'browse' the site. From what I've read, I'm guessing it's something in the Headers that I have to send back with each new request,
<2> but I'm not really sure what I need to send exactly...
<4> firephree: the RFC explains it, pretty much
<4> firephree: cookielib seems to be a library for the client-side
<2> right, which is what I'm looking for.
<2> I'm trying to maintain the session ID's for the login.
<4> CookieJar seems to talk good with urllib request/response objects
<2> isn't that the same as cookielib?
<2> that will maintain a normal cookie, and it seems to mostly work, but not when it comes to handling a session cookie.
<2> I didn't think there was much of a difference, but it seems there is.
<4> what's the difference between a session cookie and a normal cookie?
<4> AFAIK some cookies are just requested to be stored for X hours or days. And some are expected to be stored in memory only while persistent storage can be requested for others



<2> right, but from what I've read so far, a session cookie is just stored in memory and is dropped when the browser closes.
<4> but doesn't the cookielib at least store the cookies in memory (on CookieJar which is a container for Cookie objects)
<2> I thought so, but, no joy. I still get an error trying to access subsequent pages.
<2> rather, not an error, but I just get dropped to the login page.
<4> you could check what gets sent over the tcp/ip connection yourself, use Ethereal or something
<2> hah. now, this I don't understand...
<2> oh, the script I've got so far shows all the headers being sent, set cookie this, read that, etc...
<4> the HTTP requests are plain text, you can read them using any network sniffer
<2> now, I've been doing urlencode on the post data, and sending them to the 'login' page, expecting a cookie back that I can use...then I could use that cookie to access other pages...
<4> yeah, so if cookielib doesn't work check out what gets sent/received and compare that to a session of e.g. a browser that does cookies properly
<2> didn't work....everything returned the login page...
<2> now, if I request the page that requires the cookie...and then request the login page...I get the page I've been looking for.
<2> yea, I figure I probably have the sessionID being given to me, but I just need to include it in every page request...
<2> crimney...it seems like it's working, but I don't understand how...
<2> crazy crazy http...
<4> yes
<4> you need to send the Cookie: headers in all requests you make
<4> you keep a list of cookies you've received and then include that list in any request you make
<4> that's kind of the whole point of managing session data over a stateless connection ,-)
<2> right. and cookielib was handling that, I thought...you use the build_opener in the urlilb to create a handler that will always send the cookies.
<2> just didn't seem to be working.
<2> not sure yet where I'm going wrong, but it looks like it might be working.
<2> I just need this up today.
<4> ok. the source is there for the most part -> you can dig yourself and see what's going on behind the scenes
<2> yea
<2> and I'm trying. just this http protocol stuff is really new to me. i'm still the stupid.
<2> thank god for python. if this was anything else, I think i would've given u palready.
<4> http is pretty much as simple as it can get, so you won't feel stupid for long ;)
<2> :-) thanks.
<2> next, I'm going to have to make this thing a server side script. ahhh, the fun never ends!
<4> hmmm
<5> Hey.
<5> Would anyone have done anything with Differential Evolution here? I just don't get why there are "generations" rather than just a long priority queue.
<4> hund: googled up DE; wouldn't that just be an implementation detail?
<5> I'm not sure. It would certainly work differently -- a candidate has to be better than the worst in the set to survive, rather than being better than its parent. Which is closer to actual evolution, which is "death of the unfit", not "survival of the fittest".
<4> True
<4> basically that boils down to the selection strategy
<4> (Though those who set optimization problems usually prefer solutions that are fittest on some level, rather than a lump of solutions of which none is utterly bad:-))
<4> a priority queue might cause the "genes" to find and stabilize on a suboptimal solution too soon, I think
<4> or at least that's probably one reason the selection isn't too harsh
<6> hi, is it possible for a python script to control a flash animation, in linux?
<7> Hi. I'm a bit of a slow kid and Im trying to update python from 2.3.3 to 2.4.2 but it's not quite being friendly. it's just not updating my current install.
<8> is it possible to make os.chmod() recursive?
<8> i mean to include all subdirectories
<4> moralcode: maybe you could use os.walk()
<8> hmm, thank you going to look into that


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #python
or
Go to some related logs:

#linuxhelp
sikiiş
#computers
I pissed in the world
#fedora
#flash
#computers
#beginner
connie rice/lesbian
stormgodess



Home  |  disclaimer  |  contact  |  submit quotes