| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
Comments:
<0> if you want it to block, remove the timeout argument... <1> What's the default value? Zero? <0> toxik: no... None evaluate to False, in this case, like 0 <2> still IF that would've been the case, it isn't supposed to return it in the read list <2> yeah yeah, whatever, I removed it anyway <3> from the docs: "When the timeout argument is omitted the function blocks until at least one file descriptor is ready. A time-out value of zero specifies a poll and never blocks." <4> CardinalFang: Default return value, supposing there isn't an explicit return? That would be None <2> benji: still not the problem here <1> Heh. No, the default timeout. <5> Damn. <5> Still my rendering sorting algothrim is not going well. <0> CardinalFang: there's no default... it blocks until there's something ready <2> that's the thing. it's returing a socket immediately <0> toxik: the socket is ready then... <2> no, it isn't <2> calling accept() on it returns an error
<2> and it shouldn't be ready unless someone connected, and trust me, no one did <2> not 10 times in a row in any given moment <1> I'm accustomed to the Unix select() semantics. NULL = forever. 0 = poll, never block. <6> hey all, if i upgraded new libmysqlclient to 4.1, how can I reconfigure the DBI so I can connect ot it w/o getting "Client does not support authentication protocol" ? <2> CardinalFang: I was too, but apparently it's wrong - still I removed it so it doesn't matter <4> CardinalFang: NULL _is_ 0, at least as far as C is concerned. <0> toxik: no, it's right... I am wrong <2> just leave that last paremeter subject, it's not what is being wrong <1> Arafangion: It's a const struct timespec * . <0> toxik: your socket is not listening... try calling listen(backlog) first <2> werneck: oh .. silly me >_> <2> I removed that startListener() crap and I didn't think of adding the listening part back :P sorry <0> toxik: you forgot bind too <2> yeah, that whole def is gone <2> thanks again <0> np <2> werneck: It works, thanks a bunch again - truly gratefull <1> L33TrDaNu: Why 4.1? Isn't 5.0 Teh Goodness? <7> is there a function that can be called which gives a read-eval-print loop from stdin/out with the locals where where its called? <6> CardinalFang: cause 4.1 is in debian sarge <1> Ah. <2> L33TrDaNu: this problem arises when your mysql client library is out of date <2> L33TrDaNu: upgrade your libmysql <6> CardinalFang: but.. i downlaoded python use apt-get install... i am thinking i have to recompile drivers for Python::DBI ? <6> toxik, libmysqlcient is upgraded to use 4.1 <2> if they are linked; very probably <6> toxik: ah ok, that makes sense I suppose <1> L33TrDaNu: I'm not claiming _anything at all_ about that auth problem. i don't have a clue about it. I was merely curious about the version, for selfish reasons. <2> yeah, I'm originally a PHP developer (which is why you are having all these weird questions from me :P) and I've seen that error A LOT of times, and I don't mean like once a day, I mean .. at least 10 times <6> CardinalFang: you selfish bastard =) (jk <6> ) <6> =) <1> I'll have to embrace MySQL very soon, with a p***ion, so I'm just trying to get a feel for its usage. <2> why? <2> MySQL is a toy DBMS <1> It was a toy. It's getting better. 5.0 is pretty good. 5.1 will be even better. <2> how many times have I heard that too... :P <2> I mean, just look at those laughable constraints <1> I say this as a PostgreSQL devotee, who is starting work at MySQL AB in two weeks. <2> Oh.. I guess you do have a clue then :P <3> I disagree toxik, it is a tool that has its place (as all tools do) <2> my impression of mysql aren't the best tbh <1> toxik: Mine either. It was awful when I first used it, long ago. (~1996?) These days, it's as good as PostgreSQL in most areas, and better in some. It was playing catch-up. Now it's just p***ing it. <1> Anyway -- sorry to hijack the topic. <2> hijack away, I just want to discuss ;-) <2> another python question then: how do I know if an object is an instance of this or that subcl***? <1> isinstance() http://python.org/doc/lib/ #builtin functions <8> hi to all <6> CardinalFang: ok, problem is that , the server is running Debian stable and the developer is running Debian unstable <2> argh, this is the third time I ask today: How do you unindent in vim? <8> i have a GtkTextView i'd like to have a variable to store the current char number insered in the box... putting a signal on key pressed i had bad result any ideas? <9> toxik: backspace? <2> doesn't work <1> L33TrDaNu: Newer client libraries should work with older servers, I would think. Sorry, but I doubt I'll be much help, yet. <2> it just erases til the current indent level <1> toxik: << <9> toxik: try using insert mode... <2> AcidReign: arf.. I know what I'm talking about
<2> CardinalFang: Thanks a bunch <2> hmm <2> I have another question about subcl***ing sockets <0> toxik: but, honestly... unless you really need it, don't check if an object is an instance of this or that cl***... <0> toxik: instead, check if it has the method/attribute/interface you need... <2> When you call accept from a subcl***ed socket, how do I then make that returned socket an instance of a subcl***ed cl*** instead of the original socket object? <2> werneck: good idea <1> We call it "duck typing". Check to see that the object you're holding has a bill, feathers, and webbed feet. Don't test its DNA for duckness. <2> werneck: then issubcl***() is better? <0> toxik: ops... that's why I used a BaseSocket cl*** instead of subcl***ing socket on that code <2> ..oh.. :P <2> werneck: and thus the reason for having a socket attribute? <10> i'm looking for a parser for config files (forget "ConfigParser"). PyPi tells me "cfgparse", "config", "ConfigObj", "Dict4Ini", "tconfpy". any recommendations? i only need simple functionality and the config files should be human readable. <11> wxPython cl*** for a single line text box? <0> toxik: redefine the accept method on the listenerSocket subcl***, and inside it, wrap the accepted socket in a clientSocket instance <2> so first overload the accept(), from it return a clientSocket(socket.accept())? <3> biopyte, I've only used ConfigParser, why do you find it unacceptable? <0> toxik: yes... that's it <2> werneck: okay, I'll see if I can get that to work <2> (shouldn't really be hard/long?) <0> toxik: don't forget that socket.accept returns a (socket, addr) tuple <2> good point <0> toxik: no... it's easy... <2> I got to 3 lines of code including the sign <10> benji, maybe i have not understood the underlying principle of this module, but its making trouble all the time. if i read a config file, modify it and write it back i loose my data or have to apply "tricks". <3> sorry, biopyte, can't help you there: "it works for me" :) <10> biopyte, i'm messing around with it quiet long now. <10> i mean, it should be trivial, not worth even mentioning <2> hmm, issubcl***() can only operate on cl***es, how do I know if an object is a subcl*** of something then? <10> benji, whats your basic code, if you do the following: "read config file, modify options, write back" ? <12> took: an object isn't a subcl*** of something if it isn't a cl*** <12> took: i suspect you mean isinstance <8> i have a GtkTextView i'd like to have a variable to store the current char number insered in the box... putting a signal on key pressed i had bad result any ideas? <12> toxik: sorry, that was for you... <0> toxik: isinstance(), but what exactly do you want ? check if a socket returned by select is a listener or client ? <3> I don't do the "write back" bit, so I may not be running into the same problems you are, other than that I'm just using the published API in a straight-forward way <2> werneck: exactly that <2> joedj: yes, I'm having a hard time to express myself :\ <10> benji, you use it only for reading, not for writing options? <3> right, humans write, sofware reads; I don't have a need for the sofware to write to the config <13> what is the best python framework to do web applications (like rails for ruby) ? <2> Ruby on Rails <2> (is the name) <10> benji, well, thats a different case. read-only works for me here, too. <2> werneck: so I'm supposed to use isinstance() anyway? <3> I do know that the built-in ConfigParser has some short-comings for that use case though, I'd recommend ConfigObject just because it seems to be the most popular <14> Hmmm, anybody heard of managing CUPS with Python? <14> I know there is a CUPS API, just wondering if there is a python module for it <10> benji, k <3> kristalino, it depends a lot on your app <13> benji, the most similar to Rails, that's what i need <0> toxik: yes, it's ok to use it... but as CardinalFang said, this is not the best solution... check for some attribute, not for the object's type... <3> don't know that, kristalino; but that seems like a silly requirement <2> werneck: like what, interface? <1> toxik: if hasattr(critter, "quack") and hasattr(critter, "feathers") ... <0> toxik: yes... <2> well.. thinking of the lines of speed, just cheking for feathers would be OK as long as it's unique <2> CardinalFang: wouldn't it be better to check for what I'm going to use? Like, f.ex. checking if it has an accept() method <1> Give that man a Kwepie doll! He wins! <0> toxik: that's the idea, but since both subcl*** socket, both have accept method <15> ok i spent the last 3h trying to display a time nicely in c++... you can laught :) <2> werneck: that's also a good thought <15> and still not working :) some int64 issue i dont get :) <2> that was smart.. <2> socket.accept() from listenerSocket.accept() calls itself >_> <2> how would I call the parent then? <1> Kl***name.method(self) <2> yeah, and it decided to call itself instead <1> That was my answer. What's the relationship between your objects/cl***es? <2> http://deadbeefbabe.org/paste/2834 <2> it apparently decides to call the overriden method instead
Return to
#python or Go to some related
logs:
lun stuck at 0h problem ubuntu dapper wireless wep 128 raaga on ubuntu Debian + Marvell 88E1111 #web z990 flops #ubuntu perl pros cons Login.app XF86Config-4 #python
|
|