[ANN] Release 0.71.4 of Task Coach

2008-12-07 Thread Frank Niessink
Hi, We're happy to announce release 0.71.4 of Task Coach. This release fixes a few bugs. Bugs fixed: * Opening an old .tsk file with missing e-mail attachments would crash Task Coach. * Don't throw exception when showing an (error) message while synchronizing. * When merging from the same file

can graphs be made in python as we make in java

2008-12-07 Thread suku
HI folks... i need some suggestion on making graphs. Will this be possible with normal python setup file or do i need to download add ons for that.. help me out -- http://mail.python.org/mailman/listinfo/python-list

Re: can graphs be made in python as we make in java

2008-12-07 Thread Chris Rebert
On Sun, Dec 7, 2008 at 12:29 AM, suku [EMAIL PROTECTED] wrote: HI folks... i need some suggestion on making graphs. Will this be possible with normal python setup file or do i need to download add ons for that.. Python includes no such module for that in the standard library. You'll need

Re: Brain going crazy with recursive functions

2008-12-07 Thread James Stroud
[EMAIL PROTECTED] wrote: I'm trying to solve the 9-tile puzzle using as functional an approach as possible. I've recently finished reading SICP and am deliberately avoiding easy python-isms for the more convoluted scheme/functional methods. The following function is trivial to do with for

Re: Brain going crazy with recursive functions

2008-12-07 Thread James Stroud
James Stroud wrote: def linear_search(array, truth_func, loc=(0,0)): idx1, idx2 = loc if idx1 = len(array): return None if idx2 = len(array[idx1]): return linear_search(array, truth_func, (idx1+1, 0)) value = array[idx1][idx2] tf = truth_func(value) if tf: return loc

var or inout parm?

2008-12-07 Thread mh
How can I make a var parm, where the called function can modify the value of the parameter in the caller? def f(x): x = x + 1 n = 1 f(n) # n should now be 2 Many TIA!! Mark -- Mark Harrison Pixar Animation Studios -- http://mail.python.org/mailman/listinfo/python-list

Re: var or inout parm?

2008-12-07 Thread Chris Rebert
On Sun, Dec 7, 2008 at 12:54 AM, [EMAIL PROTECTED] wrote: How can I make a var parm, where the called function can modify the value of the parameter in the caller? Not directly possible or encouraged. You can emulate it by sticking the value in a container object (e.g. list) though: def f(x):

Re: can graphs be made in python as we make in java

2008-12-07 Thread James Stroud
suku wrote: HI folks... i need some suggestion on making graphs. Will this be possible with normal python setup file or do i need to download add ons for that.. help me out I like pychart. It has the advantage of being pure python and makes very nice looking plots. You might

Re: Python 3.0 automatic decoding of UTF16

2008-12-07 Thread Terry Reedy
John Machin wrote: Here's the scoop: It's a bug in the newline handling (in io.py, class IncrementalNewlineDecoder, method decode). It reads text files in 128- byte chunks. Converting CR LF to \n requires special case handling when '\r' is detected at the end of the decoded chunk n in case

Re: how to get a beep, OS independent ?

2008-12-07 Thread Stef Mientki
Rainy wrote: On Dec 6, 3:40 pm, Stef Mientki [EMAIL PROTECTED] wrote: hello, I want to give a small beep, for windows there's message-beep, and there seems to be something like curses , but that package seems to be totally broken in P2.5 for windows. Any other suggestions ? thanks, Stef

Re: how to get a beep, OS independent ?

2008-12-07 Thread Chris Rebert
On Sun, Dec 7, 2008 at 1:27 AM, Stef Mientki [EMAIL PROTECTED] wrote: Rainy wrote: On Dec 6, 3:40 pm, Stef Mientki [EMAIL PROTECTED] wrote: hello, I want to give a small beep, for windows there's message-beep, and there seems to be something like curses , but that package seems to be

Re: Number of Python 3.x packages at the PyPI

2008-12-07 Thread Martin v. Löwis
[EMAIL PROTECTED] wrote: Is there an easy way to see the number of PyPI packages which have been ported to Python 3? Yes: browse all pacakges classified with Programming Language :: Python :: 3 You can find them at http://pypi.python.org/pypi?:action=browsec=533 It seems that some

Re: Python 3.0 automatic decoding of UTF16

2008-12-07 Thread John Machin
On Dec 7, 8:15 pm, Terry Reedy [EMAIL PROTECTED] wrote: John Machin wrote: Here's the scoop: It's a bug in the newline handling (in io.py, class IncrementalNewlineDecoder, method decode). It reads text files in 128- byte chunks. Converting CR LF to \n requires special case handling when

Re: Guido's new method definition idea

2008-12-07 Thread News123
Sorry Dennis, I don't understand your answer. I'm not very knowledgable with all the OO vocabulary, but just use OO. self.a , self.b , self.c are stored in the object and could later be used by other object-methods. like def print_a_b_c(self): print self,a,self.b,self.c the name

Re: as keyword woes

2008-12-07 Thread Aaron Brady
On Dec 6, 9:35 pm, Carl Banks [EMAIL PROTECTED] wrote: On Dec 6, 8:17 pm, Steven D'Aprano [EMAIL PROTECTED] I don't like cast, because a cast is an instruction to the compiler to treat data as some type other than what it was defined as. It doesn't create a new piece of data. (At least in

Re: Guido's new method definition idea

2008-12-07 Thread News123
Lie wrote: On Dec 7, 1:02 am, News123 [EMAIL PROTECTED] wrote: What would be interesting would be some syntactical sugar to get rid of the 'self' (at least in the code body). example: class C: class_elements a,b,c,d def method(self,arg): global d a,b,c =

Re: Rich Comparisons Gotcha

2008-12-07 Thread James Stroud
Rasmus Fogh wrote: Dear All, For the first time I have come across a Python feature that seems completely wrong. After the introduction of rich comparisons, equality comparison does not have to return a truth value, and may indeed return nothing at all and throw an error instead. As a result,

Re: Source code generation using Python

2008-12-07 Thread Alia Khouri
Any suggestions? I've happily used Cheetah with Leo (http://webpages.charter.net/ edreamleo/front.html) to organise and script my code generation needs, but you may also be happy with cog (http://nedbatchelder.com/code/ cog/). AK -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido's new method definition idea

2008-12-07 Thread Steven D'Aprano
On Sun, 07 Dec 2008 12:43:13 +0100, News123 wrote: Sorry Dennis, I don't understand your answer. I'm not very knowledgable with all the OO vocabulary, but just use OO. self.a , self.b , self.c are stored in the object and could later be used by other object-methods. In Python

Re: python book for non technical absolute beginner

2008-12-07 Thread News123
Thanks for your answers, I'll look at - Python Programming, for the absolute beginner (second edition by MichaelDawson. and at the LiveWires Course: http://www.livewires.org.uk/python/home I looked at http://www.greenteapress.com/thinkpython/thinkCSpy/ but think it's not a good choice for a

Re: var or inout parm?

2008-12-07 Thread Steven D'Aprano
On Sun, 07 Dec 2008 08:54:46 +, mh wrote: How can I make a var parm, where the called function can modify the value of the parameter in the caller? By using another language. def f(x): x = x + 1 n = 1 f(n) # n should now be 2 Python doesn't work like that. You should read

Re: as keyword woes

2008-12-07 Thread Aaron Brady
On Dec 6, 2:29 pm, Guido van Rossum [EMAIL PROTECTED] wrote: snip So, assuming I now wish to propose a corrective PEP to remedy this situation for Python 3.1 and beyond, what is the best way to get started on such a proposal? Don't bother writing a PEP to make 'as' available as an

Re: var or inout parm?

2008-12-07 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: How can I make a var parm, where the called function can modify the value of the parameter in the caller? def f(x): x = x + 1 n = 1 f(n) # n should now be 2 Chris showed one way, another is simply returning it. As python can return ad-hoc created tuples

Re: Rich Comparisons Gotcha

2008-12-07 Thread Rasmus Fogh
Robert Kern Wrote: Terry Reedy wrote: Rasmus Fogh wrote: Personally I would like to get these [EMAIL PROTECTED]* misfeatures removed, What you are calling a misfeature is an absence, not a presence that can be removed. That's not quite true. Rich comparisons explicitly allow non-boolean

Re: Select, interrupted system call, log rotation?

2008-12-07 Thread Vinay Sajip
On Dec 6, 8:39 pm, Rainy [EMAIL PROTECTED] wrote: I got an interrupted system call exception in select and I don't know what could have caused it. Here's the error: select.select(inputs, [], [], 9) error: (4, 'Interrupted system call') Caught an exception, shutting down... It's py2.3,

Re: Rich Comparisons Gotcha

2008-12-07 Thread Rasmus Fogh
Jamed Stroud Wrote: Rasmus Fogh wrote: Dear All, For the first time I have come across a Python feature that seems completely wrong. After the introduction of rich comparisons, equality comparison does not have to return a truth value, and may indeed return nothing at all and throw an error

Re: var or inout parm?

2008-12-07 Thread Colin J. Williams
[EMAIL PROTECTED] wrote: How can I make a var parm, where the called function can modify the value of the parameter in the caller? def f(x): x = x + 1 n = 1 f(n) # n should now be 2 Many TIA!! Mark Why not run it and see? Your function returns None. The function in effect takes a

Re: how to get a beep, OS independent ?

2008-12-07 Thread Stef Mientki
Chris Rebert wrote: On Sun, Dec 7, 2008 at 1:27 AM, Stef Mientki [EMAIL PROTECTED] wrote: Rainy wrote: On Dec 6, 3:40 pm, Stef Mientki [EMAIL PROTECTED] wrote: hello, I want to give a small beep, for windows there's message-beep, and there seems to be something like curses ,

Re: how to get a beep, OS independent ?

2008-12-07 Thread Duncan Booth
Stef Mientki [EMAIL PROTECTED] wrote: In the output window (stdout) which is black letters on white background, it prints bell in white letters with a black background. What do you mean? And what version dependency are you referring to? Well some of you actually hear something, I

Re: python book for non technical absolute beginner

2008-12-07 Thread André
On Dec 6, 9:21 am, News123 [EMAIL PROTECTED] wrote: Hi, One of my 'non technical' friends complained about knowing nothing at all about programming (though using computers regularly for mails / web browsing / googling and downloading / cropping photos ) He wants to play a little with

How to Write to csv file to create bulk address book

2008-12-07 Thread k.i.n.g.
Hi , I am new to scripting, I am working on script which would create 'n' number address book entries into a csv file which would be used to import into a address book. I need suggestions for the same The fileds for csv file are as follows Title,First Name,Middle Name,Last

Re: how to get a beep, OS independent ?

2008-12-07 Thread Joe Strout
On Dec 7, 2008, at 6:36 AM, Duncan Booth wrote: Python is just printing the ascii bell character: some environments will interpret that as a request to make a beep, some will do things like flashing the whole screen, others just output a graphic character. Python doesn't know what your

Re: Rich Comparisons Gotcha

2008-12-07 Thread Luis Zarrabeitia
Quoting James Stroud [EMAIL PROTECTED]: First, here is why the ability to throw an error is a feature: class Apple(object): def __init__(self, appleness): self.appleness = appleness def __cmp__(self, other): assert isinstance(other, Apple), 'must compare apples to

Re: how to get a beep, OS independent ?

2008-12-07 Thread info
Sorry, with import Tkinter Tkinter.Tk().bell() you get a new window for the same price... So it's usefull only when using tkinter -- http://mail.python.org/mailman/listinfo/python-list

Re: Don't you just love writing this sort of thing :)

2008-12-07 Thread Arnaud Delobelle
Lawrence D'Oliveiro [EMAIL PROTECTED] writes: In message [EMAIL PROTECTED], Arnaud Delobelle wrote: * you seem to disregard the fact that in 'programming language' there is the word 'language'. A language is a way to _communicate_ information, in the case of a programming language

Re: Rich Comparisons Gotcha

2008-12-07 Thread Steven D'Aprano
On Sun, 07 Dec 2008 13:03:43 +, Rasmus Fogh wrote: Jamed Stroud Wrote: ... Second, consider that any value in python also evaluates to a truth value in boolean context. But bool(x) can fail too. So not every object in Python can be interpreted as a truth value. Third, every function

Re: how to get a beep, OS independent ?

2008-12-07 Thread Marc 'BlackJack' Rintsch
On Sun, 07 Dec 2008 07:17:30 -0700, Joe Strout wrote: But invoking the standard system beep is such a basic function that it ought to be easier than this. I'm pretty sure it's a single OS call on all platforms. On OS X, for example, it's void NSBeep(void); declared in NSGraphics.h.

Re: how to get a beep, OS independent ?

2008-12-07 Thread info
On Dec 7, 12:40 am, Stef Mientki [EMAIL PROTECTED] wrote: hello, I want to give a small beep, for windows there's message-beep, and there seems to be something like curses , but that package seems to be totally broken in P2.5 for windows. Any other suggestions ? thanks, Stef Mientki

Re: Python 3.0 automatic decoding of UTF16

2008-12-07 Thread Johannes Bauer
John Machin schrieb: He did. Ugly stuff using readline() :-) Should still work, though. Well, well, I'm a C kinda guy used to while (fgets(b, sizeof(b), f)) kinda loops :-) But, seriously - I find that whole while True: and if line == construct ugly as hell, too. How can reading a file line

Re: python book for non technical absolute beginner

2008-12-07 Thread David
I like this one: http://www.freenetpages.co.uk/hp/alan.gauld/ -- Powered by Gentoo GNU/LINUX http://www.linuxcrazy.com pgp.mit.edu -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3.0 automatic decoding of UTF16

2008-12-07 Thread D'Arcy J.M. Cain
On Sun, 07 Dec 2008 16:05:53 +0100 Johannes Bauer [EMAIL PROTECTED] wrote: But, seriously - I find that whole while True: and if line == construct ugly as hell, too. How can reading a file line by line be achieved in a more pythonic kind of way? for line in open(filename): do stuff with

Re: Guido's new method definition idea

2008-12-07 Thread Arnaud Delobelle
Erik Max Francis [EMAIL PROTECTED] writes: [about removing self] P.S. You're beating a long-dead horse here; your precise proposal has been brought up countless times on comp.lang.python and shot down every single time for the same reason. It isn't going to happen. I guess it's part of the

Python idea/proposal to assist in single-archive python applications

2008-12-07 Thread Brian Allen Vanderburg II
Python Community The following is just an idea that I considered that may be helpful in creating an application in a single archive easier and with less code. Such an application would be similar to jar files for Java. First, the application and all data files should be able to run either

Re: can graphs be made in python as we make in java

2008-12-07 Thread Grant Edwards
On 2008-12-07, suku [EMAIL PROTECTED] wrote: i need some suggestion on making graphs. Will this be possible with normal python setup file or do i need to download add ons for that.. gnuplot-py matplotlib vtk -- Grant -- http://mail.python.org/mailman/listinfo/python-list

Re: how to get a beep, OS independent ?

2008-12-07 Thread Grant Edwards
On 2008-12-07, Joe Strout [EMAIL PROTECTED] wrote: But invoking the standard system beep What makes you think there is such a thing as the standard system beep? -- Grant -- http://mail.python.org/mailman/listinfo/python-list

Re: Rich Comparisons Gotcha

2008-12-07 Thread Rasmus Fogh
On Sun, 07 Dec 2008 13:03:43 +, Rasmus Fogh wrote: Jamed Stroud Wrote: ... Second, consider that any value in python also evaluates to a truth value in boolean context. But bool(x) can fail too. So not every object in Python can be interpreted as a truth value. Third, every function

Re: Guido's new method definition idea

2008-12-07 Thread Andreas Waldenburger
On Sun, 07 Dec 2008 02:49:27 -0500 acerimusdux [EMAIL PROTECTED] wrote: I'm not sure though whether allowing both syntaxes would make things more or less confusing. It might actually be helpful in some respects for newcomers to realize that self.method(arg) is somewhat the same as

Re: Python idea/proposal to assist in single-archive python applications

2008-12-07 Thread Duncan Booth
Brian Allen Vanderburg II [EMAIL PROTECTED] wrote: In addition it is needed to be able to open a file just as easily whether that file is in the archive or not. Assuming that a datafile in an application may be located relative to the '__file__' attributes, the following will not work in

Re: can graphs be made in python as we make in java

2008-12-07 Thread mmanns
On Sun, 7 Dec 2008 00:29:13 -0800 (PST) suku [EMAIL PROTECTED] wrote: HI folks... i need some suggestion on making graphs. Will this be possible with normal python setup file or do i need to download add ons for that.. help me out rpy Martin --

Re: Number of Python 3.x packages at the PyPI

2008-12-07 Thread skip
Martin http://pypi.python.org/pypi?:action=browsec=533 Martin It seems that some package authors only classify with Martin Programming Language :: Python :: 3 I did a release for lockfile yesterday which supports 3.0. I added the Programming Language :: Python :: 3.0 tag, but

Re: Guido's new method definition idea

2008-12-07 Thread Andreas Waldenburger
On Sat, 6 Dec 2008 23:21:04 -0800 (PST) Lie [EMAIL PROTECTED] wrote: I think we have to test this on newbies. [snip] Now that's talking like a programmer! Ideas on how such a survey could be conducted? Anyone? If this dead horse is revived because of that reason, then I'd go with changing

Re: Mathematica 7 compares to other languages

2008-12-07 Thread Jon Harrop
Xah Lee wrote: I didn't realize until after a hour, that if Jon simply give numerical arguments to Main and Create, the result timing by a factor of 0.3 of original. What a incredible sloppiness! and he intended this to show Mathematica speed with this code? The Main[] function calls Create.

Re: Netbeans Early Access and Python3

2008-12-07 Thread king kikapu
On Dec 6, 12:54 pm, king kikapu [EMAIL PROTECTED] wrote: Hi, have anyone using this release of NetBeans (6.5 with Python support) with Python 3 without any problems ? I mean, does it work with Python3 or only with 2.x ? No-one is using NetBeans for Python development ?? --

Re: Brain going crazy with recursive functions

2008-12-07 Thread Arnaud Delobelle
[EMAIL PROTECTED] writes: I'm trying to solve the 9-tile puzzle using as functional an approach as possible. I've recently finished reading SICP and am deliberately avoiding easy python-isms for the more convoluted scheme/functional methods. The following function is trivial to do with for

Re: Python idea/proposal to assist in single-archive python applications

2008-12-07 Thread Brian Allen Vanderburg II
[EMAIL PROTECTED] wrote: Why not use pkgutil.get_data()? Provided you remember to put your zip file on PYTHONPATH you can already run modules directly out of a zipfile (Python 2.5 and later).If your zipfile contains __main__.py then with Python 2.6 or later you can run it directly: just

Re: Number of Python 3.x packages at the PyPI

2008-12-07 Thread has
On 7 Dec, 09:20, Martin v. Löwis [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: Are there any special arrangements necessary for PyPI packages which have both a Python 2.x version and a Python 3.x version? So far, no such need has been identified. I've had to fork my appscript project's

Re: Rich Comparisons Gotcha

2008-12-07 Thread Mark Dickinson
On Dec 7, 4:23 pm, Rasmus Fogh [EMAIL PROTECTED] wrote: If is is possible to change the language, how about having two diferent functions, one for overloading the '==' operator, and another for testing list and set membership, dictionary key identity, etc.? I've often thought that this would

Re: Guido's new method definition idea

2008-12-07 Thread Daniel Fetchinson
Hi folks, The story of the explicit self in method definitions has been discussed to death and we all know it will stay. However, Guido himself acknowledged that an alternative syntax makes perfect sense and having both (old and new) in a future version of python is a possibility since it

Re: How to Write to csv file to create bulk address book

2008-12-07 Thread Laszlo Nagy
I am new to scripting, I am working on script which would create 'n' number address book entries into a csv file which would be used to import into a address book. I need suggestions for the same Please check out the 'csv' module. It comes with Python. Batteries included. :-)

Re: how to get a beep, OS independent ?

2008-12-07 Thread George Sakkis
On Dec 7, 7:49 am, Stef Mientki [EMAIL PROTECTED] wrote: Chris Rebert wrote: On Sun, Dec 7, 2008 at 1:27 AM, Stef Mientki [EMAIL PROTECTED] wrote: Rainy wrote: On Dec 6, 3:40 pm, Stef Mientki [EMAIL PROTECTED] wrote: hello, I want to give a small beep, for windows there's

Re: Guido's new method definition idea

2008-12-07 Thread Bruno Desthuilliers
Daniel Fetchinson a écrit : (snip) It doesn't add anything but makes something that exists a bit clearer Err... I fail to see how magically transforming def self.foo(...) into def foo(self, ...) makes anything clearer about what really happens and how Python's object model works. and

Re: dict subclass and pickle bug (?)

2008-12-07 Thread Christian Heimes
James Stroud wrote: Hello All, I subclassed dict and overrode __setitem__. When instances are unpickled, the __setstate__ is not called before the keys are assigned via __setitem__ in the unpickling protocol. I googled a bit and found that this a bug filed in 2003:

Re: Guido's new method definition idea

2008-12-07 Thread Andreas Waldenburger
On Sun, 07 Dec 2008 19:13:18 +0100 Bruno Desthuilliers [EMAIL PROTECTED] wrote: and friendlier to newbies. I'd rather say more acceptable to java-brainwashed developpers. Why would you rather be unfriendly and seed ambivalence? I do see the fun in a little Python snobbism, but ... come on.

Re: Guido's new method definition idea

2008-12-07 Thread Bruno Desthuilliers
News123 a écrit : Lie wrote: On Dec 7, 1:02 am, News123 [EMAIL PROTECTED] wrote: What would be interesting would be some syntactical sugar to get rid of the 'self' (at least in the code body). This has been debated to hell and back. And it's *not* going to happen. example: class C:

Is 3.0 worth breaking backward compatibility?

2008-12-07 Thread walterbyrd
IMO: breaking backward compatibility is a big deal, and should only be done when it is seriously needed. Also, IMO, most of, if not all, of the changes being made in 3.0 are debatable, at best. I can not think of anything that is being changed that was really a show stopper anyway. At best, I am

Re: Guido's new method definition idea

2008-12-07 Thread Bruno Desthuilliers
Daniel Fetchinson a écrit : Hi folks, The story of the explicit self in method definitions has been discussed to death and we all know it will stay. However, Guido himself acknowledged that an alternative syntax makes perfect sense and having both (old and new) in a future version of python is

Importing the re module fails

2008-12-07 Thread Andreas Waldenburger
This is a little puzzling. Using ipython: [EMAIL PROTECTED] Logstuff]$ ipython Python 2.5.2 (r252:60911, Sep 30 2008, 15:41:38) Type copyright, credits or license for more information. [snip ipython help message] In [1]: import re This works fine. But with the

Re: Guido's new method definition idea

2008-12-07 Thread Daniel Fetchinson
The story of the explicit self in method definitions has been discussed to death and we all know it will stay. However, Guido himself acknowledged that an alternative syntax makes perfect sense and having both (old and new) in a future version of python is a possibility since it maintains

Re: Is 3.0 worth breaking backward compatibility?

2008-12-07 Thread Andreas Waldenburger
On Sun, 7 Dec 2008 11:22:23 -0800 (PST) walterbyrd [EMAIL PROTECTED] wrote: IMO: breaking backward compatibility is a big deal, and should only be done when it is seriously needed. Plze. Python 3 is shipping now, and so is 2.x, where x 5. Python 2 is going to be around for quite some

Re: Importing the re module fails

2008-12-07 Thread Diez B. Roggisch
Andreas Waldenburger schrieb: This is a little puzzling. Using ipython: [EMAIL PROTECTED] Logstuff]$ ipython Python 2.5.2 (r252:60911, Sep 30 2008, 15:41:38) Type copyright, credits or license for more information. [snip ipython help message] In [1]: import re

Re: Is 3.0 worth breaking backward compatibility?

2008-12-07 Thread Andreas Waldenburger
On Sun, 7 Dec 2008 20:35:53 +0100 Andreas Waldenburger [EMAIL PROTECTED] wrote: On Sun, 7 Dec 2008 11:22:23 -0800 (PST) walterbyrd [EMAIL PROTECTED] wrote: At best, I am a casual python user, so it's likely that I am missing something. Yes, the big picture. OK, that was a bit harsh. I

Re: Importing the re module fails

2008-12-07 Thread Andreas Waldenburger
On Sun, 07 Dec 2008 20:36:58 +0100 Diez B. Roggisch [EMAIL PROTECTED] wrote: Andreas Waldenburger schrieb: This is a little puzzling. Using ipython: [EMAIL PROTECTED] Logstuff]$ ipython Python 2.5.2 (r252:60911, Sep 30 2008, 15:41:38) Type copyright, credits or

Re: Guido's new method definition idea

2008-12-07 Thread Bruno Desthuilliers
Daniel Fetchinson a écrit : (snip) Still, improved error messages would be desirable (concerning the number of arguments passed to an instance method). Then count me as +2 on this !-) -- http://mail.python.org/mailman/listinfo/python-list

Re: Number of Python 3.x packages at the PyPI

2008-12-07 Thread Martin v. Löwis
I've had to fork my appscript project's codebase in order to add support for Python 3.x. I would like to distribute both 2.x and 3.x versions under the same package name for obvious reasons. This isn't a problem with eggs as the Python version number is included in each egg's name, but what

Re: how to get a beep, OS independent ?

2008-12-07 Thread Joe Strout
On Dec 7, 2008, at 8:48 AM, Grant Edwards wrote: On 2008-12-07, Joe Strout [EMAIL PROTECTED] wrote: But invoking the standard system beep What makes you think there is such a thing as the standard system beep? Because OS X (the platform with which I'm most familiar) certainly has one,

[OT] [sort of] Malcom Reynolds?

2008-12-07 Thread Andreas Waldenburger
Just found this in the re module's docs: m = re.match(r(?Pfirst_name\w+) (?Plast_name\w+), Malcom Reynolds) Does this represent an attempt to phase out the gratuitous Monty Python references in favor of gratuitous Firefly references? Because if so, I'm all for it. Anyways, stuff like

Re: Brain going crazy with recursive functions

2008-12-07 Thread Lie Ryan
On Sat, 06 Dec 2008 23:33:35 -0800, 5lvqbwl02 wrote: I'm trying to solve the 9-tile puzzle using as functional an approach as possible. I've recently finished reading SICP and am deliberately avoiding easy python-isms for the more convoluted scheme/functional methods. The following function

Re: Guido's new method definition idea

2008-12-07 Thread Antoine De Groote
Bruno Desthuilliers wrote: Daniel Fetchinson a écrit : (snip) It doesn't add anything but makes something that exists a bit clearer Err... I fail to see how magically transforming def self.foo(...) into def foo(self, ...) makes anything clearer about what really happens and how Python's

Re: [OT] [sort of] Malcom Reynolds?

2008-12-07 Thread Aahz
In article [EMAIL PROTECTED], Andreas Waldenburger [EMAIL PROTECTED] wrote: Just found this in the re module's docs: m = re.match(r(?Pfirst_name\w+) (?Plast_name\w+), Malcom Reynolds) Does this represent an attempt to phase out the gratuitous Monty Python references in favor of

Python for kids?

2008-12-07 Thread Russ P.
I have a 12-year-old son who spends too much time playing Xbox live and watching silly YouTube videos. I would like to try to get him interested in programming. Is anyone aware of a good book or website that addresses this concern, preferably (but not necessarily) using Python? I could try to

Re: Guido's new method definition idea

2008-12-07 Thread Brian Blais
On Dec 5, 2008, at 21:21 , Daniel Fetchinson wrote: The proposal is to allow this: class C: def self.method( arg ): self.value = arg return self.value instead of this: class C: def method( self, arg ): self.value = arg return self.value I have

Re: Python for kids?

2008-12-07 Thread Brian Blais
On Dec 7, 2008, at 15:13 , Russ P. wrote: I have a 12-year-old son who spends too much time playing Xbox live and watching silly YouTube videos. I would like to try to get him interested in programming. Is anyone aware of a good book or website check out:

Re: Python for kids?

2008-12-07 Thread Andreas Waldenburger
On Sun, 7 Dec 2008 12:13:37 -0800 (PST) Russ P. [EMAIL PROTECTED] wrote: I have a 12-year-old son who spends too much time playing Xbox live and watching silly YouTube videos. I would like to try to get him interested in programming. Is anyone aware of a good book or website that addresses

Re: Is 3.0 worth breaking backward compatibility?

2008-12-07 Thread bearophileHUGS
walterbyrd: I can not think of anything that is being changed that was really a show stopper anyway. I agree, but Python and its culture has a characteristic that not many other languages share: it tries to be a tidy language, to have one obvious way to do most things, it values readability

Re: Source code generation using Python

2008-12-07 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 ats wrote: I want to generate 3 different versions of a C++ source code, basically injecting different flavours of inline assembler depending on target compiler/CPU. Are you aware that there are also packages that let you generate and call C code

Re: Python for kids?

2008-12-07 Thread bearophileHUGS
On Dec 7, 9:13 pm, Russ P. [EMAIL PROTECTED] wrote: I have a 12-year-old son who spends too much time playing Xbox live and watching silly YouTube videos. I would like to try to get him interested in programming. Lot of people learn to program even before age of 12. But I think it's better for

Re: Python for kids?

2008-12-07 Thread André
On Dec 7, 4:13 pm, Russ P. [EMAIL PROTECTED] wrote: I have a 12-year-old son who spends too much time playing Xbox live and watching silly YouTube videos. I would like to try to get him interested in programming. Is anyone aware of a good book or website that addresses this concern, preferably

Re: Guido's new method definition idea

2008-12-07 Thread I V
On Sat, 06 Dec 2008 16:34:56 -0800, Erik Max Francis wrote: `$` as a shortcut for self, on the other hand, gives absolutely no mnemonic indication what it stands for, and users would be simply left guessing. However, $ is sometimes used as an alternative way of writing S̸ (I've attempted to

Re: Guido's new method definition idea

2008-12-07 Thread Andreas Waldenburger
On Sun, 07 Dec 2008 20:56:40 GMT I V [EMAIL PROTECTED] wrote: So, if we want Python to the programming language of choice for Lacanian psychoanalysts, perhaps we should adopt the symbol $ (or even, with Python 3's support for unicode identifiers, S followed by U+0388) instead of self. OK, I'm

Re: how to get a beep, OS independent ?

2008-12-07 Thread Peter Pearson
On Sun, 07 Dec 2008 00:40:53 +0100, Stef Mientki wrote: I want to give a small beep, for windows there's message-beep, and there seems to be something like curses , but that package seems to be totally broken in P2.5 for windows. Any other suggestions ? Many people have suggested sending

Re: how to get a beep, OS independent ?

2008-12-07 Thread Diez B. Roggisch
Peter Pearson schrieb: On Sun, 07 Dec 2008 00:40:53 +0100, Stef Mientki wrote: I want to give a small beep, for windows there's message-beep, and there seems to be something like curses , but that package seems to be totally broken in P2.5 for windows. Any other suggestions ? Many people

Re: Is 3.0 worth breaking backward compatibility?

2008-12-07 Thread nnp
Have a read of this http://www.b-list.org/weblog/2008/dec/05/python-3000/ It's a response to questions similar to yours by James Bennett On Sun, Dec 7, 2008 at 7:22 PM, walterbyrd [EMAIL PROTECTED] wrote: IMO: breaking backward compatibility is a big deal, and should only be done when it is

Re: Rich Comparisons Gotcha

2008-12-07 Thread Robert Kern
Rasmus Fogh wrote: Current behaviour is both inconsistent and counterintuitive, as these examples show. x = float('NaN') x == x False Blame IEEE for that one. Rich comparisons have nothing to do with that one. ll = [x] x in ll True x == ll[0] False import numpy y = numpy.zeros((3,))

Re: Is 3.0 worth breaking backward compatibility?

2008-12-07 Thread Tim Rowe
2008/12/7 walterbyrd [EMAIL PROTECTED]: IMO: breaking backward compatibility is a big deal, and should only be done when it is seriously needed. Also, IMO, most of, if not all, of the changes being made in 3.0 are debatable, at best. I can not think of anything that is being changed that was

Re: Rich Comparisons Gotcha

2008-12-07 Thread James Stroud
Luis Zarrabeitia wrote: Quoting James Stroud [EMAIL PROTECTED]: First, here is why the ability to throw an error is a feature: class Apple(object): def __init__(self, appleness): self.appleness = appleness def __cmp__(self, other): assert isinstance(other, Apple), 'must

Re: Rich Comparisons Gotcha

2008-12-07 Thread James Stroud
Rasmus Fogh wrote: Current behaviour is both inconsistent and counterintuitive, as these examples show. x = float('NaN') x == x False Perhaps this should raise an exception? I think the problem is not with comparisons in general but with the fact that nan is type float: py

Re: Rich Comparisons Gotcha

2008-12-07 Thread Terry Reedy
Robert Kern wrote: Terry Reedy wrote: Rasmus Fogh wrote: Personally I would like to get these [EMAIL PROTECTED]* misfeatures removed, What you are calling a misfeature is an absence, not a presence that can be removed. That's not quite true. In what way, pray tell. My statement still

Re: Rich Comparisons Gotcha

2008-12-07 Thread James Stroud
James Stroud wrote: [cast to bool] for numpy works like a unary ufunc. Scratch that. Not thinking and typing at same time. -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com --

Re: Rich Comparisons Gotcha

2008-12-07 Thread Terry Reedy
Rasmus Fogh wrote: Can anybody see a way this could be fixed (please)? I may well have to live with it, but I would really prefer not to. I made a suggestion in my first response, which perhaps you missed. tjr -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3.0 automatic decoding of UTF16

2008-12-07 Thread John Machin
On Dec 8, 2:05 am, Johannes Bauer [EMAIL PROTECTED] wrote: John Machin schrieb: He did. Ugly stuff using readline() :-) Should still work, though. Well, well, I'm a C kinda guy used to while (fgets(b, sizeof(b), f)) kinda loops :-) But, seriously - I find that whole while True: and if

  1   2   3   >