@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17



Comments:

<0> isn't there a ',' missing between 'PIPE' and 'stdout'?
<1> yep
<1> ChrisLong, are you from australia?
<2> lol ya i just found it
<0> squig: nope, germany. why?
<1> I know a ChrisLong from australia
<1> I was going to trying and strangle you through irc
<3> sigh, why does elementtree have to be so painful with namespaces
<2> squig, TypeError: cannot concatenate 'str' and 'int' objects
<1> CLucas916_x64, how might you fix that?
<2> i cant remember
<1> cast the int to a string
<2> but wheres the int?
<2> oh
<2> oops
<4> forget about remembering commands.. given that situation.. if those ints and strings were just things you could grab (they are), what would you have to do when only strings will stick together?



<4> CLucas916_x64: look at 'ffmpeg -vcodec xvid -b %d qmin 3 -qmax 5 -bufsize 4096 -g 300 -acodec aac -ab %d -i %s -s %s %s' % (vbit, abit, input, ratio, output)
<2> ugh i gotta finish this later
<2> thanks everyone for their help
<4> no prob, CLucas916_x64
<5> dijix, is there a simpler method of calling DLL's in python? I'm still a newbie to python :p
<6> hi all
<6> has anyone worked with tkinter before?
<6> I was having trouble with my .mainloop() function
<6> I've got a function called renderparticles, which bcasically renders an animation of some particles using opengl
<6> and if i call it before the mainloop(), i don't get any results. if i call it AFTER, i get only the last frame of the animation since it has completed before the mainloop was called
<6> so what in the world am i supposed to do?!
<7> vIkSiT, the function is blocking the mainloop
<6> werneck, exactly..
<7> you have to refresh it using Tkinter mainloop
<7> what's the refresh rate ?
<6> Ah.. how do i do that?
<6> well, right now, its just a while loop and some simple updates .. so i'd say on my machine, about 5fps
<7> so, 200ms ?
<6> thats about right
<7> so... you'll use root.after(200, updatefunction)
<6> I see. and not call mainloop?
<6> or this is after mainloop..
<7> and inside updatefunction you do the same call
<7> of course you call mainloop
<7> this is before mainloop, after you build your widgets
<6> werneck, ok, so I call root.after(200, renderparticles) before calling mainloop - and then inside renderparticles, I call root.after(200, self) ?
<6> or s/self/renderparticles
<7> renderparticles is a function, right ?
<6> yes
<6> renderparticles() I mean
<7> yes... after you created root, but before mainloop you call root.after(200, renderparticles) and inside renderparticles you do the same call, at the end of the function
<6> right. however, the renderparticles functions basically does all the frames of the animation..
<6> function*
<7> vIkSiT, this will call it after 200ms, and then the function itself will set it to be called again...
<6> so its not like it renders one frame, and then i call it every 200ms to render the next.. this would mean that it renders the entire animation every 200ms
<7> renderparticles have a loop ?
<6> ah yes.
<6> werneck, exactly.. its has a loop
<6> essentially, i read from a file of coordinates, render, clear, read again.. etc
<7> so it won't work... you need a function who does what renderparticles does on each loop iteration...
<6> ah i see
<6> hmm, this is weird though
<7> if you enter another loop, it'll block Tkinter mainloop, that's it... you have to use its own mainloop by using after to register future events
<6> I see. so this goes for all other functions? I can't have a loop in them?
<6> i mean, the main ones anyway
<7> you can't have another mainloop inside it, that's it... unless you use threading, of course, but there's no need for that
<6> but i don't have another *mainloop* - its just a normal for
<7> paste your code somewhere...
<6> sec
<6> btw - i get an error about update only taking one argument..
<6> http://rafb.net/paste/results/KksxcB16.html
<7> update() ?
<6> werneck, i'm using update(200, renderParticles)
<6> which doesn't work
<7> I said root.after()
<6> oh damn
<6> wtf am i doing?!
<7> the code seems to be ok, just root.update is wrong... it's root.after
<6> right
<6> Awesome, its working great now, thanks werneck
<7> http://www.pythonware.com/library/tkinter/introduction/x9507-alarm-handlers-and-other.htm



<7> np
<6> ah will check it out
<8> any guesses as to the fastest way to create a dict with range(x) keys and 0 as values for each?
<8> not code wise but speed wise
<9> is anyone here experienced with PlanetPlanet?
<10> I'm getting the error: TypeError: unsupported operand type(s) for %: 'long' and 'str' when trying to use the 'sprintf' style string setting, but my string is the output of sha.hexdigest()...so I don't see how it thinks it's a long
<10> when i concatenate it using +'s it works fine
<11> reikon: can you post the code?
<10> sure Leeds
<12> anyone know how i can get an IP from a domain name?
<10> iron host?
<10> http://paste.insanityflows.net/view.php?id=49
<10> err
<10> Leeds, http://paste.insanityflows.net/view.php?id=49
<11> ironfroggy: socket.gethostbyname
<11> or gethostbyname_ex
<12> so what would "Name or service not known" mean for a domain that i know is good?
<11> reikon: % is an operator - you are trying to apply it to the *result* of the cursor.execute() call, not the argument
<10> i just noticed that..
<11> it would mean either it's not a good domain (typo? needs a hostname adding?) or your DNS isn't working
<10> you know...sleep is important
<10> highly underrate dint he programming community :P
<11> it's overrated :-)
<10> underrated*
<10> :P
<10> oh and it also might mean it's not formatted correctly
<10> i.e some sites work with www others don't
<12> anyone wanna do me a favor and check a domain? i cant tell if its just my end, but i cant access ffxi.allakhazam.com
<10> works for me
<11> works from my end
<10> [reikon@reikon: ~ ]$ host ffxi.allakhazam.com
<10> ffxi.allakhazam.com has address 216.155.41.199
<10> [reikon@reikon: ~ ]$
<11> In [3]: socket.gethostbyname('ffxi.allakhazam.com')
<11> Out[3]: '216.155.41.199'
<12> oh ****.
<12> ive been testing a scraper on that site.
<12> i think they blocked me.
<11> oops
<13> ouch, heh
<13> try a traceroute
<11> ironfroggy: it's pretty unlikely that they've blocked your DNS though - I've never heard of that being done
<12> Leeds: i dunno, it seems odd. you can get it, i cant.
<12> and they've already blocked the client ID i had been using until i started faking a firefox id...
<12> also, im unable to access it from any of my boxes.
<11> that's my point - I can understand them blocking http - you nasty resource-****ing person - but I really doubt they'd block DNS... unless it's a firewall-level block, which would be slightly over-the-top...
<12> so where should i look for a point of failure that (hopefully) doesnt involve me not getting a paycheck?
<13> You can't prevent someone from resolving your domain, that's between you, your DNS servers and the root dns servers
<11> ahmeni: not true
<12> i didnt think you could.
<12> but i may have been wrong
<13> try a different DNS server, like 4.2.2.1
<12> hmm.. not sure how to do that.
<12> let me look into this some more.
<13> what OS?
<11> you can't prevent someone from resolving your *domain*, but if, say, you're running an auto-adapting firewall, your DNS server is behind it, and it's blocked access from your subnet to *all* their services, the DNS would be blocked
<14> hi - in wx, how do i add a custom protocol handler to the fs? I've tried wx.FileSystem.AddHandler(myHandlerInstance), but it barfs cos it needs a C++ instance, not a python on
<12> bah, ill just add it to /etc/hosts
<12> anyone know how to do that in windows?
<11> ironfroggy: first, get a real computer
<12> Leeds: i got several
<13> windows/system32/etc, I thnk
<15> ironfroggy: C:\Windows\system32\drivers\etc\hosts
<11> then, run "dig +trace ffxi.allakhazam.com"
<13> ahh, yeah, drivers\etc\hosts
<11> ironfroggy: that command-line will show you the recursive DNS lookups to find the IP address - should show you where the lookup is failing
<12> whats the dig command?
<11> it's the modern replacement for nslookup
<16> is there an ***ociative type that maintains order of its keys?
<12> hmm i dont see dig anywhere in portage, blah.
<16> or a library for one laying around, anyone?
<11> ironfroggy: it's part of bind
<12> thanks


Name:

Comments:

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






Return to #python
or
Go to some related logs:

#php
#centos
ntpd returns a permission denied error
linux realtek alc850 menuconfig
connecting to quakenet with gaim
error c preprocessor /lib/cpp fails sanity check
#linux
how to CONFIG_HWMON
0x6134706D gentoo
eth2_temp



Home  |  disclaimer  |  contact  |  submit quotes