@# 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 18 19 20



Comments:

<0> lol
<0> yeah we have to use basehttpserver though
<1> and you shouldn't be ell-oh-ell-ing :-)
<0> :)
<2> LoLisbad
<2> hehe
<1> afternoon Brend
<1> PerceptualChaos: well, the first question is, can you choose one of GET or POST, or are you having to do both, in this contrived problem of yours?
<0> cgi.FieldStorage(self.rfile) didn't work :(
<2> arg, help me out plz, i'm breaking a 2-page long function, and surely i have to p*** huge number of arguments to broken up functions.. is this ok? if possible, i'd like to limit the # of arguments p***ed?
<3> eugenekim15: a piece of string to measure how long the functions are.
<0> Leeds: I could chose, POST makes sense though
<2> Jerub: a piece of string?
<0> :)
<0> how long is a piece of string?
<1> PerceptualChaos: and - forgetting about cgi for now... what does rfile contain if you submit a POST request?



<3> eugenekim15: oh, sorry, english is not your native language. it was an obscure idiomatic reference.
<3> eugenekim15: your question was too vague, and did not contian enough quantiative information.
<0> Leeds: in the documentation it says rfile contains an input stream, positioned at the start of the optional input data
<3> eugenekim15: this is an illustration: "how big is a swimming pool?" "how long is a piece of string?" (meaning, "Your question is too vague to answer")
<2> Jerub: hmm i have a 120 lines long function, which i'd like to break up
<0> so I guess it means it has the POST data
<0> but I'm not entirely sure in exactly what form
<2> Jerub: and i'll need to p*** 10+ arguments to new branched-out function
<2> Jerub: which i feel bizare about..
<3> eugenekim15: okay, then you're probably not doing it the right way.
<2> Jerub: maybe i'm breaking the original function wrong
<2> ?
<3> eugenekim15: I like to break up functions by making sections of the bigger function into function calls.
<1> PerceptualChaos: I'm not talking about the documentation - I'm talking about trying it - experimentation
<0> Leeds: I think you want to know exactly what is in it for my example right?
<2> Jerub: yes that's what i'm doing.. this is one huge for loop inside big function.. and i'll need to p*** about 10-15 arguments..
<0> yeah I get it now
<0> :)
<4> thanks for the pointer on the csv module
<2> L-o-L
<2> ..
<1> if you think it might do X or might do Y - try it!
<5> Afternoon Leeds.
<4> the answer: it should take ~1 minute on this box
<3> eugenekim15: this kinda thing is what I do: http://rafb.net/paste/results/P98KtE50.html
<0> Leeds: I tried just using print self.rfile and it says <socket._fileobject object at 0x009D8F48>
<0> so maybe self.rfile.read()?
<0> sorry I'm a newb
<0> ha it worked!
<2> hmm
<2> Jerub: arg this function is so messy, i can't even break up correctly..>.<
<1> PerceptualChaos: the trick is to try it - to experiment... :-)
<0> although, I didn't get what I expected
<1> what do you expect and what do you get?
<6> Does anyone know why I get an IOError exception --> http://daisy.shortcircuit.net.au/~prologic/
<6> the same code works fine on another machine with similar software/hardware
<3> prologic: looks like a permissions error.
<0> Leeds: I have an html page with a simple text form with name "user" and I entered "tim" into the text box and clicked submit query
<3> prologic: check that the http server has permission to access /tmp
<6> Jerub, though it can't be
<3> prologic: and isn't chrooted.
<6> it does if it's 1777 :)
<0> then when I executed print self.rfile.read() I got "tim"
<0> but I expected to see some mention of the name of the textbox - "user"
<6> Jerub, drwxrwxrwt 6 root 500 2006-06-02 14:20 tmp
<7> PerceptualChaos: pastebin the contents of that psuedo-file
<6> Jerub, and both apache configs on the two machines are the same
<3> prologic: something is different, obviously.
<6> yeh don't ask me what though :)
<3> prologic: play around with the functions for checking writability, and do things like os.path.isdir('/tmp')
<6> *nods*
<3> and stuff like os.listdir('/')
<6> I'll try that
<6> strange though
<6> all of a sudden it no longer worked
<3> very much so.
<3> check the disk isn't mounted ro ;)
<6> it's like ffmpeg don't work anymore with the -mv4 option
<6> apparently it's been changed to something else and there's some mixup as to wether it's ffmpeg.sf.net or hosted on mplayerhq.org :)
<6> lol
<6> if hte dist was mounted ro, I'd not be here :)



<3> prologic: I once spent 6 hours trying to debug why I couldn't boot off /dev/hda3 when the OS was installed on /dev/hda2.
<6> heh fun
<6> you still go to humbug btw ?
<3> yep, more these days.
<0> ironfroggy, just give me a minute to clean it up
<3> I live around the corner nowadays.
<6> hmm
<6> I should find a way of getting there
<3> prologic: hey, know any decent python engineers? I need one.
<6> I've lost my ride, he's moved to England :/
<3> prologic: where are you living?
<6> Jerub, yeah me :)
<6> I'm near Nathan campus
<3> prologic: oh, awesome, there's some humbuggers that live out your way.
<6> oh goody
<6> hook me up, I'll see if they're okay with taking me
<6> hehe
<6> damn so gotta get a laptop though :/
<8> prologic, Yeah, I'm sitting on my bed, using one of my desktops to send Invader Zim episodes to my TV, using my laptop to write python
<6> hmm
<9> _rockstar: nice, i've got the same setup :D
<3> I don't own a tv.
<3> the laptop I 'own' is my wifes.
<8> Jerub, I've got a TV, no connection to cable or anything. I don't watch TV. If there is something I want to watch, I download it.
<6> I don't own a tv either
<6> my desktop is my tv :)
<3> _rockstar: if I had a Tv, that's what I'd do. and I do occasionally download a series.
<9> that's why I'm glad more series are becoming available for download legally for a good price
<3> the last one I grabbed was 'firefly', and that was a year ago now.
<3> and then I bought two box sets for friends for christmas :)
<8> Jerub, yeah, I know the feeling. A big reason I don't have cable. I usually put on a movie while I do other stuff, to keep me company.
<8> My house is very lonely...
<3> _rockstar: I'm married. :)
<8> Jerub, yeah, don't have that luxury, and I don't predict it in the near future.
<10> marriage?
<11> has this channel turned into Ask Auntie
<9> a wife, or marriage?
<10> i read about marriage in the histories...some peculiar ritual.
<7> tv is less and less worth it these days.
<8> ironfroggy, Yeah, I download old Transformers episodes, He-man, Ninja Turtles...
<7> im loosing much of my need for television. more and more i just watch adult swim and G4 online these days.
<7> ill miss my "on demand" services a lot, but as much as i believe its the future of television, it really just isn't there yet.
<6> Okay guys you have to see this
<6> http://daisy.shortcircuit.net.au/~prologic/
<6> bloody weird, I can write to /tmp and read from it
<6> yet mod_python still throws an error
<6> well the tempfile module does called from mod_python
<7> are you sure about the permissions mod_python is running under?
<8> Does anyone know the python module that contains shell?
<3> huh?
<6> ironfroggy, it'll run under the permissions of apache right ?
<3> I know heaps that contain ****
<3> some that contain crack
<3> and one particularly nasty one that contains crystal meth
<6> the thing is though, mod_python is still running this code
<3> prologic: oh, mod_python
<6> even after the exception is caught
<3> prologic: that's probably the problem
<6> it's caused by importing the Session module
<3> prologic: don't use mod_python
<6> no :)
<6> I want to use mod_python :)
<3> prologic: no, I'm actually serious, mod_python is a stinking pile of crap.
<1> prologic: you know you don't
<6> right
<6> Jerub, why is it, and what's a better alternative ?
<7> welcome to #python, how can we tell you what to want, today?
<6> heh
<3> prologic: turbogears and django are better alternatives.
<1> ironfroggy: you didn't want to say that
<3> prologic: using cherrypy directly is okay (cherrypy is underneath turbogears)
<6> Jerub, how are they ?


Name:

Comments:

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






Return to #python
or
Go to some related logs:

#freedesktop
quirkycarla
postfix overriding MX
#oe
#gentoo
#centos
install raidreconf
#osdev
#linux
RaLink RT2561/RT61 fedora



Home  |  disclaimer  |  contact  |  submit quotes