| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Comments:
<0> it uses threading, not thread <1> gzl: What's the source of your list of tuples? <0> * Pythy, that doesnt help <0> :( <0> can someone help with thread, not threading? <0> http://pastebin.com/624101 <0> thats my code <0> thread.start_new_thread(def, tuple) doesnt work <2> what error are you getting? <0> sysfault, no error <0> it just doesnt run <3> Whats the function to turn a float into an int? <0> eugman, int(float) <2> int(float) <3> thanks <0> sysfault, you can see i added 5 lines that print "asdf"
<0> which it doesnt <2> r00723r0: is serverfile empty after the readline()? <4> is there a way to make ConfigParser not lowercase my keys and add spaces around the '='? <0> sysfault, no <2> how do you know what serverfile contains, how are you ensuring it isnt? <2> dict insuring* <0> sysfault, because i did .readline() every line before <0> and it worked <0> sysfault, the problem is not reading the file <0> the problem is making the thread start <0> the "asdf"'s dont print <0> you see what i mean? <1> Kosh: And if there was a chance where a more-general solution than what was requested might ever be needed (I'm curious to see gzl's answer, to learn if there's even a remote chance of that here), my earlier solution is as general as yours. <0> sysfault, ? <0> ...? <0> sysfault? <5> Pythy: your imap one I am fine with , just not the most recent weird one <5> Pythy: I have just found from experience that you can't know that in 5 years the fields will need to change <0> can anyone help with thread? <1> Kosh: We'll have to wait on gzl's answer to find out. <0> goddamnit if someone helps me with thread ill leave quicker <5> I don't use threads, I can't help you <0> anyone else? <0> want to get me out of here faster? <5> it doesn't look like anyone on right now knows the answer <5> most people don't use threads <5> they usually just make the problems worse <0> are you kidding me? <5> and it won't perform any better <0> most people dont use threads? <0> lol. <5> no I am not kidding you <0> kosh, well then most people dont write applications <6> kosh: that's a slightly inflamatory statement about threading, even if I tend to agree that they make things more complicated in most cases. <7> threads == trouble <0> threads ARE troublesome but threads are important <6> with an async framework like Twisted, threads become a joke <1> Kosh: For example, if those are key/value-pairs from a dictionary, I don't expect them to one day soon grow a third value. And if his design changes that radically, then, swapping one solution for another here is the least of is his troubles. (Also, note my "*if* speed is an issue..."-qualifier. He gets to chose the more appropriate answer.) <5> danderson: I would say about 5% of cases that threads are used that they are good idea for <0> danderson, because Twisted is threaded.... <5> umm twisted is not threaded last I checked <6> same here. <0> quite basically anything that is async is threaded <0> because its fork()ed <6> Twisted is specifically *not* threaded <6> that's the whole point of twisted <5> r00723r0: you are confusing things <6> a single reactor, blocking on all events from the whole app <5> threads mean something very specific <6> and handing events out to callbacks when needed <0> threads are VERY broad <6> (and with a great Deferred system to handle all that gracefully) <5> twisted is an async framework <5> no threads are not broad, they mean one particular thing <0> how could it be async without threads? <6> clever design. <0> please explain, im listening <6> The way people used to do it *before* threads <5> threads do not refer to multiprocess apps for instance and they are most certainly async and scale <6> r00723r0: you know select(), for blocking over multiple sockets? <0> ok, fine, multiprocess
<0> yes, thats fork()ed <5> actually I don't know of any good way to use threads with imperative style languages <6> Twisted is the same, for more general events <0> and fork() basically means threading <0> it starts up a new thread <6> no it most certainly doesn't <5> fork DOES NOT MEAN THREADING <6> it involves a host of different problems and solutions <5> they are entirely different <0> ok, ok, i dont care WHAT threads are <0> i need a solution to my problem <5> they have entirely seperate address spaces, how memory is used etc <0> thread.start_new_thread(def, tuple) does not really... <0> work <0> even though it works in the python cli <5> to be honest I am surprised you can put def in there and have it work <5> since def is a builtin to create functions <0> yeah. <0> but i wanted to separate it <0> it makes reading code easier <5> no the point is that you should not use the word def <0> kosh, it requires a def <5> you should not use tuple either <0> im sorry, arg1 and arg2 <0> please stop being so pedantic <8> r00723r0: it matters <0> MFen, you know what i mean though <8> r00723r0: it seems pedantic until you've seen people make this mistake time and again and come in here asking for help fixing syntax errors <5> r00723r0: most bugs come from these kinds of issues and I did not know what you meant <2> it was an example. <8> r00723r0: yes, and nobody blames you for typing that, but don't, because it confuses the issue <0> i dont have a syntax error, though... <2> he's not using 'def' within the start_new_thread() method. <0> im using a def <0> but not "def" <2> a function, but not 'def' <0> yes, thanks sysfaul <2> im looking at your code. <0> t <0> sysfault, ahh, ok <2> too vague. <9> hey if I have a string that represents a member variable in a cl*** instance, what's the proper way to get the value of that member variable? <1> getattr(p, 'mtd') <5> getattr(self, stringnameofvar) <0> whoa... <9> ah right, of course, thanks. <0> python is cool. <4> how can i make ConfigParser not lowercase my keys and add spaces around '='s? <5> remember the purpose of source code is to communicate with other people and yourself later so make it as easy to read as possible <0> kosh, me? <5> just in general <0> right <5> longer variable names make it clearer what you mean and easier to debug and figure out later <0> kosh, my variable names arent vague to the least bit <4> i've got things like self.applications.visible_tree, self.apps.vtree would be less typing but harder to figure out later <4> :) <2> r00723r0: sure they're. <0> really...? <2> write, and read are file object methods.. <2> and tons of other modules. <2> pretty ubiquitous, not really distinguishable. <0> so any luck? <2> process of elimination may help, write a small script with just the threads, use the same method, and see if it works. <0> can i write inline defs? <10> good morning <8> r00723r0: if your function can be made a single expression, you can use a lambda for your 'inline def' <8> r00723r0: if not, you can put a def statement anywhere you want <2> evening parks. <0> awesome <8> and it will exist inside that scope <8> r00723r0: ditto cl***es <2> last game of americas-army for at least a month.
Return to
#python or Go to some related
logs:
#python supaplex ubuntu linux-k8 ubuntu named.conf dlz pydev UTF-8 greek troubleshooting mupen64 gentoo cartoon strength of ten bears
kdelibs missing keyword gentoo #perl #linux
|
|