| |
| |
| |
|
Page: 1 2 3 4
Comments:
<0> there are worse things than dying <0> for instance, having one of your children die <0> or losing your penis <0> lol <1> having one of your children die gets you a free room for your cactus collection <0> the ***hole side of me is laughing, the father side is crying.. You sir are a genius <2> wow <2> It's not cr*** if you involve cacti. <3> it's just plain cl***y <4> lo ? <4> anyone here know how I can get some pyGTK code to loop? <4> if I put a white(1): and some code in my program the gui doesn't load :( <5> do you ever call gtk.main() ? <3> GUIs are event driven, so if you hog the CPU they won't work <3> you need to either make your looping code event based or put it in a separate thread
<5> or make it return control to the main loop every once in a while, ***uming it's being called from gtk <3> that would be making it event based :-) <5> uh, what? <2> unregulated loops are usually evidence of a poor design decision. <2> not always, but often. <3> what you were suggesting was consistent with the first suggestion I made <3> making a while loop stop periodically and respond to GUI events to continue IS inherently making it event based <5> I was saying make the loop return periodically <3> and GUI events tell it when you can restart -- that's event based <5> ok, fine <3> I'm not being difficult, it really is the same thing :-) <3> taking a loop and making it state or event based involves the same effort <3> except when you have coroutines or continuations ... <5> yay for coroutines <3> Python's generators would help the conversion, depending on the task <5> it's pretty easy to make pygtk call a function all the time though :p <6> hey, could someone give me a hand about how to access a value from the parent of a cl***? http://rafb.net/paste/results/p0QBHA26.html <3> sure, getting called by the GUI framework isn't the task, it's unfolding your loop into a state-based system that's the (potentially) hard part <3> Kallahar: those cl***es aren't related at all <3> did you want clsB to be a subcl*** of clsA? <6> hmm, I'm not sure, ... I want B to be able to access the values in A <3> you can do it explicitly as: clsB.val <6> would that get the correct parent if there are multiple clsB's defined in clsA? <3> there is no "parent" relationship here <6> hmm <3> ra_b is just a local variable to clsA's __init__ <3> it goes away when __init__ exits <6> okay, even using self. it still doesn't work though. <3> if you want clsA to contain 1 or more instances of clsB, and then have those clsB instances access their containing clsA instance, then you're going to have manage references yourself <3> because with self, it's an instance attribute -- the attribute still has no knowledge of what it's contained in <3> you have to manage that yourself if that's what you want <6> ahh, okay, I see <3> also a = clsA doesn't do anything, that makes a reference to the cl***, it doesn't instantiate anything <6> now, what if I want A has a value that changes, is there an easy way to have that value always also correct in B? <3> if each B has a reference to A, it can delegate through it, yes <6> okay, what should I search for for how to do that? :) <3> just have clsB take an argument that is an instance of a and save it in its attributes <6> oh, okay, that won't p*** by value? <3> nothing is p***ed by value in Python <6> ahh, okay. <6> I'll keep plugging away at it, thanks for the clarifications :) <6> woo, it worked :) <7> what would be an easy way to subtract the current time from a given absolute future date/time <7> and get a result in days/hours/minutes etc <8> convert time into epoch <8> and do the arithmetic in epoch <8> then convert it back <3> the datetime module lets you do arithmetic portably <3> he wants a difference in times, not an offset from a particular time <9> I love python <9> I just thought I'd say that <9> absolutely the best language I've ever coded in, and I've used many <10> phusnikn: howdy <9> does anyone know about how to become more active in the python community <11> i like python but i have trouble because i'm used to php and how it has an intrinsic function for everything you can think of <9> maybe help with coding or something <10> phusnikn: i think metagon is mistaking me for you. You're the only nyc sysadmin in #c I can think of <9> cuz I'd love to help further its success <9> it's amazing
<9> what's funny is when I used the language years ago I always wondered whether or not it would pickup steam <9> cuz at the time it was a little known language <9> now it seems to be really getting somewhere in the developer community <10> I think python's about 15 years old by now. :) <10> But it didn't really catch on fire until 5-6 years ago, I'd say. <9> I dunno how old it is, I started using it about 5 or 6 years ago <9> yeah <10> Bingo :) <9> about the time it started catching fire <9> haha <10> I remember Linux Journal having an entire issue about Python once <9> you know, I actually have a knack for that <9> I always tend to pick up on things just as they are about to break it big <10> And they had this naked pianist on the cover, as in the Monty Python skit, and there were hundreds of complaints. <9> haha <10> Probably all Americans. ;) <8> SgtUnix, yeah hehe <10> Americans are a diverse lot, though <8> SgtUnix, long time how you been <10> fine fine-o dude. Haven't seen you for a while <8> yeah been mostly on freenode <8> but float back to efnet every now and then <10> hanging out with zhivago and noss? <10> ;) <9> haha <9> americans are diverse, I know cuz I'm one of the non-mericans <9> but <9> a lot of us are morons <9> I'll grant you that <9> I'd maybe even go as far as to say most or the overwhelming majority <9> it's cuz america is kind of, isolated, I dunno <9> it's so full of itself <10> I keep hearing that from americans on IRC <9> see, like where are you typing from? <3> all generations are stupid -- including this one <10> given the fact that a lot of clever things actually came from America, i'd say you guys weren't all lost :) <3> Americans don't have a monopoly on stupidity <10> exactly <10> humans are evolving though. in 500 years we'll be a lot smarter. <10> Although, still able to destroy ourselves completely. <9> what really insults my intelligence is this so called "debate" on evolution <3> humans are exactly as smart today as they were when they first showed on the planet <10> oh yeah. Didn't people settle on this stuff in the mid 20th century? ;) <9> I'd love to slay all the ignorant fools that think that evolution is some scientific hypothesis that some bozos cooked up to mess with our heads <3> raw intelligence hasn't changed, just knowledge <9> xihr: didn't earlier types of humans have smaller brains and such <3> they weren't Homo sapiens <3> i.e., they weren't human <3> those were a different species than you <9> well, technically we are homo sapien sapien <10> xihr: Hm, yeah. I suppose raw intelligence takes a lot more time to change <9> so <9> if you wanna limit it to that, then yes <9> but, I think other things might have been at least kinda human <3> H. sapiens sapiens, you mean <9> haha <9> we are just cl***ifying things, there <3> if you want to define things as human which weren't human, then the answer is yes <9> maybe we haven't evolved in 500 years, I'll agree with that <3> but that's not what biologists mean when they say "human" <9> so I guess I can just leave it at that actually <9> haha <9> I think we might be using more of our brains now tho or something <9> or maybe less =) <10> it seems like some people are using their brains less, some people are using their brains more than any of their ancestors did. <9> SgtUnix: you in Europe? <9> cuz what I was about to say is I think America is unlike the rest of the world <9> I don't know why Canada isn't like us, maybe because Britain was heavily involved with them for a long time <9> and they have their french population, etc. <9> but, I think America is unique because it is kind of isolated almost on all sides by people that are unlike its population makeup <9> we are a true manufactured country <9> and we have grown this country's concept
Return to
#python or Go to some related
logs:
#politics cumfiesta passdump passb0t katami allegations suv red slash circle geforce agp7800 latinporn #politics #bsd #nhl
|
|