| |
| |
| |
|
Comments:
<0> how come x = ['a', 'b'] then x.append('c') does not provide x = ['a', 'b', 'c'] ? <0> nevermind... <1> Uh, it does. <0> :D <0> ok, this is what was screwing me up: <0> x = ['a', 'b'] <0> print x.append('c') <2> yes <2> mutating methods return NOne <0> fair enough
<0> mutating meaning it changes the object <2> yes <0> good stuff, thanks :) <3> gaa <3> how to print integer with leading 0? e.g. 01 instead of 1 <2> '%02d' % x <3> ah, was doing %01, thanks xihr <3> hmm <3> is there no way to "freeze" a list so that I can hash it? <3> I have a list of lists <2> convert it to a tuple <2> (recursively) <4> is there a way I can do a dns lookup without blocking or starting a new thread? <2> it's certainly possible but I don't know if there's anything available in the standard library for that <4> there doesn't seem to be <4> I'd be happy with an optional library <4> I can't find any documentation for any python dns libraries <2> I don't know of one offhand <2> the calls in socket are just wrappers around the C library routines, which also definitely block <4> yeah <4> I've managed to move to nonblocking sockets, but that doesn't help the dns <2> typically in C apps it's done in a separate thread or tasked for later, etc. <2> or a separate process <4> I'm doing the separate thread thing <4> but apparently threads take a lot of overhead.. <2> in what sense <4> writeable memory <4> whatever that means <4> I'm told it's important <2> well you can measure the memory increase but it's unlikely to be catastrophic <2> if one thread is going to kill you then you shouldn't be using Python in the first place :-) <4> it's more like 6 threads <2> still, no big deal <4> because of doing the dns lookups at the same time <4> it's 8 MB of writeable memory for every thread open at the same time <4> and it never goes down when the threads are done
<4> if I can save 8 MB of memory, I should :p <2> well I'm not sure where you're getting your numbers <4> I'm not either <2> I have an app that spawns up to 10 concurrent threads and I see its memory footprint range from 14 MB to 30 MB up and down as threads are created and destroyed <2> a bare Python interpreter takes 5 MB <4> pmap apparently <2> like I said, if you're really this concerned about memory, it's likely that Python (or any other high-level language for that matter) is the wrong choice in the first place <4> things like dynamic behaviour are much more important than memory <4> also, now that I'm in the threads-killing game, no amount of evidence or logic will convince me that it's ok to leave the threads <2> I have no idea what you're talking about at this poitn <4> I'm talking about the fact that I'm now more out to stop using threads out of spite than actual performance anyway :p <4> even though the performance concerns still exist afaik <2> I just proved that they don't exist to the extent you thought they did <2> it's not like starting a separate process for each DNS lookup is going to be less expensive <4> true <4> but there's no reason I should need to do either of those <2> then you'll have to write your own DNS lookup library <4> how are you gauging the memory usage on your program? <4> "gauging" may be misspelled.. <2> top <4> what does top tell you? <4> physical memory <4> the problem is I don't know what any of this stuff means :p <4> I just go by what other people tell me <2> wheeeeee <5> hello <5> hi <5> hey <5> woo <5> someone has a great link to a nice tutorial to glade + python? <5> google is not showing me love <6> thy shalt loveth the Google before it loveth you. <5> i found it i think <5> you are lucky you have looks <6> heh <7> is there any module in python that talking with PPT ? <6> PPT? parallel port? <7> PowerPoint <7> MS PowerPoint <6> no idea, i don't use powerpoint <7> i see. <5> omg omg it works
Return to
#python or Go to some related
logs:
gentoo freeze.py mrskin wordlist
delphi String.Format
#beginner florecent light max #freebsd #nhl dweckl chicago pc400 system board m925lr illegal mexican crossing the boader
|
|