Tryton 1.8 is out

2010-11-09 Thread bch
I'm glad to announce the 1.8 release of Tryton: Main improvements[1]: * Extensive API simplification (gain in the number of line of code and first step toward an implementation of the Active record pattern). * The client now offer pagination for very big list of documents and fix a memory

Re: Silly newbie question - Caret character (^)

2010-11-09 Thread Seebs
On 2010-11-09, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message slrnidhsbg.g2d.usenet-nos...@guild.seebs.net, Seebs wrote: Not so much turgidity as being WRONG. Consistently and often. Wow. And the guy???s written so many books; how does he get away with it? No one

Best exercises for beginers to learn?

2010-11-09 Thread brf256
Hello, I was wondering if there are any good exercises that you would recommend learning? I've already done a menu exercise. Thanks! - Braden Faulkner -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get dynamically-created fxn's source?

2010-11-09 Thread Michele Simionato
On Nov 5, 5:55 pm, gb345 gb...@invalid.com wrote: For a project I'm working on I need a way to retrieve the source code of dynamically generated Python functions.  (These functions are implemented dynamically in order to simulate partial application in Python.[1])  The ultimate goal is to

Re: Best exercises for beginers to learn?

2010-11-09 Thread Seebs
On 2010-11-08, brf...@gmail.com brf...@gmail.com wrote: I was wondering if there are any good exercises that you would recommend learning? Yes. *Write something you want to use.* Nothing will teach you programming as fast as programming stuff you care about for the joy of having it.

A way to get setup.py to create links instead of copy

2010-11-09 Thread Geoff Bache
Hi all, One of the things I've always loved about Python (having come from compiled languages) was the lack of an extra step between changing my code and running it. On my current project, however, I find that I have to install my Python code with setup.py before it will run. Being used to not

List index out of range, but list has enough elements

2010-11-09 Thread Costin Gamenț
Hi, I am trying to read a string as csv, but I encountered an odd problem. Here's my code: csvfile = csv.reader(datastr.split('\n'), delimiter=';') r = '' for i in csvfile: for j in i: print j print i[0] the print j

Re: Silly newbie question - Caret character (^)

2010-11-09 Thread Lawrence D'Oliveiro
In message slrnidhvpr.hb4.usenet-nos...@guild.seebs.net, Seebs wrote: The publisher doesn't care whether the books are accurate ... A sad state for the once-proud name “Osborne” ... -- http://mail.python.org/mailman/listinfo/python-list

Re: How to test if a module exists?

2010-11-09 Thread Lawrence D'Oliveiro
In message roy-e7c8b9.22342706112...@news.panix.com, Roy Smith wrote: Fail early and often, that's what I say. Good advice that could apply to lots of things. Except maybe procrastination ... :) -- http://mail.python.org/mailman/listinfo/python-list

Re: JavaScript vs Python

2010-11-09 Thread Lawrence D'Oliveiro
In message mailman.757.1289287828.2218.python-l...@python.org, Chris Rebert wrote: On Mon, Nov 8, 2010 at 10:52 PM, Lawrence D'Oliveiro l...@geek-central.gen.nz wrote: Because JavaScript is actually a decent language in its own right. The Good Parts of it anyway. Python, too, has its

Re: Compare source code

2010-11-09 Thread Lawrence D'Oliveiro
In message mailman.718.1289147839.2218.python-l...@python.org, Ethan Furman wrote: Lawrence D'Oliveiro wrote: In message iapom0$k4...@speranza.aioe.org, Tim Harig wrote: I personally prefer tabs as it lets *me* decide how far the apparent indentations are in the code. But they don’t.

Re: List index out of range, but list has enough elements

2010-11-09 Thread Stefan Behnel
Costin Gamenț, 09.11.2010 10:24: Hi, I am trying to read a string as csv, but I encountered an odd problem. Here's my code: csvfile = csv.reader(datastr.split('\n'), delimiter=';') r = '' for i in csvfile: for j in i: print j

Re: Pythonic/idiomatic?

2010-11-09 Thread Peter Otten
Seebs wrote: I have an existing hunk of Makefile code: CPPFLAGS = $(filter -D* -I* -i* -U*,$(TARGET_CFLAGS)) For those not familiar with GNU makeisms, this means assemble a string which consists of all the words in $(TARGET_CFLAGS) which start with one of -D, -I, -i, or -U. So if you give

Re: List index out of range, but list has enough elements

2010-11-09 Thread Peter Otten
Costin Gamenț wrote: Hi, I am trying to read a string as csv, but I encountered an odd problem. Here's my code: csvfile = csv.reader(datastr.split('\n'), delimiter=';') r = '' for i in csvfile: for j in i: print j

Re: List index out of range, but list has enough elements

2010-11-09 Thread Costin Gamenț
Thank you for your timely response. Yes, I am sure i and j are from the same iteration. I should point out that i actually has 8 elements and that str(i) gives a nice printout. On Tue, Nov 9, 2010 at 11:33 AM, Stefan Behnel stefan...@behnel.de wrote: Costin Gamenț, 09.11.2010 10:24: Hi, I am

Re: List index out of range, but list has enough elements

2010-11-09 Thread Nitin Pawar
You may want to try a spilt if you are getting 8 different elements then it will give you a list of those elements On Tue, Nov 9, 2010 at 3:21 PM, Costin Gamenț costin.gam...@gmail.comwrote: Thank you for your timely response. Yes, I am sure i and j are from the same iteration. I should point

Re: Pythonic/idiomatic?

2010-11-09 Thread Mark Wooding
Seebs usenet-nos...@seebs.net writes: ' '.join([x for x in target_cflags.split() if re.match('^-[DIiU]', x)]) This appears to do the same thing, but is it an idiomatic use of list comprehensions, or should I be breaking it out into more bits? It looks OK to me. You say (elsewhere in

Re: Compare source code

2010-11-09 Thread Mark Wooding
Arnaud Delobelle arno...@gmail.com writes: python-mode has python-beginning-of-block (C-c C-u) and python-end-of-block. Yes. It was one of my explicit gripes that editing Python requires one to learn entirely new and unfamiliar keystrokes for doing fairly familiar editing tasks. -- [mdw] --

Re: List index out of range, but list has enough elements

2010-11-09 Thread Costin Gamenț
Thank you all for your interest in my problem. As Peter pointed out, there was one row with zero elements in it and that's where my problem was (of course it was the very last row, hence my confidence I have good data). Have a nice one, Costin On Tue, Nov 9, 2010 at 12:02 PM, Nitin Pawar

Re: List index out of range, but list has enough elements

2010-11-09 Thread Stefan Behnel
[rearranged the responses in the right order] Costin Gamenț, 09.11.2010 11:44: On Tue, Nov 9, 2010 at 3:21 PM, Costin Gamenț wrote: On Tue, Nov 9, 2010 at 11:33 AM, Stefan Behnel wrote: Costin Gamenț, 09.11.2010 10:24: Hi, I am trying to read a string as csv, but I encountered an odd

Re: How to test if a module exists?

2010-11-09 Thread Jean-Michel Pichavant
Jon Dufresne wrote: On Sat, Nov 6, 2010 at 1:52 PM, Roy Smith r...@panix.com wrote: import sys try: import xx except ImportError: tb = sys.exc_traceback while tb: print tb tb = tb.tb_next I went ahead and implemented this and it now works. I even uncovered a

udp sockets with python

2010-11-09 Thread Mag Gam
Hello, When measuring round trip time for the UDP echo client/server the C version is much faster. I was wondering if there is anything I can do to speed up. My current code for client looks like this sock=socket(AF_INET,SOCK_DGRAM) for x in range (1000): sock.sendto(foo,(server,port))

Re: How to test if a module exists?

2010-11-09 Thread Roy Smith
In article ibatkk$t7...@lust.ihug.co.nz, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message roy-4c92bb.16523506112...@news.panix.com, Roy Smith wrote: On the other hand, if your module's bug is that it in turn imports some other module, which doesn't exist, you'll

Re: Compare source code

2010-11-09 Thread Neil Cerutti
On 2010-11-07, Ethan Furman et...@stoneleaf.us wrote: Lawrence D'Oliveiro wrote: In message iapom0$k4...@speranza.aioe.org, Tim Harig wrote: I personally prefer tabs as it lets *me* decide how far the apparent indentations are in the code. But they don???t. Other people can have different

RE: { '0':'c-c-a' ,'1':'a-b-a' .........}

2010-11-09 Thread Sells, Fred
Since your keys are not unique, I would think that you would want a list of values for the object corresponding to each key. Something like Mydict = {} Mydict.setdefault(mykey, []).append(avalue) -Original Message- From: python-list-bounces+frsells=adventistcare@python.org

Re: Pythonic/idiomatic?

2010-11-09 Thread Jean-Michel Pichavant
Seebs wrote: I have an existing hunk of Makefile code: CPPFLAGS = $(filter -D* -I* -i* -U*,$(TARGET_CFLAGS)) For those not familiar with GNU makeisms, this means assemble a string which consists of all the words in $(TARGET_CFLAGS) which start with one of -D, -I, -i, or -U. So if you

Re: Cross compiling (i386 from amd64) with distutils

2010-11-09 Thread bobicanprogram
On Nov 7, 7:19 pm, Jason jason.hee...@gmail.com wrote: My situation is this: I have a Diamond Systems single-board computer with a matching GPIO board. DS have a library for controlling the GPIO board... but it's a static library (libdscud-6.02.a) with an accompanying header (dscud.h). I'd

Dictionary of lists strange behaviour

2010-11-09 Thread Ciccio
Hi all, hope you can help me understanding why the following happens: In [213]: g = {'a': ['a1','a2'], 'b':['b1','b2']} In [214]: rg = dict.fromkeys(g.keys(),[]) In [215]: rg Out[215]: {'a': [], 'b': []} In [216]: rg['a'].append('x') In [217]: rg Out[217]: {'a': ['x'], 'b': ['x']} What I meant

Re: Dictionary of lists strange behaviour

2010-11-09 Thread Matteo Landi
On Tue, Nov 9, 2010 at 3:14 PM, Ciccio franap...@gmail.com wrote: Hi all, hope you can help me understanding why the following happens: In [213]: g = {'a': ['a1','a2'], 'b':['b1','b2']} In [214]: rg = dict.fromkeys(g.keys(),[]) The argument you pass which is used to fill the values of the

Free E-Books collection

2010-11-09 Thread naveed ahmed
Freeit http://freeit11.blogspot.comis the world's leading online source of ebooks, with a vast range of ebooks from academic, Popular and professional publishers. Freeit http://freeit11.blogspot.com eBook communicates my vision of exploring the whole universe to you. What if you had a plausible

Re: Commercial or Famous Applicattions.?

2010-11-09 Thread Kevin Walzer
On 11/8/10 7:18 PM, Jorge Biquez wrote: Hello all. Newbie question. Sorry. Can you mention applications/systems/solutions made with Python that are well known and used by public in general? ANd that maybe we do not know they are done with Python? There are several on the Mac: Checkout, a

Re: Dictionary of lists strange behaviour

2010-11-09 Thread Jean-Michel Pichavant
Ciccio wrote: Hi all, hope you can help me understanding why the following happens: In [213]: g = {'a': ['a1','a2'], 'b':['b1','b2']} In [214]: rg = dict.fromkeys(g.keys(),[]) In [215]: rg Out[215]: {'a': [], 'b': []} In [216]: rg['a'].append('x') In [217]: rg Out[217]: {'a': ['x'], 'b':

Re: Silly newbie question - Caret character (^)

2010-11-09 Thread Philip Semanchuk
On Nov 9, 2010, at 1:04 AM, Lawrence D'Oliveiro wrote: In message slrnidhcns.9m6.usenet-nos...@guild.seebs.net, Seebs wrote: On 2010-11-09, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message mailman.697.1289067607.2218.python-l...@python.org, Dennis Lee Bieber

Help Documenting Python Syntax

2010-11-09 Thread RJB
I have been trying to redevelop a syntax page for Python at http://cse.csusb.edu/dick/samples/python.syntax.html I would appreciate and encouragement or corrections -- because I know there is at least one gross error in there. By the way, this is part of a suite of language definitions...

Re: Commercial or Famous Applicattions.?

2010-11-09 Thread Martin Gregorie
On Tue, 09 Nov 2010 00:47:08 +, brf256 wrote: Mailman is of course. ...and don't forget getmail, a better behaved replacement for fetchmail. -- martin@ | Martin Gregorie gregorie. | Essex, UK org | -- http://mail.python.org/mailman/listinfo/python-list

Re: Best exercises for beginers to learn?

2010-11-09 Thread Matty Sarro
I agree completely with Seebs, however I will mention that until you find a project that tickles your fancy there are some good places to find exercises. Pyschools: http://www.pyschools.com Project Euler: http://projecteuler.net/ You can also check out: http://learnpythonthehardway.org/index The

Re: Dictionary of lists strange behaviour

2010-11-09 Thread Dave Angel
On 2:59 PM, Ciccio wrote: Hi all, hope you can help me understanding why the following happens: In [213]: g = {'a': ['a1','a2'], 'b':['b1','b2']} In [214]: rg = dict.fromkeys(g.keys(),[]) In [215]: rg Out[215]: {'a': [], 'b': []} In [216]: rg['a'].append('x') In [217]: rg Out[217]: {'a':

Re: Dictionary of lists strange behaviour

2010-11-09 Thread Terry Reedy
On 11/9/2010 9:14 AM, Ciccio wrote: Hi all, hope you can help me understanding why the following happens: In [213]: g = {'a': ['a1','a2'], 'b':['b1','b2']} In [214]: rg = dict.fromkeys(g.keys(),[]) If you rewrite this as bl = [] rg = dict.fromkeys(g.keys(),bl) is the answer any more

Re: Commercial or Famous Applicattions.?

2010-11-09 Thread Grant Edwards
On 2010-11-09, Jorge Biquez jbiq...@icsmx.com wrote: Can you mention applications/systems/solutions made with Python that are well known and used by public in general? ANd that maybe we do not know they are done with Python? I'm not sure how much the public in general knows about it, but

Re: Help Documenting Python Syntax

2010-11-09 Thread Grant Edwards
On 2010-11-09, Terry Reedy tjre...@udel.edu wrote: On 11/9/2010 10:26 AM, RJB wrote: I have been trying to redevelop a syntax page for Python at http://cse.csusb.edu/dick/samples/python.syntax.html Page does not load correctly; had to hit refresh to get entire page. It should specify

Re: Deditor 0.2.2

2010-11-09 Thread Kruptein
On Nov 8, 3:01 pm, Jean-Michel Pichavant jeanmic...@sequans.com wrote: TheSeeker wrote: On Nov 6, 7:06 am, Kruptein darragh@gmail.com wrote: Hey, I released version 0.2.2 of my pythonic text-editor  Deditor. It adds the use of projects, a project is a set of files which you can

Re: udp sockets with python

2010-11-09 Thread Jean-Paul Calderone
On Nov 9, 5:20 am, Mag Gam magaw...@gmail.com wrote: Hello, When measuring round trip time for the UDP echo client/server the C version is much faster. I was wondering if there is anything I can do to speed up. My current code for client looks like this sock=socket(AF_INET,SOCK_DGRAM)

Re: Help Documenting Python Syntax

2010-11-09 Thread Terry Reedy
On 11/9/2010 10:26 AM, RJB wrote: I have been trying to redevelop a syntax page for Python at http://cse.csusb.edu/dick/samples/python.syntax.html Page does not load correctly; had to hit refresh to get entire page. It should specify that this is the syntax for Python 2.5. To me the

Re: Dictionary of lists strange behaviour

2010-11-09 Thread Ciccio
Il 09/11/2010 16:47, Terry Reedy ha scritto: On 11/9/2010 9:14 AM, Ciccio wrote: Hi all, hope you can help me understanding why the following happens: In [213]: g = {'a': ['a1','a2'], 'b':['b1','b2']} In [214]: rg = dict.fromkeys(g.keys(),[]) If you rewrite this as bl = [] rg =

Re: Dictionary of lists strange behaviour

2010-11-09 Thread Ciccio
Thank you all, this was timely and helpful. francesco -- http://mail.python.org/mailman/listinfo/python-list

Re: A way to get setup.py to create links instead of copy

2010-11-09 Thread Steve Holden
On 11/9/2010 4:18 AM, Geoff Bache wrote: Hi all, One of the things I've always loved about Python (having come from compiled languages) was the lack of an extra step between changing my code and running it. On my current project, however, I find that I have to install my Python code with

Learning Pyhton - Functional Programming - How intersect/difference two dict with dict/values? fast!

2010-11-09 Thread macm
Hi Folks, dict1 = {'ab':[[1,2,3,'d3','d4',5],12],'ac':[[1,3,'78a','79b'], 54],'ad': [[56,57,58,59],34], 'ax': [[56,57,58,59],34]} dict2 = {'ab':[[22,2,'a0','42s','c4','d3'],12],'ab':[[2,4,50,42,'c4'], 12],'ac':[[1,3,'79b',45,65,'er4'],54],'ae': [[56,57,58,59],34],'ax': [[9],34]} dict3 =

Re: Silly newbie question - Caret character (^)

2010-11-09 Thread Terry Reedy
On 11/9/2010 2:00 AM, Seebs wrote: Yes, Herb Schildt: http://www.seebs.net/c/c_tcn4e.html I've been wondering why C programmers keep writing code susceptible to buffer overruns ;=). Your two 'nitpicks' about fflush have both come up on this list as real issues causing people

Re: How to test if a module exists?

2010-11-09 Thread Jon Dufresne
On Tue, Nov 9, 2010 at 4:30 AM, Roy Smith r...@panix.com wrote: In article ibatkk$t7...@lust.ihug.co.nz,  Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message roy-4c92bb.16523506112...@news.panix.com, Roy Smith wrote: On the other hand, if your module's bug is that it in

Re: How to test if a module exists?

2010-11-09 Thread Jon Dufresne
On Mon, Nov 8, 2010 at 11:35 PM, Lawrence D'Oliveiro l...@geek-central.gen.nz wrote: In message roy-4c92bb.16523506112...@news.panix.com, Roy Smith wrote: On the other hand, if your module's bug is that it in turn imports some other module, which doesn't exist, you'll also get an ImportError.

Re: Learning Pyhton - Functional Programming - How intersect/difference two dict with dict/values? fast!

2010-11-09 Thread Peter Otten
macm wrote: Hi Folks, dict1 = {'ab':[[1,2,3,'d3','d4',5],12],'ac':[[1,3,'78a','79b'], 54],'ad': [[56,57,58,59],34], 'ax': [[56,57,58,59],34]} dict2 = {'ab':[[22,2,'a0','42s','c4','d3'],12],'ab':[[2,4,50,42,'c4'], 12],'ac':[[1,3,'79b',45,65,'er4'],54],'ae': [[56,57,58,59],34],'ax':

Re: Dictionary of lists strange behaviour

2010-11-09 Thread Terry Reedy
On 11/9/2010 12:19 PM, Ciccio wrote: Il 09/11/2010 16:47, Terry Reedy ha scritto: On 11/9/2010 9:14 AM, Ciccio wrote: Hi all, hope you can help me understanding why the following happens: In [213]: g = {'a': ['a1','a2'], 'b':['b1','b2']} In [214]: rg = dict.fromkeys(g.keys(),[]) If you

An easier way to do this? (spoiler if you're using pyschools for fun)

2010-11-09 Thread Matty Sarro
Hey everyone, I'm working on one of the puzzles on pyschools.com, and am trying to figure out if I can make my solution a bit more elegant. def getSumOfLastDigit(numList): sumOfDigits=0 for i in range(0, len(numList)): num=str(numList.pop()) sumOfDigits+=int(num[-1:])

Re: An easier way to do this? (spoiler if you're using pyschools for fun)

2010-11-09 Thread Chris Rebert
On Tue, Nov 9, 2010 at 11:00 AM, Matty Sarro msa...@gmail.com wrote: Hey everyone, I'm working on one of the puzzles on pyschools.com, and am trying to figure out if I can make my solution a bit more elegant. def getSumOfLastDigit(numList):     sumOfDigits=0     for i in range(0,

Re: An easier way to do this? (spoiler if you're using pyschools for fun)

2010-11-09 Thread Peter Otten
Matty Sarro wrote: Hey everyone, I'm working on one of the puzzles on pyschools.com, and am trying to figure out if I can make my solution a bit more elegant. def getSumOfLastDigit(numList): sumOfDigits=0 for i in range(0, len(numList)): num=str(numList.pop())

Re: An easier way to do this? (spoiler if you're using pyschools for fun)

2010-11-09 Thread Terry Reedy
On 11/9/2010 2:00 PM, Matty Sarro wrote: I'm working on one of the puzzles on pyschools.com http://pyschools.com, and am trying to figure out if I can make my solution a bit more elegant. Definitely def getSumOfLastDigit(numList): sumOfDigits=0 for i in range(0, len(numList)):

Re: Learning Pyhton - Functional Programming - How intersect/difference two dict with dict/values? fast!

2010-11-09 Thread John Nagle
On 11/9/2010 9:32 AM, macm wrote: Hi Folks, dict1 = {'ab':[[1,2,3,'d3','d4',5],12],'ac':[[1,3,'78a','79b'], 54],'ad': [[56,57,58,59],34], 'ax': [[56,57,58,59],34]} dict2 = {'ab':[[22,2,'a0','42s','c4','d3'],12],'ab':[[2,4,50,42,'c4'], 12],'ac':[[1,3,'79b',45,65,'er4'],54],'ae':

Re: Why flat is better than nested?

2010-11-09 Thread Gregory Ewing
Lawrence D'Oliveiro wrote: In message d4e7f8b9-9526-4bf5-b4d7-e398912eb...@b19g2000prj.googlegroups.com, rustom wrote: If you take zen seriously you dont get it If you dont take zen seriously you dont get it That -- seriously -- is zen I don’t get it. I get it. Does that mean that I

Re: Learning Pyhton - Functional Programming - How intersect/difference two dict with dict/values? fast!

2010-11-09 Thread Terry Reedy
On 11/9/2010 9:32 AM, macm wrote: dict1 = {'ab':[[1,2,3,'d3','d4',5],12],'ac':[[1,3,'78a','79b'], 54],'ad': [[56,57,58,59],34], 'ax': [[56,57,58,59],34]} To echo John Nagle's point, if you want non-masochist volunteers to read your code, write something readable like: dict1 = {'ab':

Re: Learning Pyhton - Functional Programming - How intersect/difference two dict with dict/values? fast!

2010-11-09 Thread D'Arcy J.M. Cain
On Tue, 09 Nov 2010 15:55:16 -0500 Terry Reedy tjre...@udel.edu wrote: To echo John Nagle's point, if you want non-masochist volunteers to read your code, write something readable like: dict1 = {'ab': [[1,2,3,'d3','d4',5], 12], 'ac': [[1,3,'78a','79b'], 54], 'ad':

Re: JavaScript vs Python

2010-11-09 Thread Stef Mientki
On 09-11-2010 10:25, Lawrence D'Oliveiro wrote: In message mailman.757.1289287828.2218.python-l...@python.org, Chris Rebert wrote: On Mon, Nov 8, 2010 at 10:52 PM, Lawrence D'Oliveiro l...@geek-central.gen.nz wrote: Because JavaScript is actually a decent language in its own right. The

Re: populating a doubly-subscripted array

2010-11-09 Thread Gregory Ewing
Mark Wooding wrote: What [x] * n does is make a list, whose length is n, and all of whose entries are precisely the value x. If x itself is a list, then you get an outer list all of whose entries are the /same/ inner list A reasonably elegant way to fix this is to use list comprehensions for

Re: Why flat is better than nested?

2010-11-09 Thread John Posner
On 11/9/2010 3:44 PM, Gregory Ewing wrote: I don’t get it. I get it. Does that mean that I don't get it? Yes. As Dr. Feynman said about quantum mechanics. -John -- http://mail.python.org/mailman/listinfo/python-list

Re: functions, list, default parameters

2010-11-09 Thread Mark Wooding
Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes: In message mailman.608.129032.2218.python-l...@python.org, Robert Kern wrote: So examining LHS selectors is not sufficient for determining immutability. Yes it is. All your attempts at counterexamples showed is that it is

Re: Silly newbie question - Caret character (^)

2010-11-09 Thread Mark Wooding
Philip Semanchuk phi...@semanchuk.com writes: What's funny is that I went looking for a printed copy of the C standard a few years back and the advice I got was that the cheapest route was to find a used copy of Schildt's Annotated ANSI C Standard and ignore the annotations. So it serves at

Re: Deditor 0.2.2

2010-11-09 Thread TheSeeker
On Nov 9, 10:04 am, Kruptein darragh@gmail.com wrote: On Nov 8, 3:01 pm, Jean-Michel Pichavant jeanmic...@sequans.com wrote: TheSeeker wrote: On Nov 6, 7:06 am, Kruptein darragh@gmail.com wrote: Hey, I released version 0.2.2 of my pythonic text-editor  Deditor.

Re: subclassing str

2010-11-09 Thread Mark Wooding
rantingrick rantingr...@gmail.com writes: One thing i love about Python is the fact that it can please almost all the religious paradigm zealots with it's multiple choice approach to programming. However some of the features that OOP fundamentalists hold dear in their heart are not always

Kareena and Saif Kissing I Kurbaan sex scene | Kareena Topless Kiss | Kurbaan Kiss

2010-11-09 Thread Sana Khan
http://groups.google.com/group/hsfun/t/8c6133cfeac2eff0 -- http://mail.python.org/mailman/listinfo/python-list

Re: Dictionary of lists strange behaviour

2010-11-09 Thread John Posner
On 11/9/2010 1:43 PM, Terry Reedy wrote: ... List *is* useful as an initializer for collecitons.defaultdicts. And it was useful when several members of this forum helped me to develop a prime-number generator. See http://www.mail-archive.com/python-list@python.org/msg288128.html. (I meant

Re: populating a doubly-subscripted array

2010-11-09 Thread Mark Wooding
Gregory Ewing greg.ew...@canterbury.ac.nz writes: A reasonably elegant way to fix this is to use list comprehensions for all except the innermost list: ff = [[0.0]*5 for i in xrange(5)] Yes, this is a good approach. I should have suggested something like this as a solution myself, rather

Re: Silly newbie question - Caret character (^)

2010-11-09 Thread Lawrence D'Oliveiro
In message 87pquekxbe.fsf@metalzone.distorted.org.uk, Mark Wooding wrote: The book was much cheaper than a copy of the C standard from ANSI or ISO even when it was new. It was a common joke (HHOS) at the time that the difference in price reflected the value of the annotations. Crapware

Re: Silly newbie question - Caret character (^)

2010-11-09 Thread Lawrence D'Oliveiro
In message mailman.778.1289325458.2218.python-l...@python.org, Terry Reedy wrote: I've been wondering why C programmers keep writing code susceptible to buffer overruns ;=). I am continually disappointed with the ‘do as I say, not as I do” attitude among people offering up sample code. I

python script installation wizard

2010-11-09 Thread macro coders
i want simple hello world script. i want python installer. sample image http://img705.imageshack.us/img705/9430/py2exe.png how do python setup wizard? -- *Www.PythonTR.Org* -macrocoders- -- http://mail.python.org/mailman/listinfo/python-list

Re: Learning Pyhton - Functional Programming - How intersect/difference two dict with dict/values? fast!

2010-11-09 Thread macm
Sorry Mr. Nagle and Folks I had a bad day today. I need forward but with fever, a grasp and headache is hard. You are absolute right, I was rude and I ask your pardon. About my code, sorry I thought was the best way to copy and paste in python console. Best Regards macm On Nov 9, 7:03 pm,

Re: Silly newbie question - Caret character (^)

2010-11-09 Thread Lawrence D'Oliveiro
In message mailman.778.1289325458.2218.python-l...@python.org, Terry Reedy wrote: Your two 'nitpicks' about fflush have both come up on this list as real issues causing people problems. Cache on disk drives is a bug, not a feature. Performance-wise, it’s fast RAM hobbled by being located on

Re: Allowing comments after the line continuation backslash

2010-11-09 Thread Mark Wooding
Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes: In message 87fwvdb69k.fsf@metalzone.distorted.org.uk, Mark Wooding wrote: for descr, attr, colours in [ ('normal', 'image','Normal'), ('highlighted', 'highlight','Highlighted'),

Re: python script installation wizard

2010-11-09 Thread Ian Kelly
On Tue, Nov 9, 2010 at 3:43 PM, macro coders macrocod...@gmail.com wrote: i want simple hello world script. i want python installer. sample image http://img705.imageshack.us/img705/9430/py2exe.png how do python setup wizard? Use the distutils package in the standard library. You'll need

Re: Allowing comments after the line continuation backslash

2010-11-09 Thread Robert Kern
On 11/9/10 4:51 PM, Mark Wooding wrote: Lawrence D'Oliveirol...@geek-central.gen.new_zealand writes: In message87fwvdb69k.fsf@metalzone.distorted.org.uk, Mark Wooding wrote: for descr, attr, colours in [ ('normal', 'image','Normal'), ('highlighted',

Re: Pythonic/idiomatic?

2010-11-09 Thread Seebs
On 2010-11-09, Jean-Michel Pichavant jeanmic...@sequans.com wrote: One pythonic way to do it, is to use an option parser. That seems like massive overkill -- I don't care about any of the other options. It seems like it'd result in doing more work to get and then extract the options, and most

Re: Silly newbie question - Caret character (^)

2010-11-09 Thread Seebs
On 2010-11-09, Terry Reedy tjre...@udel.edu wrote: I've been wondering why C programmers keep writing code susceptible to buffer overruns ;=). Because we're dumb! (Actually, in my defense, my code almost never, if ever, has buffer overruns. I do in some rare cases have truncation issues

Re: Pythonic/idiomatic?

2010-11-09 Thread Martin Gregorie
On Wed, 10 Nov 2010 00:11:23 +, Seebs wrote: On 2010-11-09, Jean-Michel Pichavant jeanmic...@sequans.com wrote: One pythonic way to do it, is to use an option parser. That seems like massive overkill -- I don't care about any of the other options. It seems like it'd result in doing

Re: Pythonic/idiomatic?

2010-11-09 Thread Robert Kern
On 11/8/10 8:13 PM, Seebs wrote: On 2010-11-09, Ben Finneyben+pyt...@benfinney.id.au wrote: Seebsusenet-nos...@seebs.net writes: I think we're stuck with backwards compatibility at least as far as 2.4. Then you don't yet have the ???any??? and ???all??? built-in functions, or the

Re: Allowing comments after the line continuation backslash

2010-11-09 Thread Tim Chase
On 11/09/10 18:05, Robert Kern wrote: For me, putting the brackets on their own lines (and using a trailing comma) has little to do with increasing readability. It's for making editing easier. It also makes diff's much easier to read (my big impetus for doing the same as Robert) -tkc --

Re: Allowing comments after the line continuation backslash

2010-11-09 Thread Mark Wooding
Tim Chase python.l...@tim.thechases.com writes: On 11/09/10 18:05, Robert Kern wrote: For me, putting the brackets on their own lines (and using a trailing comma) has little to do with increasing readability. It's for making editing easier. It also makes diff's much easier to read (my

DTD Parsing

2010-11-09 Thread Asun Friere
Now that PyXML (and thus xmlproc) is defunct, does anyone know any handy modules (apart from re :) for parsing DTDs? -- http://mail.python.org/mailman/listinfo/python-list

Re: Allowing comments after the line continuation backslash

2010-11-09 Thread Tim Chase
On 11/09/10 19:39, Mark Wooding wrote: Tim Chasepython.l...@tim.thechases.com writes: It also makes diff's much easier to read Hmm. That's a good point, actually. I'm not overly fussed about the ease of editing: it doesn't seem especially hard either way. But nice diffs are definitely

Re: DTD Parsing

2010-11-09 Thread Felipe Bastos Nunes
I'd like to know too. I work with java and jdom, but I'm doing personal things in python, and plan to go full python in the next 2 years. Xml is my first option for configuration files and simple storages. 2010/11/10, Asun Friere afri...@yahoo.co.uk: Now that PyXML (and thus xmlproc) is defunct,

Re: DTD Parsing

2010-11-09 Thread Christian Heimes
Am 10.11.2010 03:44, schrieb Felipe Bastos Nunes: I'd like to know too. I work with java and jdom, but I'm doing personal things in python, and plan to go full python in the next 2 years. Xml is my first option for configuration files and simple storages. Don't repeat the mistakes of others

Re: Allowing comments after the line continuation backslash

2010-11-09 Thread Robert Kern
On 2010-11-09 19:39 , Mark Wooding wrote: Tim Chasepython.l...@tim.thechases.com writes: On 11/09/10 18:05, Robert Kern wrote: For me, putting the brackets on their own lines (and using a trailing comma) has little to do with increasing readability. It's for making editing easier. It also

Re: DTD Parsing

2010-11-09 Thread Asun Friere
On Nov 10, 2:02 pm, Christian Heimes li...@cheimes.de wrote: Am 10.11.2010 03:44, schrieb Felipe Bastos Nunes: I'd like to know too. I work with java and jdom, but I'm doing personal things in python, and plan to go full python in the next 2 years. Xml is my first option for configuration

Re: DTD Parsing

2010-11-09 Thread Asun Friere
On Nov 10, 2:02 pm, Christian Heimes li...@cheimes.de wrote: Back to the initial question: I highly recommend LXML for any kind of XML processing, validation, XPath etc. Sorry Christian, didn't realise at first that that was a response to MY intial question. But does lxml actually have

Re: Commercial or Famous Applicattions.?

2010-11-09 Thread Lawrence D'Oliveiro
In message ibbj3j$pv...@localhost.localdomain, Martin Gregorie wrote: ...and don't forget getmail, a better behaved replacement for fetchmail. I was just looking this up in the Getmail FAQ, since I didn’t know about the issues with Fetchmail. That’s it, ESR is off my Christmas-card list... --

Re: Silly newbie question - Caret character (^)

2010-11-09 Thread Lawrence D'Oliveiro
In message slrnidhvpr.hb4.usenet-nos...@guild.seebs.net, Seebs wrote: In particular, he's very good at making up complications from whole cloth which aren't really problems, and then offering solutions which show people a clever trick to work around the problem. (e.g., his elaborate

Re: Silly newbie question - Caret character (^)

2010-11-09 Thread Seebs
On 2010-11-10, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: What was sad to me to read http://www.seebs.net/c/c_tcn4e.html was this phrase of yours: ... but rather, takes the shortest path to something that won't get those complaints anymore ... To me, this is the

Re: Compare source code

2010-11-09 Thread Dan Stromberg
On Thu, Nov 4, 2010 at 10:45 AM, Tim Harig user...@ilthio.net wrote: I also looked at F# and Scala; but, neither are really applicable on my chosen platform. With F# being such a new language, I suspect that it borrowed its indent practices either from Haskell or from Python. I'm pretty sure

Re: Why flat is better than nested?

2010-11-09 Thread alex23
Gregory Ewing greg.ew...@canterbury.ac.nz wrote: I get it. Does that mean that I don't get it? Mu. -- http://mail.python.org/mailman/listinfo/python-list

Re: DTD Parsing

2010-11-09 Thread Stefan Behnel
Asun Friere, 10.11.2010 04:42: On Nov 10, 2:02 pm, Christian Heimes wrote: Back to the initial question: I highly recommend LXML for any kind of XML processing, validation, XPath etc. Sorry Christian, didn't realise at first that that was a response to MY intial question. But does lxml

Re: DTD Parsing

2010-11-09 Thread Asun Friere
On Nov 10, 4:11 pm, Stefan Behnel stefan...@behnel.de wrote: What's your interest in parsing a DTD if you're not up to validating XML? Spitting out boilerplate code. Just at the moment I'm creating a stub XSLT sheet, which creates a template per element (from a 3rd party DTD with 143 elements,

Class extension confusion :(

2010-11-09 Thread r0g
I have a subclass of BaseHHTPRequestHandler which uses a dictonary paths and a function api_call which are defined in the main namespace of the module. I'd rather I was able to pass these object to the constructor and store them as data attributes self.paths and self.api_call but I'm not sure

Re: DTD Parsing

2010-11-09 Thread Stefan Behnel
Asun Friere, 10.11.2010 06:41: On Nov 10, 4:11 pm, Stefan Behnel wrote: What's your interest in parsing a DTD if you're not up to validating XML? Spitting out boilerplate code. [...] A few years back I used a similar technique to write some boiler plate python code where xml was

  1   2   >