@# 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> Sliced line:
<1> polpak: no, multiple parameters within one sequence
<0>
<0> err
<0> i'm using line = line[20:]
<0> (it should be 24 but i'm making sure to get some of it)
<2> Are there any python anti spam libraries like jASEN (java Anti Spam ENgine) ?
<0> why does the sliced line thing return the empty string ?
<3> maybe nothing short of a state machine can strip out these sequences
<4> yi, how many characters are in the line?
<3> but if it's only color, it's easier
<1> not hard to much with a regex
<5> yi: what is len(line)
<1> not hard to match
<5> can anyone recommend a good IDE on the basis of debugger integration?
<5> I've used text editors or IDLE before but I need something great debugging capabilities



<3> wingide
<0> dgrantwork:
<0> Original line: ^AESC[0;34m^B ^AESC[0m^B1
<0> Original line length: 18
<3> the basic version costs about 35 $ I guess
<0> why the hell is it 18 char's long?
<3> there is a trial of 30 days
<1> \x1b\[[^\x40-\x7e]*[\x40-\x7e]
<3> http://wingware.com/
<5> volvox: yeah wing's website makes it sound pretty good.
<3> also has VI keys
<1> yi: that's how many there are (though I only see 17)
<6> so far I have not seen much use for a debugger in python
<7> hi folks.
<7> any SQLObject gurus about? I'm trying to figure out how to make a custom Col cl***.
<6> however I do find that some code styles need a debugger more then others
<8> so im getting the entire office 12 suite beta to expiriment with python scripting. anyone else interested in the idea?
<1> kosh: because it's not possible to easily tell what the code does just by looking at it?
<6> deltab: the more complex the code that people write and the longer their functions the more I see a debugger being used
<5> kosh: you mean that when something really goes wrong it can be solved with some print statements?
<6> deltab: however when you keep to 5-10 line functions and have them written clearly then a traceback tells you where the problem is and what it is
<1> dgrantwork: that and an understanding of how the program is working
<8> print statements are a bad way to debug. unittests that reproduce the possible cases are better.
<6> dgrantwork: I mean that when the code is written well there is almost never a need for a print statement to figure that out
<6> dgrantwork: the traceback should tell you exactly what the error is and with well written code that should be all you need
<5> ironfroggy: agreed
<5> kosh: I think I get it. But you're ***uming there is an exception thrown and then your unit tests cover all bases
<5> btw, from a review of wing and other ides: "if you tried and rejected Wing 1.1 back in the day, you should give Wing 2.0 another look" I think I fall in to that group. I used wing 1.x a long time ago and didn't like it
<6> dgrantwork: I mostly find that clean and simple code is the best way to make the systems easier to maintain
<6> dgrantwork: I usually consider it a bug if a function is more then 10 lines or so long and if I read a section of code and it is not immediately obvious what it does then the code is wrong
<5> kosh: cool thanks for the tips, I should strive to do that too, I know I'm guilty of making m***ive long functions some times when I'm in a rush
<9> pygi does it work for you now http://imgv.sourceforge.net/
<6> dgrantwork: the problem I find with that is that being in a rush makes things take longer
<6> dgrantwork: thsoe longer functions always end up taking more time then lots of simple ones
<3> dgrantwork, try pychecker, it's nice
<3> has a warning when a function is too long ;-)
<10> gt3, it worked even before, but is just bad :P
<9> ah ;) thought because it wasnt validating because i left out utf encoding
<9> yeah needs new design badly
<9> sadly theres not enough hours in the day
<10> gt3, heh :)
<11> hi people
<3> hi
<11> Does anyone know how to keep the history between two sessions of the interpreter?
<3> that's a good one, which I don't remember
<3> but why don't you try ipython?
<12> javimansilla: the readline module's 'save history' functions.
<3> http://ipython.scipy.org/
<12> (and 'load history')
<3> it runs in circle around readline :-)
<11> I mean, you start a session, you write some code, and later finish the session. What I want is that when a start a new session, I have the old history
<12> volvox: I imagine it uses readline.
<12> volvox: as for the added features, they just bug me (personally)
<12> javimansilla: yes. Python uses 'readline' for the command-line editing and history. you can ask readline to load and save the history
<12> javimansilla: 'python' doesn't do it by itself, but you can easily add a PYTHONSTARTUP script that does it.
<12> or, if you want more bells, whistles, different output, extra colourish features, and who knows what else, try ipython.
<11> ok, ill try, thanks :-)
<13> whats the case convention in python? methodName or method_name?
<14> jclinton: it varies depending on the project.
<4> jclinton, most of the standard modules avoid using CamelCase
<13> what do python libraries us?



<12> jclinton: method_name
<13> ok
<13> what about cl*** names?
<14> Always FooBar
<12> cl***es are in StudlyCaps.
<13> Cl***Name?
<12> jclinton: see www.python.org/peps/pep-0008.html
<14> no one disagrees on that.
<13> Cl***Name.method_name then?
<4> Yhg1s, except for dict, list, int, set, etc
<12> polpak: fortunately, yes.
<4> Yhg1s, seems like they went for all lowercase on all builtins but CamelCase for other library objects
<12> polpak: see PEP 8.
<15> have just about managed to dump windows for Ubuntu as a desktop... only thing I need is a GUI for mysql.. anyone know one written in python for example .. searched to no avail
<13> p_mash_: there are about 100 of them
<13> p_mash_: MySQL Administrator is officially supported
<4> Yhg1s, I don't see where (in PEP 8) it states why builtin types are not in CapWords format
<16> polpak, well, you can consider that "list", "tuple", etc are functional interface to their StudlyCaps equivalent: types.ListType, types.TupleType, etc.
<12> polpak: it doesn't, it doesn't talk about builtin names at all. The reason builtin names are the way they are is because Guido wants it that way.
<12> soyt: tee hee, but no.
<4> Yhg1s, still it's not consistant
<12> polpak: Guido doesn't care (and neither do I :)
<12> practicality beats purity and all that.
<3> Guido doesn't care to the point he advocated making python 3000 case insensitive...
<3> oh, the horror..
<16> Yhg1s, why not?
<12> soyt: because it just isn't true, neither practically nor conceptually.
<12> the types module will most likely go away in Python 3000.
<12> volvox: 'advocated' is a big word. 'suggested', is more like it.
<12> and it's not on the table anymore.
<3> Yhg1s, point taken :-)
<17> When the help says the method is executing a command, "replacing the current process," what exactly does that entail?
<14> _rockstar: are you looking at os.exec*
<12> _rockstar: exactly that. the current process is replaced by the new one. the current process ceases to exist.
<17> Jerub, yeah.
<17> Yhg1s, does that mean that the script does not continue to run? It's supposed to execute multiple commands.
<12> _rockstar: that is correct.
<12> _rockstar: os.exec* is usually preceded by os.fork()
<12> _rockstar: but if you want to execute commands, don't use either; use the subprocess module.
<17> Ah, I see.
<17> I don't seem have to subprocess installed...
<12> _rockstar: it's new in Python 2.4.
<17> Dammit...
<17> How stable is 2.4?
<13> i LOVE the new context management protocol in 2.5
<12> two years old.
<12> 2.5 will be coming out in a few months.
<12> _rockstar: are you running Debian?
<13> and the "usering foo as bar" syntax is so awesome
<14> _rockstar: hehehe, you're running 4 year old python :)
<12> jclinton: 'usering foo as bar'?
<17> Hrm...
<12> jclinton: do you mean 'with foo as bar'?
<13> yea
<12> jclinton: do you realize what it does, though?
<13> yea, i'm coming from Ruby :)
<17> Do the python 2.3 modules work with 2.4?
<12> I don't know what in Ruby acts like with.
<12> _rockstar: yes.
<13> it's exactly the same as Ruby's code block system
<3> but... isn't it syntactic sugar to the extreme?
<13> no
<12> volvox: yes.
<3> i thought it was dead with turbo pascal :-)
<13> in python it can only be used with objects which implement the context management protocol
<12> it's just a short way to write 'try/finally', with a standard protocol to ask cl***es 'handle exceptions for me'
<3> clever
<13> yes, the "What's New in 2.5" has a very good example
<3> but i'm not sure i like it... i'll take a look
<18> like C#'s "using"?
<13> especially handy when working with files and streams
<17> Shoot, had both installed, but 2.3 took over /usr/bin/python... Jerk.
<19> c# is poop
<19> a big smelly poop


Name:

Comments:

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






Return to #python
or
Go to some related logs:

#gimp
#mysql
suse10.1 wmv mplayer
/sbin/fdisk: cannot execute binary file
#php
priority queue in php
#physics
xorg rgb.txt rgbpath gentoo
#gaim
#python



Home  |  disclaimer  |  contact  |  submit quotes