| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Comments:
<0> steg: so exec is useful for that. <1> please I did a script and I would like comment ( critic in fact ) someone ca take a look? <2> Jerub: ok, but I don't think I've ever needed to use either. <3> teratorn: let me guess... you like lambda ? <4> werneck: p***ing the code as a string... <2> Jerub: what makes exec better than eval, btw? <0> steg: it executes multiple statements. <4> werneck: i wish it were a lot better <2> oh, I was under the impression eval did too <5> Also, the pyparsing talk was pretty cool too. I had no idea it existed and was so cool... <6> christor: show it. <1> http://pastebin.com/574124 <1> this is my 3rd script and I want to increase the perf and.. but I need advice because I have not again all the tips <7> is there a more efficient way to do: [x for (x,y) in foo] <0> emes: that *is* the efficient way. <0> :)
<7> :| <3> emes: maybe zip(*foo)[0] is more efficient... try it <8> more efficiently obfuscated at any rate <0> werneck: no, that's the silly way <5> Oh, I think Guido also mentioned adding two new builtins: any() and all() <5> Don't quote me on that, though. I did see it on his slides, though. <9> I saw that discussion elsewhere too <3> cubicool: any and all are already implemented on cvs... I liked it <0> cubicool: they were mentioned on python-dev ages ago. <1> kbrooks: are you analyzing? <10> Anyone know of a good IDE for linux? <5> What are the rules in which you don't have to wrap a comprehension in []? I just saw you could get away w/ that yesterday? <9> 2.4 <11> you can do generators with them <12> noen: KDEVELOPP!#!@ <0> cubicool: generator expressions are a general case of list comprehensions that produce a generator. <10> thane, auch... running gnome, and I the dependencies are probably mad :P <11> actually, a more efficient way instead of [x for (x, y) in foo] should be the generator-version of it, no= <11> ? <13> noen: Eclipse <12> noen: kde rulaz <10> zanella, I thought eclipse was a java IDE <9> noen: WingIDE, Eric3 <13> noen: Eclipse is a _anything_ IDE <13> noen: PyDev is the plugin I used to use <14> pydev is useful. <14> :) <13> noen: Eric3 is pretty cool also <3> hakanw: depends... if you're going to iterate over them and do something, probably is, but if you need a sequence of the items, probably not <10> Think I will give eclipse a shot... using at school to code java, so I guess I have to get used to it anyway :) <0> I use vim <11> right <13> Jerub: me too :-) <5> me 3 <12> I use kate when I don't want to use kdevelop <12> composing regular expressions visually is amazin <15> i was using eclipse for a while, but my poor powerbook doesnt like it too much, so vim for me also :) <11> thane: visually...? <13> chzmgr`: Mine k6-2 and mine 2GB HD doesn't like it also... I wonder why... <12> yea, you see what you are typing really does. let me see if I can find a link. <0> zanella: s/mine/my/g <15> wow <0> ;) <15> i wont grumble about my machine anymore :) <13> chzmgr`: :-P except for the HD i find it a pretty damn good PC <12> well here is one shot: http://kennethhunt.com/archives/000840.html <15> fair play...back in the day my first experiences with linux were with a p133 with a 2gb hard drive. using x was not viable. :) <13> chzmgr`: I used to like mine P4 best but as it seems he didn't like me... <15> :( <16> don't even get me started on eclipse... they tried to encourage it in my school. I had a cool TA that semester, though, so he let me use gvim in windows and the dos java debugger :D <15> i've got a dell laptop that i still run linux on, but generally its main purpose is to keep my feet warm :D <10> zanella, Where do I find the eclipse update manager? <17> You know, this channel spends less time actually talking about python and python issues than it does grumbling about other languages and shaking the .py pompoms. <18> does this sound familiar, "Failed to open environment. signed integer is greater than maximum" <1> roderyk: can I show you my script top10_preparse? need critic and tips and advice <18> hari`: it's a language channel on freenode, that is to be expected <0> hari`: that's not true. <13> noen: on the help menu I guess <6> christor: <6> i looked at it <16> christor: if you want, but I'm sure there are better pythonic gurus on the channel. I've been using python for less than a week :D
<6> and it is ALL wrong. <10> zanella, Foudn it :) <18> anyone experience this signed int greater than max thingy on debian? maybe debian amd 64? <11> kbrooks: lol <18> i'm trying to use the darcs plugin for trac <1> kbrooks: lol ?? <5> I just thought of something... do the objects returned while iterating over a generator get GC'd soon after they're iterated over? <19> roderyk: Heh. I had not learned of vim at the time I took java. <6> christor: your method of documentation is substandard (sub = not) <5> (if that makes any sense?) <13> chzmgr`: Why don't u use this old laptop as a terminal? <18> i built it using setup.py as an egg, copied it to the plugins folder of my trac instance and when i run trac-admin tracEnv component list it get this error <19> roderyk: I used Notepad cuz I was hardcore. <13> sorry <0> cubicool: as soon as there are no references to an object, it gets collected, in cpython <1> kbrooks: ?? <6> christor: """...""" <6> use that <1> kbrooks: oh yes <6> christor: this thingy is called a docstring... <15> zanella : how do you mean? <5> Jerub: and there are no special rules then for generators? Like, if I was iterating of a 1GB file using: for line in file("whoa"), those lines wouldn't stay around in memory for the life of the program? <16> CSWookie: no comment. ^^ <19> roderyk: Yeah well, that was then. <19> roderyk: And it was better then Visual J++ <0> cubicool: no, there's no special rules. once nothing can see the variable anymore, it's collected. <16> CSWookie: I can't say anything. At one time I used dos' edit. :) <6> christor: then there is the 2 regexps. <13> chzmgr`: Use it only to show the apps wich will be running on other PC <6> christor: address and gz regex <1> kbrooks: yes? <15> you can use different GC methods in python though, right? <6> christor: those 2 are overkill. <6> christor: you can use str.split. pydoc it. <6> as for gz regex, you can use str.endswith. pydoc it. <15> zanella : i dont have any other boxes in the house :( just my powerbook and my dell laptop...being at university, had to kinda make my purchases more mobile oriented <1> kbrooks: roderyk I m reading <16> kbrooks: maybe it would have been easier if you commented christor 's code step by step. Think of it this way: you weed out any bad habits early, and they won't crop up later :) <6> christor: you have duplicate code... :) <6> roderyk: Sure. <13> chzmgr`: www.ltsp.org <1> kbrooks: yes I know but I don t know how to do it in 1 code <1> kbrooks: the first code parse a file , the second parse a list of file <6> christor: hang on <16> christor: can you linky the script, so anyone else interested can follow along? <15> zanella: ahh, looks kinda cool. i'm actually using it as a node in a lam/mpi cluster at the moment, when it's not keeping my feet warm <20> What is the format of the 'env' argument for 'os.execle ()' ? <15> when i say cluster, it's kinda stretching the term a bit...2 laptops clustered together :) <1> http://pastebin.com/574124 and don t laugh please :P <16> christor: http://docs.python.org/tut/node6.html#SECTION006760000000000000000 Read this to understand how you should document functions <6> FIXED! <6> http://pastebin.com/574171 <6> i hope. <6> well,not fixed <6> you have to fix it yourself. <17> hakanw: mIRC I think. <1> kbrooks: really thanks :) the regexp are from me :P <1> I have tried to use \d+{3} but it didn t work :s <6> \d{3} ... <6> theres a conflict. <6> + means "one or more" <6> {n} means "exactly n" <17> Uh, \d{3,} <1> kbrooks: ooohh <1> I gonna try <17> The \d means digits. <6> and {n,} means "more than n" <1> concerning the 2 code is it possible to do 1 ? <20> How may I execute a command, for instance '/usr/X11R6/bin/xterm' ? I'm using spawnle, but nothing shows. <17> Alterego, os.system() <6> christor: Yes it is. take advantage of [item] <6> if not isinstance(x, list): x = [x]
Return to
#python or Go to some related
logs:
#mysql #perl java-config package conflicts AttributeError Values instance has no attribute __getitem__ apple 350mhz g4 + mythtv apache2 sfar can't locate cwd.pm gentoo
#suse superball/football bush pediphelia
|
|