[ANN] Leipzig Python User Group - Meeting, January 13, 2009, 08:00pm

2009-01-11 Thread Mike Müller
=== Leipzig Python User Group === We will meet on Tuesday, January 13 at 8:00 pm at the training center of Python Academy in Leipzig, Germany ( http://www.python-academy.com/center/find.html ). Food and soft drinks are provided. Please send a short confirmation mail to i...@python-academy.de,

Re: What would you like to see in a book about Matplotlib?

2009-01-11 Thread Sandro Tosi
Hello Marco, thanks for your reply (and sorry for my late one) On Jan 6, 9:26 am, Marco Nawijn naw...@gmail.com wrote: On Jan 5, 10:57 am, Sandro Tosi matrixh...@gmail.com wrote: I am happy to hear that there might be a book on Matplotlib. I am using Matplotlib for a while now and find it a

Re: What would you like to see in a book about Matplotlib?

2009-01-11 Thread Dotan Cohen
2009/1/5 Sandro Tosi matrixh...@gmail.com: Hello and Happy 2009! I received the interesting proposal to author a book on Matplotlib, the powerful 2D plotting library for Python. While preparing the arguments list, I'd like to hear even your opinion, because different points-of-view will

Re: What would you like to see in a book about Matplotlib?

2009-01-11 Thread Sandro Tosi
Hi James, thanks for getting back to me. On Jan 6, 9:33 am, James Stroud jstr...@mbi.ucla.edu wrote: Sandro Tosi wrote: - what are the things you like the most of matplotlib, that you want to give emphasis to? And why? The ability to embed a figure (composed of subplots) into a custom

Re: Python strings and coding conventions

2009-01-11 Thread Marc 'BlackJack' Rintsch
On Sat, 10 Jan 2009 20:48:21 -0800, Mensanator wrote: Damn! I didn't know you could do that! And if I saw it in a program listing, such would never occur to me. I was going to suggest the stupid way: ga = ['four score and seven years ago ', \ 'our fathers brought forth ', \

Is negative seek() from EOF of a GzipFile supported on Python 2.5.2 ?

2009-01-11 Thread Barak, Ron
Hi Mark, I googled a bit, and found http://bugs.python.org/issue1355023. It seems that this patch implemented fuller seek() for GzipFile around November 2006 (including whence==2). Do I misunderstand and this patch was not actually implemented, namely, is seek(-n,2) not implemented in Python

Re: What would you like to see in a book about Matplotlib?

2009-01-11 Thread Sandro Tosi
Hello Thomas, thanks for your reply. On Jan 7, 5:11 pm, Thomas Guettler h...@tbz-pariv.de wrote: Sandro Tosi schrieb: - what are you using matplotlib for? I use the API to create PNGs from data stored in postgres. Webframework: Django. Nice, I plan to make some examples of web embedding

Re: What would you like to see in a book about Matplotlib?

2009-01-11 Thread Sandro Tosi
Hi Dotan, On Jan 11, 10:02 am, Dotan Cohen dotanco...@gmail.com wrote: 2009/1/5 Sandro Tosi matrixh...@gmail.com: Your suggestions are really appreciated :) And wish me good luck! I wish you good luck! Thanks you :) I would suggest at least a chapter on _acquiring_ the data that is to be

Bad hack fix around a bizarre problem...

2009-01-11 Thread Just Another Victim of the Ambient Morality
I'm trying to write a Python program that manipulates a MySQL database and have chosen to use MySQLdb. So, I used by system's package manager, YUM, and it appeared to install correctly. So, I tried it out and got this error: Traceback (most recent call last): File stdin, line 1, in ?

Re: Python strings and coding conventions

2009-01-11 Thread Ben Finney
Robert Kern robert.k...@gmail.com writes: I usually use implicit concatenation: s = ('some long text that ' 'needs to be split') I do something very similar: fleebnorg.spam = ( 'some long text that' ' needs to be split') The differences are: I prefer to have

Re: why cannot assign to function call

2009-01-11 Thread Mark Wooding
ru...@yahoo.com ru...@yahoo.com wrote: Mark Wooding wrote: ru...@yahoo.com ru...@yahoo.com wrote: What is the observable difference between converting an array to a reference (pointer) to that array and passing the reference by value, and passing the array by reference? For one:

Re: Bad hack fix around a bizarre problem...

2009-01-11 Thread Diez B. Roggisch
Just Another Victim of the Ambient Morality schrieb: I'm trying to write a Python program that manipulates a MySQL database and have chosen to use MySQLdb. So, I used by system's package manager, YUM, and it appeared to install correctly. So, I tried it out and got this error:

Re: Python 2.6.1 @executable_path

2009-01-11 Thread googler . 1 . webmaster
Hi! :) Thank you. I found PySys_SetPythonHome() to set the path where the lib folder of Python is, but I guess they are not really implemented because they are fixed compiled for an absolute path, aren't they? Thats the whole problem. Do you have a suggestoin for the command line how I can build

Re: Python 2.6.1 @executable_path

2009-01-11 Thread googler . 1 . webmaster
Thank you, I found PySys_SetPythonHome() to set the path where the lib folder of Python is, but I guess they are not really implemented because they are fixed compiled with an absolute path, aren't they? Thats the problem. I hadn't compiled Python and I don't know if I should compile it as a

Re: why cannot assign to function call

2009-01-11 Thread Aaron Brady
On Jan 10, 1:49 pm, Joe Strout j...@strout.net wrote: Aaron Brady wrote: Aaron Brady wrote: Possible compromise.  You can think of functions as mutation-only. You pass the object, and it gets a new (additional) name.  The old name doesn't go in.  /compromise That's correct.  The

Re: if-else statement

2009-01-11 Thread Aaron Brady
On Jan 10, 2:28 pm, bearophileh...@lycos.com wrote: Scott David Daniels:       if checking:           my_var = 'string'       else:           my_var = 'other string' remember, vertical space only kills trees if printed. I value clarity a lot. But this is more DRY, sometimes it's

Re: why cannot assign to function call

2009-01-11 Thread Steven D'Aprano
On Sun, 11 Jan 2009 03:25:24 +, Mark Wooding wrote: Steven D'Aprano st...@remove-this-cybersource.com.au wrote: I don't believe it is a red-herring. As I understand it, Mark and Joe insist that C is pass-by-value *even in the case of arrays*, despite the semantics of array passing being

Re: why cannot assign to function call

2009-01-11 Thread Paul Rubin
Steven D'Aprano st...@remove-this-cybersource.com.au writes: If it walks like pass-by-reference, and smells like pass-by-reference, and swims like pass-by-reference, is it still your contention that it is pass-by-value? Of course the C example is pass by value. It's just that the value

Re: Regex for unicode letter characters

2009-01-11 Thread Steve Holden
MRAB wrote: Steve Holden wrote: MRAB wrote: schickb wrote: I need a regex that will match strings containing only unicode letter characters (not including numeric or the _ character). I was surprised to find the 're' module does not include a special character class for this already (python

Re: Python strings and coding conventions

2009-01-11 Thread Steve Holden
Mensanator wrote: On Jan 10, 10:26�pm, Robert Kern robert.k...@gmail.com wrote: koranth...@gmail.com wrote: Hi, � �Python Coding Convention (PEP 8) suggests : � Maximum Line Length � � Limit all lines to a maximum of 79 characters. � I have a string which is ~110 char long. It is a string

Re: why cannot assign to function call

2009-01-11 Thread Aaron Brady
On Jan 11, 8:32 am, Paul Rubin http://phr...@nospam.invalid wrote: Steven D'Aprano st...@remove-this-cybersource.com.au writes: If it walks like pass-by-reference, and smells like pass-by-reference, and swims like pass-by-reference, is it still your contention that it is pass-by-value? Of

Re: Python strings and coding conventions

2009-01-11 Thread MRAB
koranth...@gmail.com wrote: On Jan 11, 9:26 am, Robert Kern robert.k...@gmail.com wrote: koranth...@gmail.com wrote: Hi, Python Coding Convention (PEP 8) suggests : Maximum Line Length Limit all lines to a maximum of 79 characters. I have a string which is ~110 char long. It is a

Re: Python 2.6.1 @executable_path

2009-01-11 Thread Michael Torrie
googler.1.webmas...@spamgourmet.com wrote: Thank you, I found PySys_SetPythonHome() to set the path where the lib folder of Python is, but I guess they are not really implemented because they are fixed compiled with an absolute path, aren't they? I'm afraid I'm not following you here. What is

Re: why cannot assign to function call

2009-01-11 Thread Steven D'Aprano
On Sun, 11 Jan 2009 06:32:31 -0800, Paul Rubin wrote: Steven D'Aprano st...@remove-this-cybersource.com.au writes: If it walks like pass-by-reference, and smells like pass-by-reference, and swims like pass-by-reference, is it still your contention that it is pass-by-value? Of course the C

Re: Python 2.6.1 @executable_path

2009-01-11 Thread googler . 1 . webmaster
yeap, okay, its just the beginning so I didn't know that the framework is still the dylib file. Well, I only want to compile python and put the framework in the subdirectory. Thats all. And the current state is, that the framework is not found because the path of the compiled Python library is

template inheritance

2009-01-11 Thread Alex K
While building a website using template inheritance one usually does the following: fetch from database fetch from some more data from database ... more required computations then at the end render the template with the fetched data Without template inheritance one usually does the following:

Re: Python strings and coding conventions

2009-01-11 Thread Mensanator
On Jan 11, 3:56�am, Marc 'BlackJack' Rintsch bj_...@gmx.net wrote: On Sat, 10 Jan 2009 20:48:21 -0800, Mensanator wrote: Damn! I didn't know you could do that! And if I saw it in a program listing, such would never occur to me. I was going to suggest the stupid way: ga = ['four score and

Re: What would you like to see in a book about Matplotlib?

2009-01-11 Thread Dotan Cohen
2009/1/11 Sandro Tosi matrixh...@gmail.com: I would suggest at least a chapter on _acquiring_ the data that is to be plotted using Python to scrape different sources _not_designed_ to be scraped. Online webpages come to mind. An example on retrieving, for instance, the prices of varying

Re: Python strings and coding conventions

2009-01-11 Thread Roy Smith
In article 5db6181f-d6f6-4bdc-88c8-e12ad228c...@r41g2000prr.googlegroups.com, Mensanator mensana...@aol.com wrote: What are all those line continuation characters ('\') for? ?You are aware that they are unnecessary here? Actually, I wasn't aware of that. A quick review shows why. In the

Re: why cannot assign to function call

2009-01-11 Thread Mark Wooding
Aaron Brady castiro...@gmail.com wrote: True or not, it requires the reader to know what references are. And, since your definition conflicts with the C++ definition, it's not clear that the requirement is good. I blame C++ for coopting a perfectly good word with a established

Re: Python strings and coding conventions

2009-01-11 Thread Mensanator
On Jan 11, 12:12�pm, Roy Smith r...@panix.com wrote: In article 5db6181f-d6f6-4bdc-88c8-e12ad228c...@r41g2000prr.googlegroups.com, �Mensanator mensana...@aol.com wrote: What are all those line continuation characters ('\') for? ?You are aware that they are unnecessary here? Actually,

Re: why cannot assign to function call

2009-01-11 Thread Mark Wooding
Steven D'Aprano st...@remove-this-cybersource.com.au wrote: I guess this is where you explain again that arrays in C are bizarre, and that while int arr[2] inside a function body means declare an array of two ints and call it 'arr', the exact same declaration in a function parameter list

Unbinding Tkinter default bindings for Listbox

2009-01-11 Thread Roger
Hi Everyone, I have a behavior associated with a default binding with Tkinter Listbox that I want to get rid of but I can't no matter if I return break on the binding or unbind it directly. If you have a Listbox where the bounding box is not completely revealed in the window that holds it and you

Re: Is negative seek() from EOF of a GzipFile supported on Python 2.5.2 ?

2009-01-11 Thread Mark Tolonen
Barak, Ron ron.ba...@lsi.com wrote in message news:7f0503cd69378f49be0dc30661c6ccf602494...@enbmail01.lsi.com... The source of gzip.py on my system seems to suggest that negative seeks are supported: def seek(self, offset): if self.mode == WRITE: if offset self.offset:

Re: What would you like to see in a book about Matplotlib?

2009-01-11 Thread Sandro Tosi
On Sun, Jan 11, 2009 at 18:50, Dotan Cohen dotanco...@gmail.com wrote: 2009/1/11 Sandro Tosi matrixh...@gmail.com: I would suggest at least a chapter on _acquiring_ the data that is to be plotted using Python to scrape different sources _not_designed_ to be scraped. Online webpages come to

Re: why cannot assign to function call

2009-01-11 Thread rurpy
Mark Wooding wrote: ru...@yahoo.com ru...@yahoo.com wrote: Mark Wooding wrote: ru...@yahoo.com ru...@yahoo.com wrote: ... For another: static void bar(char v[]) { char ch = 0; v = ch; } /* type error if arrays truly passed by reference */ v can be used as an array reference, e.g.

Re: template inheritance

2009-01-11 Thread Diez B. Roggisch
Alex K schrieb: While building a website using template inheritance one usually does the following: fetch from database fetch from some more data from database ... more required computations then at the end render the template with the fetched data Without template inheritance one usually

Re: Python strings and coding conventions

2009-01-11 Thread John Machin
On Jan 12, 5:34 am, Mensanator mensana...@aol.com wrote: On Jan 11, 12:12 pm, Roy Smith r...@panix.com wrote: In article 5db6181f-d6f6-4bdc-88c8-e12ad228c...@r41g2000prr.googlegroups.com, Mensanator mensana...@aol.com wrote: What are all those line continuation characters ('\')

Re: why cannot assign to function call

2009-01-11 Thread Mark Wooding
ru...@yahoo.com ru...@yahoo.com wrote: But if you'll note, I said if ... referring to a couple of hypothetical C-like languages, so your chapter-and-verse quote from the standard, while interesting and appreciated, was basically irrelevant. Ah, what you actually said was still quoted above

Does Python really follow its philosophy of Readability counts?

2009-01-11 Thread Madhusudan.C.S
I am sorry all I am not here to just blame Python. This is just an introspection of whether what I believe is right. Being a devotee of Python from past 2 years I have been writing only small apps and singing praises about Python where ever I go. I now got a chance to read Django's code for some

Re: Python strings and coding conventions

2009-01-11 Thread Mensanator
On Jan 11, 2:37�pm, John Machin sjmac...@lexicon.net wrote: On Jan 12, 5:34�am, Mensanator mensana...@aol.com wrote: On Jan 11, 12:12 pm, Roy Smith r...@panix.com wrote: In article 5db6181f-d6f6-4bdc-88c8-e12ad228c...@r41g2000prr.googlegroups.com, Mensanator mensana...@aol.com

Re: Does Python really follow its philosophy of Readability counts?

2009-01-11 Thread Chris Rebert
On Sun, Jan 11, 2009 at 1:22 PM, Madhusudan.C.S madhusuda...@gmail.com wrote: I am sorry all I am not here to just blame Python. This is just an introspection of whether what I believe is right. Being a devotee of Python from past 2 years I have been writing only small apps and singing

Re: Python strings and coding conventions

2009-01-11 Thread John Machin
On Jan 12, 8:23 am, Mensanator mensana...@aol.com wrote: On Jan 11, 2:37 pm, John Machin sjmac...@lexicon.net wrote: On Jan 12, 5:34 am, Mensanator mensana...@aol.com wrote: On Jan 11, 12:12 pm, Roy Smith r...@panix.com wrote: In article

Re: Does Python really follow its philosophy of Readability counts?

2009-01-11 Thread BJörn Lindqvist
2009/1/11 Madhusudan.C.S madhusuda...@gmail.com: Django's code for some reason. I have now strongly started feeling if Python really follows its Readability Counts philosophy. For example, class A: a = 10 b = Madhu def somemethod(self, arg1): self.c = 20.22 d =

Object help

2009-01-11 Thread killsto
I have a class called ball. The members are things like position, size, active. So each ball is an object. How do I make the object without specifically saying ball1 = ball()? Because I don't know how many balls I want; each time it is different. The balls are to be thrown in from the outside of

Re: Object help

2009-01-11 Thread Chris Rebert
On Sun, Jan 11, 2009 at 2:06 PM, killsto kilian...@gmail.com wrote: I have a class called ball. The members are things like position, size, active. So each ball is an object. Class names should use CamelCase, so it should be `Ball`, not `ball`. How do I make the object without specifically

Re: Object help

2009-01-11 Thread Jervis Whitley
On Mon, Jan 12, 2009 at 9:06 AM, killsto kilian...@gmail.com wrote: I would think something like: def newball(): x = last_named_ball + 1 ball_x = ball(size, etc) # this initializes a new ball return ball_x But then that would just name a ball ball_x, not ball_1 or ball_2. Is

Re: Object help

2009-01-11 Thread Steven D'Aprano
On Sun, 11 Jan 2009 14:06:22 -0800, killsto wrote: I have a class called ball. The members are things like position, size, active. So each ball is an object. How do I make the object without specifically saying ball1 = ball()? Because I don't know how many balls I want; each time it is

Re: Does Python really follow its philosophy of Readability counts?

2009-01-11 Thread Carl Banks
On Jan 11, 3:22 pm, Madhusudan.C.S madhusuda...@gmail.com wrote:   I am sorry all I am not here to just blame Python. This is just an introspection of whether what I believe is right. Being a devotee of Python from past 2 years I have been writing only small apps and singing praises about

Where Find Activestate Python 2.5?

2009-01-11 Thread W. eWatson
I went to their site and the only choice seems 2.6. I looked around and found no other choices. Is it possible to get 2.5? -- W. eWatson (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz Site: 39° 15' 7 N, 121° 2' 32 W, 2700 feet

Re: Where Find Activestate Python 2.5?

2009-01-11 Thread John Machin
On Jan 12, 9:55 am, W. eWatson notval...@sbcglobal.net wrote: I went to their site and the only choice seems 2.6. I looked around and found no other choices. Is it possible to get 2.5? What do you see when you go to http://www.activestate.com/activepython/downloads/ and scroll down? I see 3.0,

Re: Does Python really follow its philosophy of Readability counts?

2009-01-11 Thread Paul Rubin
Carl Banks pavlovevide...@gmail.com writes: and where it was manipulated for that matter. This criticism is completely unfair. Instance variables have to be manipulated somewhere, and unless your object is immutable, that is going to happen outside of __init__. That's true in Java, C++,

Re: Does Python really follow its philosophy of Readability counts?

2009-01-11 Thread Carl Banks
On Jan 11, 3:31 pm, Chris Rebert c...@rebertia.com wrote: On Sun, Jan 11, 2009 at 1:22 PM, Madhusudan.C.S madhusuda...@gmail.com wrote:    def somemethod(self, arg1):        self.c = 20.22        d = some local variable        # do something            ...    def somemethod2

Re: Does Python really follow its philosophy of Readability counts?

2009-01-11 Thread Carl Banks
On Jan 11, 5:02 pm, Paul Rubin http://phr...@nospam.invalid wrote: Carl Banks pavlovevide...@gmail.com writes: and where it was manipulated for that matter. This criticism is completely unfair.  Instance variables have to be manipulated somewhere, and unless your object is immutable, that

Re: Does Python really follow its philosophy of Readability counts?

2009-01-11 Thread Paul Rubin
Carl Banks pavlovevide...@gmail.com writes: The criticism is very valid.  Some languages do support immutable variables (e.g. final declarations in Java, const in C++, or universal immutability in pure functional languages) and they do so precisely for the purpose of taming the chaos of

Re: Does Python really follow its philosophy of Readability counts?

2009-01-11 Thread Chris Rebert
On Sun, Jan 11, 2009 at 3:15 PM, Carl Banks pavlovevide...@gmail.com wrote: On Jan 11, 3:31 pm, Chris Rebert c...@rebertia.com wrote: On Sun, Jan 11, 2009 at 1:22 PM, Madhusudan.C.S madhusuda...@gmail.com wrote: def somemethod(self, arg1): self.c = 20.22 d = some local

Re: Object help

2009-01-11 Thread killsto
On Jan 11, 2:20 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Sun, 11 Jan 2009 14:06:22 -0800, killsto wrote: I have a class called ball. The members are things like position, size, active. So each ball is an object. How do I make the object without specifically

Re: Object help

2009-01-11 Thread James Mills
On Mon, Jan 12, 2009 at 9:49 AM, killsto kilian...@gmail.com wrote: Thanks. That makes sense. It helps a lot. Although, you spelled color wrong :P. color colour They are both correct depending on what country you come from :) Just curious, is there another way? How would I do this in c++

Re: Does Python really follow its philosophy of Readability counts?

2009-01-11 Thread Chris Rebert
On Sun, Jan 11, 2009 at 3:41 PM, Paul Rubin http://phr.cx@nospam.invalid wrote: Carl Banks pavlovevide...@gmail.com writes: snip If any objects are mutable, you have to be prepared for objects to mutated outside the initializer. Sure, but why have mutable objects all over the place? And, why

Re: Object help

2009-01-11 Thread Chris Rebert
On Sun, Jan 11, 2009 at 3:49 PM, killsto kilian...@gmail.com wrote: On Jan 11, 2:20 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Sun, 11 Jan 2009 14:06:22 -0800, killsto wrote: I have a class called ball. The members are things like position, size, active. So each

Re: Python 2.6.1 @executable_path

2009-01-11 Thread Michael Torrie
googler.1.webmas...@spamgourmet.com wrote: yeap, okay, its just the beginning so I didn't know that the framework is still the dylib file. Well, I only want to compile python and put the framework in the subdirectory. Thats all. And the current state is, that the framework is not found

Re: Does Python really follow its philosophy of Readability counts?

2009-01-11 Thread Mark Wooding
Carl Banks pavlovevide...@gmail.com wrote: [Dynamically adding and removing instance attributes...] Here's a couple examples of where it's useful: 1. Sometimes classes are initialized without calling __init__, [...] 2. Some classes have factory classmethods [...] 3. Some objects, such as

Re: Does Python really follow its philosophy of Readability counts?

2009-01-11 Thread Roy Smith
In article 34c95e04-5b3f-44bc-a5bf-498518507...@p36g2000prp.googlegroups.com, Madhusudan.C.S madhusuda...@gmail.com wrote: In such situations, where the Instance variables come into existence only when they are used it is very difficult to track the flow of code. As the saying goes, It's

Re: Where Find Activestate Python 2.5?

2009-01-11 Thread W. eWatson
John Machin wrote: On Jan 12, 9:55 am, W. eWatson notval...@sbcglobal.net wrote: I went to their site and the only choice seems 2.6. I looked around and found no other choices. Is it possible to get 2.5? What do you see when you go to http://www.activestate.com/activepython/downloads/ and

Re: Does Python really follow its philosophy of Readability counts?

2009-01-11 Thread Carl Banks
On Jan 11, 5:49 pm, Chris Rebert c...@rebertia.com wrote: On Sun, Jan 11, 2009 at 3:15 PM, Carl Banks pavlovevide...@gmail.com wrote: On Jan 11, 3:31 pm, Chris Rebert c...@rebertia.com wrote: On Sun, Jan 11, 2009 at 1:22 PM, Madhusudan.C.S madhusuda...@gmail.com wrote:    def

Re: Does Python really follow its philosophy of Readability counts?

2009-01-11 Thread r
On Jan 11, 6:00 pm, Roy Smith r...@panix.com wrote: In article 34c95e04-5b3f-44bc-a5bf-498518507...@p36g2000prp.googlegroups.com,  Madhusudan.C.S madhusuda...@gmail.com wrote: In such situations, where the Instance variables come into existence only when they are used it is very difficult

Re: Object help

2009-01-11 Thread Terry Reedy
killsto wrote: Just curious, is there another way? How would I do this in c++ which is listless IIRC. If you do not have 0) built-in expandable arrays, as in Python, one can 1) program (or find) the equivalent of Python lists; 2) use linked-lists (as long as one does not need O(1) random

Re: Does Python really follow its philosophy of Readability counts?

2009-01-11 Thread Paul Rubin
Carl Banks pavlovevide...@gmail.com writes: If so, what is it that's so evil about conditionally-existent variables? (I'll leave the question open-ended this time.) I have found they make the code more confusing and bug prone. It's better to define and document all the instance variables in

Re: Does Python really follow its philosophy of Readability counts?

2009-01-11 Thread Carl Banks
On Jan 11, 5:41 pm, Paul Rubin http://phr...@nospam.invalid wrote: Carl Banks pavlovevide...@gmail.com writes: The criticism is very valid.  Some languages do support immutable variables (e.g. final declarations in Java, const in C++, or universal immutability in pure functional

Re: Where Find Activestate Python 2.5?

2009-01-11 Thread Marek Kubica
On Sun, 11 Jan 2009 16:29:16 -0800 W. eWatson notval...@sbcglobal.net wrote: Using that gets me to http://www.activestate.com/activepython/, the big download 2.6 button again. Nowhere did I get your url. An interesting maze. Tried that Other Systems and Versions just below that Download Now

Re: Does Python really follow its philosophy of Readability counts?

2009-01-11 Thread Carl Banks
On Jan 11, 6:42 pm, Paul Rubin http://phr...@nospam.invalid wrote: Carl Banks pavlovevide...@gmail.com writes: If so, what is it that's so evil about conditionally-existent variables?  (I'll leave the question open-ended this time.) I have found they make the code more confusing and bug

Re: Object help

2009-01-11 Thread John Machin
On Jan 12, 10:49 am, killsto kilian...@gmail.com wrote: On Jan 11, 2:20 pm, Steven D'Aprano st...@remove-this-cybersource.com.au wrote: On Sun, 11 Jan 2009 14:06:22 -0800, killsto wrote: I have a class called ball. The members are things like position, size, active. So each ball is an

Re: Does Python really follow its philosophy of Readability counts?

2009-01-11 Thread Roy Smith
In article mailman.7012.1231718339.3487.python-l...@python.org, Chris Rebert c...@rebertia.com wrote: This is not to say that breaking encapsulation willy-nilly is advised, but it does allow for some neat hackery every now and again. I'm all for neat hackery, except when used in code that I

Re: Problem with -3 switch

2009-01-11 Thread Carl Banks
On Jan 9, 6:11 pm, John Machin sjmac...@lexicon.net wrote: On Jan 10, 6:58 am, Carl Banks pavlovevide...@gmail.com wrote: On Jan 9, 12:36 pm, J. Cliff Dyer j...@sdf.lonestar.org wrote: On Fri, 2009-01-09 at 13:13 -0500, Steve Holden wrote: Aivar Annamaa wrote: As was recently

Re: Does Python really follow its philosophy of Readability counts?

2009-01-11 Thread Chris Rebert
On Sun, Jan 11, 2009 at 4:33 PM, Carl Banks pavlovevide...@gmail.com wrote: On Jan 11, 5:49 pm, Chris Rebert c...@rebertia.com wrote: On Sun, Jan 11, 2009 at 3:15 PM, Carl Banks pavlovevide...@gmail.com wrote: On Jan 11, 3:31 pm, Chris Rebert c...@rebertia.com wrote: On Sun, Jan 11, 2009 at

urllib2 - 403 that _should_ not occur.

2009-01-11 Thread James Mills
Hey all, The following fails for me: from urllib2 import urlopen f = urlopen(http://groups.google.com/group/chromium-announce/feed/rss_v2_0_msgs.xml;) Traceback (most recent call last): File stdin, line 1, in module File /usr/lib/python2.6/urllib2.py, line 124, in urlopen return

File layout in development stage

2009-01-11 Thread Steven Woody
Hi, Adapted your kindly suggestions in a previous post, I now decide to organize my source tree in a pattern like below: prj: src: lib: foomodule.py barmodule.py scripts: prj_main.py test: footest.py bartest.py

Re: File layout in development stage

2009-01-11 Thread alex goretoy
sys.path.append() -Alex Goretoy http://www.alexgoretoy.com somebodywhoca...@gmail.com On Mon, Jan 12, 2009 at 2:00 AM, Steven Woody narkewo...@gmail.com wrote: Hi, Adapted your kindly suggestions in a previous post, I now decide to organize my source tree in a pattern like below: prj:

Re: urllib2 - 403 that _should_ not occur.

2009-01-11 Thread Philip Semanchuk
On Jan 11, 2009, at 8:59 PM, James Mills wrote: Hey all, The following fails for me: from urllib2 import urlopen f = urlopen(http://groups.google.com/group/chromium-announce/feed/rss_v2_0_msgs.xml ) Traceback (most recent call last): File stdin, line 1, in module File

ActiveState Python Together with Regular Python) ((DLE)

2009-01-11 Thread W. eWatson
I installed Python 2.5 a few months ago with IDLE, and decided I'd like to try windowpy from ActiveState. Is having both of these installed going to cause me trouble? -- W. eWatson (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz

Re: urllib2 - 403 that _should_ not occur.

2009-01-11 Thread James Mills
On Mon, Jan 12, 2009 at 12:58 PM, Philip Semanchuk phi...@semanchuk.com wrote: On Jan 11, 2009, at 8:59 PM, James Mills wrote: Hey all, The following fails for me: from urllib2 import urlopen f = urlopen(http://groups.google.com/group/chromium-announce/feed/rss_v2_0_msgs.xml;)

Re: urllib2 - 403 that _should_ not occur.

2009-01-11 Thread Philip Semanchuk
On Jan 11, 2009, at 10:05 PM, James Mills wrote: On Mon, Jan 12, 2009 at 12:58 PM, Philip Semanchuk phi...@semanchuk.com wrote: On Jan 11, 2009, at 8:59 PM, James Mills wrote: Hey all, The following fails for me: from urllib2 import urlopen f =

Re: sys.stdout.write()'s bug or doc bug?

2009-01-11 Thread Aahz
In article f6fd0b02-effe-4be5-aeee-10d831f1c...@w24g2000prd.googlegroups.com, Qiangning Hong hon...@gmail.com wrote: So, my question is, as sys.stdout IS a file object, why it does not use its encoding attribute to convert the given unicode? An implementation bug? A documenation bug? Please

Re: urllib2 - 403 that _should_ not occur.

2009-01-11 Thread James Mills
On Mon, Jan 12, 2009 at 1:25 PM, Philip Semanchuk phi...@semanchuk.com wrote: Oooops, I guess it is my brain that's not working, then! Sorry about that. Nps. I tried your sample and got the 403. This works for me: (...) Some sites ban UAs that look like bots. I know there's a Java-based bot

Re: Is negative seek() from EOF of a GzipFile supported on Python 2.5.2 ?

2009-01-11 Thread Gabriel Genellina
En Sun, 11 Jan 2009 08:12:27 -0200, Barak, Ron ron.ba...@lsi.com escribió: I googled a bit, and found http://bugs.python.org/issue1355023. It seems that this patch implemented fuller seek() for GzipFile around November 2006 (including whence==2). Do I misunderstand and this patch was not

Re: Object help

2009-01-11 Thread killsto
Thanks. That makes sense. It helps a lot. Although, you spelled color wrong :P. At this time of day you are likely to find yourself communicating with Australians. Get used to it :-) Cheers, John I was kidding. IMO, we Americans should spell color like everyone else. Heck, use the

Re: Object help

2009-01-11 Thread James Mills
On Mon, Jan 12, 2009 at 2:26 PM, killsto kilian...@gmail.com wrote: I was kidding. IMO, we Americans should spell color like everyone else. Heck, use the metric system too while we are at it. Yes well why don't you start up a rally and convince your brand new shiny government to catch up with

Re: Problem with -3 switch

2009-01-11 Thread John Machin
On Jan 12, 12:23 pm, Carl Banks pavlovevide...@gmail.com wrote: On Jan 9, 6:11 pm, John Machin sjmac...@lexicon.net wrote: On Jan 10, 6:58 am, Carl Banks pavlovevide...@gmail.com wrote: On Jan 9, 12:36 pm, J. Cliff Dyer j...@sdf.lonestar.org wrote: On Fri, 2009-01-09 at 13:13

Re: urllib2 - 403 that _should_ not occur.

2009-01-11 Thread Chris Mellon
On Sun, Jan 11, 2009 at 9:05 PM, James Mills prolo...@shortcircuit.net.au wrote: On Mon, Jan 12, 2009 at 12:58 PM, Philip Semanchuk phi...@semanchuk.com wrote: On Jan 11, 2009, at 8:59 PM, James Mills wrote: Hey all, The following fails for me: from urllib2 import urlopen f =

Re: ActiveState Python Together with Regular Python) ((DLE)

2009-01-11 Thread John Machin
On Jan 12, 2:00 pm, W. eWatson notval...@sbcglobal.net wrote: I installed Python 2.5 a few months ago with IDLE, and decided I'd like to try windowpy from ActiveState. Is having both of these installed going to cause me trouble? What is windowpy from ActiveState? If you mean you wanted to try

Re: template inheritance

2009-01-11 Thread James Matthews
Not always sometimes you want to show some template code (You have a blog about web dev) and sometimes you want to nest some code. On Sun, Jan 11, 2009 at 10:04 PM, Diez B. Roggisch de...@nospam.web.dewrote: Alex K schrieb: While building a website using template inheritance one usually does

hlep: a text search and rename question

2009-01-11 Thread sensen
matter description: when a use an tools to do the ape to flac convert, i can use the cue file attached with ape, but the problem is the converted flac file don't name by the title in the cue file but like Track_1.flac, Track_2.flac ... , so i want to write a script to do this work, system is xp

[issue4279] Module 'parser' fails to build

2009-01-11 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: I have now committed 2.6.1-parsermodule.patch as r68523, r68524, r68525, and r68526. Thanks for the patch. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org

[issue4288] parsermodule and grammar variable

2009-01-11 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: This is now fixed with the resolution to issue 4279. -- resolution: - fixed status: open - closed superseder: - Module 'parser' fails to build ___ Python tracker rep...@bugs.python.org

[issue4895] Missing strdup() under MS Windows CE

2009-01-11 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Thanks for the patch. Committed as r68527, r68528. -- nosy: +loewis resolution: - accepted status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4895

[issue4893] Use separate thread support code under MS Windows CE

2009-01-11 Thread Ulrich Eckhardt
Ulrich Eckhardt eckha...@satorlaser.com added the comment: Okay, the changes necessary to the NT thread code are rather minimal, see attached patch. The file thread_wince.c could then be removed, too. I also removed a comment which was left over from the version before but doesn't apply any

[issue2504] Add gettext.pgettext() and variants support

2009-01-11 Thread Dwayne Bailey
Changes by Dwayne Bailey dwayne+pythonb...@translate.org.za: -- nosy: +dwayne ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2504 ___ ___

[issue4753] Faster opcode dispatch on gcc

2009-01-11 Thread Andrew Bennetts
Changes by Andrew Bennetts s...@users.sourceforge.net: -- nosy: +spiv ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4753 ___ ___ Python-bugs-list

[issue4220] Builtins treated as free variables?

2009-01-11 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: There is no way for the interpreter to distinguish between builtins and other types of free variables. If you need unqualified exec to work in an innner function, use function parameters with defaults, like this: def a(): def b(long=long):

[issue1293741] doctest runner cannot handle non-ascii characters

2009-01-11 Thread Luciano Ramalho
Luciano Ramalho luci...@ramalho.org added the comment: I have confirmed everything that akaihola reports in Python 2.4, 2.5 and 2.6, but the problem is not limited to non-matching test output. It also happens with doctests with zero failures when the module is run with the -v command-line

  1   2   >