| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Comments:
<0> through the wire <1> anyway, I'm quitting (only the channel) as the disconnects/reconnects seems to bother some people <2> phy: you can attach a signal handler for SIGINT <1> zanella, what could deteriorate more than that? <2> phy: os.signal(signal.SIGINT, somefunction) or something. help(os.signal), help(signal), man 7 signal <1> zanella, I'm sshing to my PC now, it looks ok <3> Jerub: okay, thanks. i'll give that a try. <4> do I import twisted? <2> bulio: http://twistedmatrix.com/ <4> oh, I have to dl it? <2> bulio: unless you're using debian or something that has it included <2> also, docs are here http://twistedmatrix.com/projects/words/documentation/ <4> ok <5> Hello all, What would be the best strategy to create a hierarchy objects of the same cl***, where each child may or may not overide their parent's attributes? <3> Jerub: the SIGINT is only caught when handler is installed by the C extension. <6> gojab, dynamic mixins with __cl***__ tricks.
<2> phy: huh? no, it should be caught at any time. <2> gojab: why would you do that? what's your use-case? <3> example: if you have: <3> import myext signal.signal(signal.SIGINT, x) myext.blocking_call() <3> that signal will not be caught after execution enters myext.blocking_call() (at least on OSX) <2> phy: .. that can't be right. <3> trying on freebsd now <5> I'm just thinking but I have an XML file (wurfl.sf.net) that has elements defined with subelements that are different from a referenced parent element - but each element is really the same so I don't really think I can use a subcl***. <3> Jerub: nope the ext _must_ install it's own signal handler on (osx and freebsd) <5> Kinda like defining a parent/child relationship in real terms where the generic cl*** is human. <7> Question: the 'finally: keyword' if there is _no_ exception does this still get executed? <7> andycat, if there IS an exception it still gets excuted? <7> er 'and' <5> hari`: Googling, thanks for the tip <8> shawn_work, finally executes in both cases <8> (else, why would you need a third state?) <7> ok, since im trying to debug a thread race condition in my code :-( <7> Yango: true <9> Yango: I though except and finally do not play well together <4> I can use python irclib <9> "There are two forms of try statement: try...except and try...finally. These forms cannot be mixed " <9> http://docs.python.org/ref/try.html <2> roderyk: until python2.5 <7> this is on Python 2.3 <9> Jerub: well, I'm ***uming shawn_work wants to use it now :) <2> shawn_work: finally: will always be executed. <7> you can do a try without an except I ***ume <2> shawn_work: always always always. <7> try...finally. These forms cannot be mixed (but they can be nested in each other). <7> right im ok on that <8> shawn_work, yup, if you use finally <8> :) <7> its just a 'try: .... finally: ...' <7> ok that's fine <8> thought that ****s <8> though <9> shawn_work: I understood you were doing try....except... except....finally <9> my mistake <7> for some reason my threads in python are in: <7> futex(0x802b2c, FUTEX_WAIT, 1, NULL <7> ^^^ <7> and i dont know why yet.. :/ <2> shawn_work: that's a lock. <7> yes <2> shawn_work: a futex is a really efficient kind of threading lock. <7> when i create 64 pool theads, and use only 3 of them, I have the rest held <8> is futex short for fast mutex? <2> Yango: ask rusty <7> I think for some reason, those threads that are locked aren't being unlocked somewhere else even if they are not in use <7> since the constructor initially holds each thread <8> shawn_work, the most probable reason is a mistake in your locking code :) <7> yeah, in this case, non-used threads aren't being unlocked properly <10> morning <11> hi hi hi <9> parks: evening ^^ <8> morning? are you in japan, parks? <7> Yango: ie the parent ID is 31928 and 2 child threads have 31928 and are all in a FUTEX_WAIT <8> but you don't do any locking call? <7> Yango: yes <7> I think this is happening because my queue of threads state never ends <7> so we have a stack of items in a queue
<7> while self.__tasks != [] <----- <7> != [] is also != None ? <7> aka, the list is null/empty <12> hello <12> is there any way to find the number of the arguments p***ed to a python program? <13> len(sys.argv) <12> :) <12> but isnt it a list of strings? <13> yes <12> so len works with that too.eh? <13> sure <13> len() works on any sequence or mapping <12> thanks <14> hello... is there a precompied pyopengl for python2.4 on debian ? i've been trying to compile it myself but it's a nightmare... <15> hi guys <15> where can i get access to the method called by print? <15> im trying to ***ign system = print for debugging <16> jmg: sys.stdout.write <17> When using __add__ in cl***es, one's function is def __add__(self, other), where self is the first object and other is the second, correct? <6> Yes. <17> I've just discovered OO, and I think I like it. :P <6> And __radd__ is called on the second if there is no __add__ on the first. <2> phreq: operator overloading isn't OO, it's just operator overloading. <6> That's not OO. Well, it's (O)perator (O)verloading, but that's not OO. <17> Oh okay. I was wondering what overloading was. <17> Thanks. <6> More generally, overloading is making one thing mean more than one thing based on context. <17> Second question... I'm trying to write a cl*** for unit manipulation, because I can't find any modules already written for it. Am I overlooking a module tucked away on the net somewhere? <10> of course <10> you can overload .__add__ to do whatever you want <10> roderyk g'day <10> shawn None and [] are not the same <18> let's beer with music! <19> hi, i opened an existing file on windows (python 2.4) with mode 'r+b' - while writing to it all occurrences of hex 0A get preceeded by 0D, which together is the windows linesep combo <19> does anyone know how to suppress that? <4> http://rafb.net/paste/results/jsuAOP20.html <4> anyone know why that doesn't connect? <20> cmd: use the os module perhaps <19> thanks, i'll give it a try :) <18> cmd: does the existing file have \x0d in it? <10> bulio what error does it give... <20> os.write() it appears <4> no error <17> Am I confused? I thought open(,rb) was binary read? <4> parks: it just doesn't connect <10> phreq what platform? <18> phreq: "r+" is read/write <10> theres no such thing as "binary" mode unix <18> parks: there's still "binary" mode, and you should still use it on unix.. it's just that binary mode = text mode on unix <19> mcmillen: yes it has <10> bulio does it throw an exception... <4> parks: nothing <21> hiya <4> Enter the real name of the bot: bulio-bot <4> after that it just waits <19> mcmillen: i think i got you wrong, its not that i've mistaken an existing 0D for the one located before the 0A, it really gets there on writing <4> this is annoying <17> parks, mcmillen: os module w/ Ubutnu Linux is the platform, and thanks mcmillen. I didn't know that. <10> bulio sure its not stuck in irc.process_for_ever() ? <17> I love Python. <10> phreq warts and all? <17> parks: We're past warty. Now it's the Breezy badger. ;) <17> And it gets better, next it'll be Dapper Drake. :P <6> I have to say, the names are the worst part of ubuntu. <17> Bah, I love 'em. <10> phreq pyNumeric ? <17> Computing should be fun. <10> as for units ... metric baby <22> Is there a way to have python return a list of available methods for a user defined cl***? <10> help(cl***) <17> pyNumeric looks helpful for vectors, at least.
Return to
#python or Go to some related
logs:
#awk mp3 won't play in sterio #fluxbox #xorg turbogear connection pool
ubuntu install kde emerge-xdm #perl mencoder 3g2 sync #gentoo
|
|