@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet


Comments:

<0> ok rewrote the damn thing from scratch
<0> and now now problems whatsoever
<0> using asyncore and asynchat
<0> i didnt even know about asynchat :)
<0> but now is sooper small footprint and fast
<1> LOL
<1> yea, asynchat is nice too.. I wrote a basic little app with it.. mainly testing stuff
<0> yeah part of the problem was i was using two dispatchers for each client and server, not realizing there was a specific asynchat for protocoling up a socket nicely
<1> weird with that mem leak before though
<0> yeah the leak was in my use of the asyncore dispatcher



<0> the documentation on asyncore is really lame.
<0> i may actually take a stab at rewritting it
<1> Yea, it is pretty bad. To really get a handle on how to use it correctly (I guess) was looking at example code found with google
<0> my new pickling server is now less than 108 lines of code, and very small footprint
<1> nice
<0> yeah that's what i did.. btu apparently i chose a poor example :)
<0> so now i just need a threadpool implementation
<0> for the retriever so it launches and works with a specific number of threads
<1> so the server just listens for a connection.. accepts it, receives processed data, gives unprocessed data, closes connection?
<0> no connection is reused
<0> :)
<1> Ahh, so it stays
<1> Cool
<0> each instance of the client reuses the socket to the server for ther equets/responses
<0> and received different types ofg objects from the server edpending on what its supposed to dfo
<1> so the server just keeps giving chunks of data to process
<0> eg.. process somethign.. sleep.. launch more threads.. die.. etc
<0> so server will send like.. Retriever.Request, Retriever.Wait, Retriever.Die, Retriever.Launch
<0> client sends Retriever.Info and Retriever.Results
<0> so master can control the individual slaves depending on how fast their retrieving and processing
<0> so it can self regulate/throttle/etc
<1> yea.. pretty slick
<2> Have a nice evening everyone, bye!
<0> http://pastebin.com/740134
<0> does that look like a reasonable way to prefork?
<3> why are you forking if you want to use threads?
<0> apparently that's not a good way to prefork
<0> LOL
<0> as i had a runaway forking process in an infinite loop
<1> whee
<0> was due for a reboot
<0> actually how/why that ran away i have no idea
<0> http://pastebin.com/740134
<0> looks ok to me
<4> hi, when i am stepping through a program in the python debugger, is there anyway to time how long it takes to execute the next statement (with '(n)ext') ?
<0> is it ok to override loop() in asyncore?
<1> LOL
<0> lol
<0> seriously..
<0> i want to do some routines every N minutes in my server



<0> id like to put that logic in loop() unless there's a more normal place for it
<1> have you checked the source for loop()?
<0> well the problem i see there is the select will block.. sooo.. id have to make a thread that connects to the server ever N minutes to wake it up
<0> lol
<0> or signal an ALARM or something
<5> you can set a timeout..somehow..I think..
<0> oh yeah i see
<0> i just do: asyncore.loop(timeout = 5, count = 1)
<0> in a loop
<6> night guys
<6> and thanks :)
<1> night all.. enjoy your holiday weekend
<0> -cya
<0> is there something i can override in an object so that comparison works differenetly?
<0> so that if i have two separate instances of an object, they will compare equal if they are the same internally?
<0> so i can do: if obj in obj_list:
<0> like a __compare__ or something?
<7> no
<0> oh, yeah there is.. __cmp_
<0> __cmp__
<0> and __equal__
<7> I'm almost certain that won't affect if obj in obj_list
<0> yeah, does.
<0> is it not supposed to?
<0> works just fine
<7> herm
<7> actually, it should
<7> I just didn't think about it enough :P
<0> ok lol
<0> thanks tho
<7> and using 'in' like that would be confusing after awhile
<0> better alternative?
<0> seems the cod reads quite cleaner
<0> than for obj in obj_list if obj.value == value ret true
<0> aloha
<8> hmm.. i'm about to use python's smtplib. but i don't have sendmail setup on my dev/home computer (and probably couldn't get very far because of my ISP restrictions). any suggestions on what i can do to test these emails
<9> hy
<9> where i can find a py compiler?
<10> psyco.sourceforge.net
<9> thanks
<11> hi, i'm looking for a way to convert utc to local time and vice versa... this will be for use in storing with sqlobject
<12> re
<0> aloha
<13> aloha aloha
<0> aloooha!


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #python
or
Go to some related logs:

#unixhelp
#gentoo
#cisco
#freebsd
#computers
#politics
human trafficing south america
mirc huggle
#politics
tick@Physics Engine



Home  |  disclaimer  |  contact  |  submit quotes