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 wrote: > On Jan 5, 10:57 am, Sandro Tosi 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 very usefull and > powerfull library

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

2009-01-11 Thread Dotan Cohen
2009/1/5 Sandro Tosi : > 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 lead to a better

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 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 > window is my fav

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 2.5

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 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 of mpl, and o

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" wrote: > 2009/1/5 Sandro Tosi : > > 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 plotted using Python to scrape

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 "", line 1, in ? Fi

Re: Python strings and coding conventions

2009-01-11 Thread Ben Finney
Robert Kern 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 indents as 4 spaces no

Re: why cannot assign to function call

2009-01-11 Thread Mark Wooding
ru...@yahoo.com wrote: > Mark Wooding wrote: > > 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: > > > > #include

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: Tracebac

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 dylib

Re: why cannot assign to function call

2009-01-11 Thread Aaron Brady
On Jan 10, 1:49 pm, Joe Strout 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.   > >> That's correct.  The reference itsel

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, some

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 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 identical to the semantics o

Re: why cannot assign to function call

2009-01-11 Thread Paul Rubin
Steven D'Aprano 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 being passed is an address. -- http://

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

Re: Python strings and coding conventions

2009-01-11 Thread Steve Holden
Mensanator wrote: > On Jan 10, 10:26�pm, Robert Kern 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 which

Re: why cannot assign to function call

2009-01-11 Thread Aaron Brady
On Jan 11, 8:32 am, Paul Rubin wrote: > Steven D'Aprano 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 p

Re: Python strings and coding conventions

2009-01-11 Thread MRAB
koranth...@gmail.com wrote: On Jan 11, 9:26 am, Robert Kern 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 which I am going

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

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 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. I

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 hard

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 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 s

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

2009-01-11 Thread Dotan Cohen
2009/1/11 Sandro Tosi : >> 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 currencies, parsing

Re: Python strings and coding conventions

2009-01-11 Thread Roy Smith
In article <5db6181f-d6f6-4bdc-88c8-e12ad228c...@r41g2000prr.googlegroups.com>, Mensanator 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 old manua

Re: why cannot assign to function call

2009-01-11 Thread Mark Wooding
Aaron Brady 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 well-understood meaning, and app

Re: Python strings and coding conventions

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

Re: why cannot assign to function call

2009-01-11 Thread Mark Wooding
Steven D'Aprano 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 means something else. I qu

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 yo

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

2009-01-11 Thread Mark Tolonen
"Barak, Ron" 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 wrote: > 2009/1/11 Sandro Tosi : >>> 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, >>

Re: why cannot assign to function call

2009-01-11 Thread rurpy
Mark Wooding wrote: > ru...@yahoo.com wrote: >> Mark Wooding wrote: >> > 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. "v[1] =

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 do

Re: Python strings and coding conventions

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

Re: why cannot assign to function call

2009-01-11 Thread Mark Wooding
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 (thanks):

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 wrote: > On Jan 12, 5:34�am, Mensanator wrote: > > > > > > > On Jan 11, 12:12 pm, Roy Smith wrote: > > > > In article > > > <5db6181f-d6f6-4bdc-88c8-e12ad228c...@r41g2000prr.googlegroups.com>, > > > > Mensanator wrote: > > > > > What are all those line continuati

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 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 Python wh

Re: Python strings and coding conventions

2009-01-11 Thread John Machin
On Jan 12, 8:23 am, Mensanator wrote: > On Jan 11, 2:37 pm, John Machin wrote: > > > > > > > On Jan 12, 5:34 am, Mensanator wrote: > > > > On Jan 11, 12:12 pm, Roy Smith wrote: > > > > > In article > > > > <5db6181f-d6f6-4bdc-88c8-e12ad228c...@r41g2000prr.googlegroups.com>, > > > > > Mensanator

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

2009-01-11 Thread BJörn Lindqvist
2009/1/11 Madhusudan.C.S : > 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 = "some l

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 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 saying ball1 = ball

Re: Object help

2009-01-11 Thread Jervis Whitley
On Mon, Jan 12, 2009 at 9:06 AM, killsto 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 it possib

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" 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 Python where ever I

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" 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, 2.6.1, 2.6, 2.5.2.

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

2009-01-11 Thread Paul Rubin
Carl Banks 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++, and > pretty much any

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

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

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

2009-01-11 Thread Carl Banks
On Jan 11, 5:02 pm, Paul Rubin wrote: > Carl Banks 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

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

2009-01-11 Thread Paul Rubin
Carl Banks 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 uncontrolled >

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 wrote: > On Jan 11, 3:31 pm, Chris Rebert wrote: >> On Sun, Jan 11, 2009 at 1:22 PM, Madhusudan.C.S >> wrote: >> >def somemethod(self, arg1): >> >self.c = 20.22 >> >d = "some local variable" >> ># do something >> >.

Re: Object help

2009-01-11 Thread killsto
On Jan 11, 2:20 pm, Steven D'Aprano 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 saying ball1 = ball()? > > Because

Re: Object help

2009-01-11 Thread James Mills
On Mon, Jan 12, 2009 at 9:49 AM, killsto 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++ which > is listless

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 writes: >> 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 > always have att

Re: Object help

2009-01-11 Thread Chris Rebert
On Sun, Jan 11, 2009 at 3:49 PM, killsto wrote: > On Jan 11, 2:20 pm, Steven D'Aprano 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 d

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 be

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

2009-01-11 Thread Mark Wooding
Carl Banks 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 proxies, have uncerta

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" 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 possible to write F

Re: Where Find Activestate Python 2.5?

2009-01-11 Thread W. eWatson
John Machin wrote: On Jan 12, 9:55 am, "W. eWatson" 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 Carl Banks
On Jan 11, 5:49 pm, Chris Rebert wrote: > On Sun, Jan 11, 2009 at 3:15 PM, Carl Banks wrote: > > On Jan 11, 3:31 pm, Chris Rebert wrote: > >> On Sun, Jan 11, 2009 at 1:22 PM, Madhusudan.C.S > >> wrote: > >> >    def somemethod(self, arg1): > >> >        self.c = 20.22 > >> >        d = "some l

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

2009-01-11 Thread r
On Jan 11, 6:00 pm, Roy Smith wrote: > In article > <34c95e04-5b3f-44bc-a5bf-498518507...@p36g2000prp.googlegroups.com>, > >  "Madhusudan.C.S" 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

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 acce

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

2009-01-11 Thread Paul Rubin
Carl Banks 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 one place, in most cases.

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

2009-01-11 Thread Carl Banks
On Jan 11, 5:41 pm, Paul Rubin wrote: > Carl Banks 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 th

Re: Where Find Activestate Python 2.5?

2009-01-11 Thread Marek Kubica
On Sun, 11 Jan 2009 16:29:16 -0800 "W. eWatson" wrote: > Using that gets me to > , 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" button? regar

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

2009-01-11 Thread Carl Banks
On Jan 11, 6:42 pm, Paul Rubin wrote: > Carl Banks 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 bette

Re: Object help

2009-01-11 Thread John Machin
On Jan 12, 10:49 am, killsto wrote: > On Jan 11, 2:20 pm, Steven D'Aprano > 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 withou

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

2009-01-11 Thread Roy Smith
In article , Chris Rebert 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 need to read and understand. -- http://mail.python.org/mailman/lis

Re: Problem with -3 switch

2009-01-11 Thread Carl Banks
On Jan 9, 6:11 pm, John Machin wrote: > On Jan 10, 6:58 am, Carl Banks wrote: > > > > > On Jan 9, 12:36 pm, "J. Cliff Dyer" wrote: > > > > On Fri, 2009-01-09 at 13:13 -0500, Steve Holden wrote: > > > > Aivar Annamaa wrote: > > > > >> As was recently pointed out in a nearly identical thread, the

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 wrote: > On Jan 11, 5:49 pm, Chris Rebert wrote: >> On Sun, Jan 11, 2009 at 3:15 PM, Carl Banks wrote: >> > On Jan 11, 3:31 pm, Chris Rebert wrote: >> >> On Sun, Jan 11, 2009 at 1:22 PM, Madhusudan.C.S >> >> wrote: >> >> >def somemethod(self, ar

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 "", line 1, in 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 wrote: > Hi, > > Adapted your kindly suggestions in a previous post, I now decide to > organize my source tree in a pattern like below: > > > prj: >src: >

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 "", line 1, in File "/usr/lib/python2.6/urllib

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) Ob

Re: urllib2 - 403 that _should_ not occur.

2009-01-11 Thread James Mills
On Mon, Jan 12, 2009 at 12:58 PM, Philip Semanchuk 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 > 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/

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

2009-01-11 Thread Aahz
In article , Qiangning Hong 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 file a bug on bugs.python.org -- that's the only way this can be tracked. -- Aa

Re: urllib2 - 403 that _should_ not occur.

2009-01-11 Thread James Mills
On Mon, Jan 12, 2009 at 1:25 PM, Philip Semanchuk 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 with > a distinct

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 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 actually implemented,

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, us

Re: Object help

2009-01-11 Thread James Mills
On Mon, Jan 12, 2009 at 2:26 PM, killsto 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 the rest of the wor

Re: Problem with -3 switch

2009-01-11 Thread John Machin
On Jan 12, 12:23 pm, Carl Banks wrote: > On Jan 9, 6:11 pm, John Machin wrote: > > > > > > > On Jan 10, 6:58 am, Carl Banks wrote: > > > > On Jan 9, 12:36 pm, "J. Cliff Dyer" wrote: > > > > > On Fri, 2009-01-09 at 13:13 -0500, Steve Holden wrote: > > > > > Aivar Annamaa wrote: > > > > > >> As w

Re: urllib2 - 403 that _should_ not occur.

2009-01-11 Thread Chris Mellon
On Sun, Jan 11, 2009 at 9:05 PM, James Mills wrote: > On Mon, Jan 12, 2009 at 12:58 PM, Philip Semanchuk > 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://gro

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

2009-01-11 Thread John Machin
On Jan 12, 2:00 pm, "W. eWatson" 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 the PythonWin I

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 wrote: > Alex K schrieb: > >> While building a website using template inheritance one usually does >> the following

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 sp