@# 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> rohan: it probably won't be covered how cl***methods work either.
<0> a good example is dict() and dict.fromkeys()
<1> zeeeeee: you want to catch anything and everything which could be raised...
<2> Jerub: I am using Byte of Python
<2> also, why did you call the first arguement "cls" ... should it not be "self" ?
<2> its a "tradition" right ?
<3> Leeds: yeah...because stderr has been closed by this point, so i need to redirect all exceptions (for debugging purposes)
<1> rohan: in this case it's a cl*** method, not an instance method - so you get the cl*** itself as the first argument, not an instance of it
<0> rohan: not for cl***methods.
<2> ah, ok.
<0> rohan: 'self' is for methods, cl***methods don't get p***ed an instance, they get p***ed the cl***.
<0> rohan: hence, 'cls'
<1> zeeeeee: unless you raise them yourself, there are unlikely to be things raised which aren't Exceptions (i.e. which don't inherit from the Exception base cl***)
<2> so this is wrong ?
<2> cl*** Person: def __init__(self, name):
<0> rohan: and yes, it's a convention that's practically concrete.



<0> oh, no, that's correct.
<0> __init__ is a normal method
<0> the @cl***method line makes a method special, and makes it a cl***method
<2> ah, ok.
<0> sorry, this is more advanced stuff than you need to know about I think.
<3> Leeds: unlikely but in my case there are non-exceptions being raised, and i can't ask all the devs i work with to change their code
<3> if this is impossible, just say 'no', i promise i won't bite :)
<2> Jerub: hehe, i hope i will learn it as i go ahead.
<4> except:
<5> Jerub: know any good implementation of RSA in python which can import RSA public key in PEM format and do public encrypt with that?
<3> otherwise...i cannot stand the suspense! what's the secret to catching all?
<1> ne1uno: and how would you access the exception object?
<1> the whatever-it-was-got-raised
<4> traceback
<1> zeeeeee: I suggest some gentle larting at the devs who are raising strings
<2> there are not "public: private: protected:" access modifiers in py ?
<6> no
<3> rohan: no
<2> zeeeeee: ok.
<2> speedie: hey hi there !! got time to make any new screencasts ?
<7> I got some time this week
<7> weekend
<2> ok.
<7> but... I finally got a job, and I start next week :\
<7> full time work and school
<2> oh, ok.
<2> so no more screencasts ? :D
<7> depends how much time I have :)
<6> screencasts?
<7> video of someone's desktop... I've been doing some videos of using vim
<7> I hope to keep doing them, but full time work, and school 4 nights a week
<7> and trying to keep the wife happy.... ;)
<6> :o
<6> haha, the wife
<6> speedie: how do you capture the videos?
<7> eleusis: what OS are you on?
<8> xvidcap speedie ??
<7> no, I'm a Mac user
<8> ahhh ok
<6> speedie: Linux (Debian Sid)
<8> well I am out fella's
<8> have a good weekend
<6> bye
<9> does anyone have some code using the subprocess module i could borrow for an example?
<4> print subprocess.__doc__
<6> pydoc subprocess!
<6> help(subprocess) :P
<9> ok
<4> boycot pydoc, it limits list output to 60 chars. so you have to look at the source anyway
<6> ...
<0> huh?
<6> list output?
<0> what list output?
<4> any list instance, like __any__
<4> never noticed?
<0> oh, that
<6> no
<0> never minded
<6> got an example module? :P
<4> epydoc does it too, bad habit. should be a user option from a config file.
<9> the problem i'm having is i'm trying to execute a command with sudo, and i'm constantly presented with the p***word: prompt. I thought this would be caught by stdin=subprocess.PIPE ?



<4> your stdin is its stdout
<9> ? i don't understand
<4> ps.communicate('p***word ')
<9> ok
<4> someone should make am expect script using subprocess, all the parts are there
<10> how to create dockapps in python?
<9> ne1uno: not working
<4> \n
<4> flush, could be many things
<10> omfg
<10> i came across a window manager with pythons cripting!
<10> python scripting*
<10> Kahakai! ^^
<9> i feel like the p***word: prompt is not interacting at all with the subprocess module.
<4> flvm can be pyscripted
<10> flvm?
<10> do you mean fvwm?
<4> pywm sorry
<10> pywn
<10> wm*
<10> do you guys use it?
<4> you can use Ipython for a shell. never used it or any wm yet.
<4> osh is another shell
<10> do you guys know more python apps that can be scriptable? :D
<10> are*
<11> robinl1, Civilization 4 :D
<11> It uses XML+Python
<11> Good move by them, it allows people to easily modify the game
<10> lol
<1> openoffice
<1> .org
<10> lol i wanna learn to write window managers in python xD
<10> and all those graphical stuffs
<4> what is a docapp?
<11> Just to clear something up. How do modules differ to libraries? I'm guessing multiple modules can make up a single library?
<6> libraries? packages? :P
<1> eggs...
<11> Oh nvm, Wikipedia ftw
<10> back
<11> Okay, I want to find what arguments Tk() can take (from Tkinter) where can I find this info?
<12> hello
<2> is operator overloading possible in python ?
<0> rohan: yep.
<10> do you guys know more python apps that can be scriptable? :D
<13> Yes.
<4> overwritting is more popular
<0> robinl1: Temple of Elemental Evil ?
<0> ;)
<10> Jerub: hmm? don't know that, lol
<2> wow, really ?!
<2> where can i see an example ?
<10> i mean where can i get some python apps i can modify?
<13> Section 3.3 of the langref.
<4> pypi
<10> pypi?
<2> thanks, ignacio
<10> PYXFCE?!
<10> :|
<1> robinl1: please... chill...
<10> thought it was whole XFCE written in python, lol
<2> ignacio: hmm.. the "lawyer" language is too tough.
<13> It's just a bunch of special methods...
<2> http://vsbabu.org/mt/archives/2002/02/20/sample_script_operator_overloading.html --> is more helpful :)
<2> hmm... cl***es in python is nothing like that in C++
<6> heh
<14> Anybody backported/implemented the xmlcharrefreplace for python 2.2?
<4> can you get there from elementtree?
<2> i want to overload operator * for ratio multiplication
<2> why is this giving errors ?
<2> def __mul__(self, x):
<2> return ( self.num * x.num , self.den * x.den )
<2> cl*** name is Ratio
<2> __init__ is


Name:

Comments:

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






Return to #python
or
Go to some related logs:

#perl
#python
#css
#perl
#css
apt-setup: command not found etch
ubuntu read only disk usb
#javascript
#kde
#math



Home  |  disclaimer  |  contact  |  submit quotes