@# 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



Comments:

<0> yes
<0> File "/home/brian/notheme/services/ircd/base.py", line 28, in callback
<0> result = targetFunc(origin, lstArgs[2:], constraint_result)
<0> exceptions.UnboundLocalError: local variable 'origin' referenced before ***ignment
<0> Crap.
<0> It has nothing to do with that.
<1> sure doesnt
<0> I forgot I changed something.
<0> Alright...
<0> Nothing happens now.
<0> What is wrong with my decorator?
<0> It doesn't do anything.
<1> looks fine to me
<0> Well it's not.
<1> what do your unit tests say?
<0> What?



<1> thats always a fun one to ask
<0> I know what they are.
<0> I'm just too lazy to implement that.
<1> but you dont use them
<0> The most I do is ***ertions sometimes.
<1> unittests are essential for good code
<1> use them
<0> I don't really know how.
<0> I just know what they are.
<0> Like decorators.
<1> you'll find they do more than help you find errors, overall the extra code lets you write the important code even faster.
<0> Well, right now I know the problem and I don't need a unit test ( I think )
<1> you need to test the decorator, so you actualy know if its broken.
<0> It is
<1> if you are running the entire app, you cant be sure where the problem is.
<1> you think wrong. you need a test
<0> I added print statements and nothing is printed.
<0> In the _ function
<0> That means the _ function is not being executed
<1> maybe you are looking at the wrong place in the output. when do you expect to see that? when the callbacks are called or when the modules are imported?
<0> When the callbacks are called
<1> where in the decorator is the print statement? inside _ or outside _?
<0> inside _....
<0> didn't i just say that
<0> i'll just wait until tommorrow when more people are awake
<1> i thought you just said it was in the decorator, sorry
<0> It is in the decorator....
<0> In the _ function in the decorator....
<1> paste the decorator with the print statement. you are possibly misunderstanding the call order with decorators.
<1> right i thought you said in the decorator, but not necessarily in the _ specifically and was just clarifying.
<0> http://rafb.net/paste/results/BDgFBc89.html
<2> changed the colors again
<2> http://floam.sh.nu/
<2> er crap
<2> wrong channel.
<3> floam: looks nice.
<1> Brian: and you get no errors and the cmd_ is not reached either?
<2> stonecrest: thanks, I'm not sure if I can live with the box looking see-through though
<2> looks like it could get old quick.
<0> ironfroggy: yes
<1> Brian: remove the @is_identified temporarily and see if it really is getting called
<1> if they arent getting called, there should be some error.
<0> It's not being called.
<1> then the problem isnt the decorator.
<4> hello
<4> anyone here use mxODBC?
<5> what's the easiest way to start a python process that will run in the background and not disconnect when I disconnect? will using screen work?
<6> screen will work but i dunno if it's the best option
<7> hi all.. if i have a string of characters encoded in hex, like '46 6F 6F' (the letters 'F', 'o', 'o'), how can I convert them to either ascii or unicode?
<8> chr(int(0x46)) -> 'F'
<7> sweet thanks :)
<8> sure
<9> There a way to, in a python script, determine what directory the python script is in?
<8> os.getcwd() ?
<9> script might be run because it's executable and in PATH
<10> anyone know how to import some code into a C module? I want to do from amodule import *
<10> I could just use a call which ran python code too. something like... Py_RunPython("from pygame import *") would be nice :)
<11> hello
<11> do someone here has mac?
<5> yes



<11> BluR, do you wxPython?
<5> I've used wxWidgets
<12> I wxPython
<11> wow
<11> squigly, can you please make a screenshot of frame with about 200x300 size?
<11> empy one
<12> why? it looks like a gnome frame?
<11> I have a windows here adn I am creating GUI
<11> so in anycase gnome looks much more prettier
<12> it looks like what ever my theme is
<11> show it?
<12> its a lot of effort to make a window to show you, shut your eyes and imagine!
<11> I will pay you with nice .avi for it
<11> :)
<12> squ i did it
<12> and now you leave!
<11> thanks
<13> I need to write an app to download and parse a lot of web pages, but I want to avoid using threads for that... using select() with urllib2 doesn't seem a good idea... I never used twisted for anything serious, I was thinking if it can fit my needs ?
<14> werneck: I have a script laying around here somewhere that will download rss feeds concurrently with twisted
<14> werneck: would that be interesting to you?
<14> it's kinda the same thing
<13> Jerub, sure... I will be thankful if you paste it somewhere or send it to me
<11> I hate that feeling
<12> what is this fish for squ ?
<13> Jerub, it's ok if you can't find it... just point me where to go... twisted.web ?
<14> werneck: well, twisted.web.client is the code that fetches urls.
<14> werneck: but that's not the interesting bit
<14> the interesting bit is doing no more than 10 concurrent requests.
<14> werneck: oh, here, got darcs?
<14> werneck: darcs pull http://suqueensland.org.au/~stephen/irssc/
<13> Jerub, darcs ?
<13> ah, ok
<14> werneck: if you don't have darcs, follow the url and grab the .py files :)
<13> Jerub, ok... thanks a lot
<14> werneck: uh, be aware, there's a few dragons. ask me if you need help
<12> Jerub, why is it hard to not do more than 10 concurrent requests?
<14> squigly: oh god, i just read that code.
<14> :(
<14> it's all terrible.
<14> blarg, I should fix that crap.
<13> what's wrong with it ?
<12> im writing a pythong based tape back up solution for robots with multiple drives
<12> its fun !
<14> werneck: it's terribly structured, and doesn't use defer.DefferedSemaphore
<14> basically, what it should really do is:
<14> ds = defer.DefferedSemaphore(MAX_CONCURRENT); for feed in feeds: ds.aquire().addCallback(grabFeed, feed)
<14> where grabfeed is a function that takes a url, and processes it.
<14> or, better.
<12> defferedSemaphore is a built in?
<14> ds.aquire().addCallback(getPage, feed).addCallback(processPage)
<14> squigly: yeah
<12> deffer? is what module?
<14> squigly: twisted.internet.defer
<12> aah
<14> squigly: it's where Deferred lives.
<12> im not using twisted
<14> I misspelt it.
<12> I have my own telnet server
<12> which is going to be replaced with twisted one one of these days
<12> tell you what blanking a tape takes for ever!
<14> squigly: I bet
<12> i have a robot full of tapes to erase
<14> I need a python programmer in brisbane, australia.
<14> </jobad>
<12> im in sydney
<14> squigly: willing to move?
<14> ;)
<12> lol
<12> always
<12> i go to brisbane a bit
<13> Jerub, ok... thanks... it seems like twisted is a bit harder than I imagined, but I'll use your example as a starting point
<15> hm, how do I add a few entries to a dictionary in-line? like mydict.add({ 'test': 'testval', ... })
<16> jroes: mydict.update(...), like maybe mydict.update(dict(these=1, keys=1, dont=2, need=3, quoting=4))


Name:

Comments:

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






Return to #python
or
Go to some related logs:

#dns
execute command qmail work
opensuse+10.1+firefox+segmentation+fault
qmail concurrencyremote max
Can't use string (0) as a HASH ref while strict refs in use at BasicBot.pm
#bash
#linux
dot-locking bash
suse kontact british summer time
yum totem-xine no match for argument



Home  |  disclaimer  |  contact  |  submit quotes