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



Comments:

<0> tapple: global variables are read-only from non-global scope.
<0> You can work around it by putting them in a cl*** or object.
<0> cl*** myGlobals: x = 0
<0> myGlobals.x = z
<1> NfNitLoop: thanks
<2> tapple: or putting 'global foo' in your function
<0> Oh?
<3> yup. it works
<2> NfNitLoop: foo=0;def f(): global foo; foo = 1; f(); print foo => 1
<0> Yeah, just wrote that.
<2> but globals are usually evil anyway
<2> anyone know a python parsing framework that can parse arbitrarily complex grammars?
<1> cybercobra: google for python yacc
<2> %g python yacc
<0> re: globals, Yeah, haven't had much need for them. Funny, though, I was refreshing my Python earlier and reading up on scoping rules and it didn't mention global.
<0> Learn something new every day. :)



<4> the directory i want in my path is /home/dkutz so............
<4> would i put export PATH=$PATH:$/home/dkutz ?
<4> in the .bashrc file
<5> no, drop second $
<4> thanks
<4> cd /
<4> export PATH=$PATH:/home/dkutz is this right?
<5> looks ok
<3> fretbuzz: or export PATH="${PATH}:/home/foo" to be safe
<3> it's always best to be unambiguous
<4> is the foo literal?
<4> cd
<6> the quotes should only enclose the variable name, not the text beind appended. In any case the latter was ok.
<4> no matter what i do i still have to type ./hello to execute my script....is this right?
<3> sysfault: why wouldn't you want the whole thing inside the quotes. the whole thing is the string you want to set it to...
<3> fretbuzz: no
<3> if the path is set up, ./ isn't necessary
<3> and "foo" means "insert your name here"
<4> thats what i thought but it doesnt work
<4> i must havethe path wrong
<3> and if you've been monkeying with your path, it's best to reset it to some known-good value before you append to it again. you can just close and reopen the shell to do that
<4> export PATH="${PATH}:/home/dkutz" is what i have
<3> and is hello in /home/dkutz?
<3> and executable, etc.?
<4> yes
<3> and when you echo $PATH, does it end in :/home/dkutz?
<4> chmod a+x hello yes
<4> no when i echo $PATH there is no /home/dkutz
<3> re-try the export command
<7> hi
<7> any lib for RSA support in python?
<7> that can use public key in PEM format?
<8> pop: pyopenssl?
<7> does it import public key in PEM format?
<4> ok i got it
<4> finnaly
<4> finally
<7> OpenSSL.crypto.load_privatekey() is there, but not OpenSSL.crypto.load_publickey
<7> weird thing
<8> pop: not sure, never used it, just thought it might be helpful
<7> i tried it, cudnt get it work as of now
<8> pop: do you know how its done in the openssl C library?
<7> cr***: yes
<3> pop: the documentation seems to make menton of PEM encoding
<7> ok let me check
<3> pop: http://pyopenssl.sourceforge.net/pyOpenSSL.html/openssl-crypto.html mentions FILETYPE_PEM and FILETYPE_ASN1
<3> im sure they're used for *something*
<7> ok
<4> does Python only have one comment style? # This is a comment
<3> fretbuzz: strings are sometimes used as comments too
<4> yes but c has several comment styles
<4> does python only use the pound?
<3> for comments per-se, yes. but you can also comment large chunks by triple-quoting it
<3> and that's used quite extensively
<4> """and i cn comment ovber several lines"""
<4> ?
<9> yep
<3> i think you were asking if that can span multiple lines. the answer is yes
<4> Practical Python by Magnus Lie Hetland ............is it a good beginners Python book?
<3> fretbuzz: I started off with python.org/docs, but that's just me
<3> the "official" tutorial really is a good place to start



<10> how can I ***ert a file doesn't exist in pyunit? I tried try: codec.open('file.txt','r') fail('found file') except: p***
<10> put codec deon'st throw a hissy if it can't locate a file.. so I need something that'll throw a hissy.. and suggestions?
<10> s/put/but/
<11> hello people
<11> anyone in here uning freevo ? a media center written in python
<11> no one? i could need some help. with it
<11> anyone a 10 mins to spear?
<11> bozho, wb
<11> can you help me?
<12> I don't know :)
<11> ok,, let me show you shomthing
<11> http://pastebin.com/555606
<11> http://pastebin.com/555608
<11> the last one isa error lofg
<11> *log
<11> :buffersize=64-ovc i cant get a space here
<11> it should be like
<11> :buffersize=64 -ovc
<11> i dont get it,,
<11> it should space there right
<12> just a sec...
<12> yes, there should be a space...
<12> hm..
<12> let me see
<11> i also tryed to VCR_AUDIO + ' ' +
<11> bozho, not by any chance used freevo?
<12> no
<11> im loosing my mind.. cos i cant fig this out
<12> let me test the code on my machine
<11> oh no,,, you need freevo i think
<11> that was just a snippet of the python config it uses
<12> I just want to see the resulting cmd line string..
<11> k,,
<12> when I run the python code and print VCR_CMD var, it looks ok
<12> I defined missing variables
<12> :buffersize=64 -ovc lavc
<11> hmm
<12> that's the part of the string
<11> yea thats looks right
<12> you seem to be missing variables for -endpos and -o options, but that's another matter :)
<11> VCR_AUDIO + ' ' + should give 1 space and 'buffersize=64 ' + ' ') should give 1
<12> yes
<12> did you try hardcoding that part of the string?
<11> no
<11> brbr i need to invetigate more..
<12> good luck :)
<11> yea i need it ;)
<13> Today I heard that Oracle bought Sleepycat.
<14> Hello, if anyone can ***ist me I am having a troubling time as a newbie to python. I am having trouble wrapping my head around the way variable ***ignment goes in python. Say that I have an variable 'x' and want to store the value into 'y' then increment 'x'. When I try something like this 'y' tied to 'x' and is increment as well.
<13> Not long after it bought Innobase...
<15> sanxiyn: indeed
<13> LeedsHK: What do you think
<15> either... they're buying up the competition and they now own mysql's soul... or... they've decided to take the open source plunge and are going about it in a standard way for a large company with big pockets
<13> LeedsHK: What will MySQL AB do?
<15> I don't know, but I would be suprised if they didn't at least have a skunkworks project to replace/fork at least one, if not both, of their newly-bought backends
<13> I guess... maybe MySQL AB has backup plan, maybe it doesn't.
<9> hm :|
<13> LeedsHK: There's rumor about Oracle buying Zend too.
<9> can i use += on a cl*** property?
<13> eleusis: Yes.
<15> yup, saw taht
<9> doesn't seem to be working :-\
<9> i have a 'print "eep"' in the property set method that doesn't seem to be executed
<9> yet, the property value is incremented
<13> eleusis: Works for me...
<13> Eh, setter method?
<9> it's not making sense!
<9> well yeah..
<9> property(get_method, set_method)..
<14> how can I do this y = x then x += 1 without y goijg up by 1 also
<15> hmm... there was some issue with that - I can't remember the details... does x=x+y work when x+=y doesn't?
<9> hm
<13> LeedsHK: I guess no.
<13> mojo892: y doesn't increase in that case.


Name:

Comments:

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






Return to #python
or
Go to some related logs:

Starting OpenBSD Secure Shell server. fail
mysql gentoo no innodb
#php
#python
java async socket server -C# -.net
lamguage MPlayer
freebsd perl Out of memory during large request for
http_proxy dans ifcfg-eth0
oxine ubuntu
#physics



Home  |  disclaimer  |  contact  |  submit quotes