Re: Convert all images to JPEG

2004-12-29 Thread Fredrik Lundh
"Thomas" <[EMAIL PROTECTED]> wrote: > I got a bunch of different images of different types ( bmp, gif, png, > tiff etc ) and I want to convert them all to JPEGs using PIL. Is this > possible? When I try I get all sorts of errors, doing something like : > > im = Image.open(srcImage) # might be png,

Problem in threading

2004-12-29 Thread Gurpreet Sachdeva
I have written a code to figure out the difference in excecution time of a func before and after using threading... [CODE] #!/usr/bin/env python import threading import time loops = [5000,5000] def loop(self, nsec): for i in range(1,nsec): t=i*5000 s=t/10*

Re: Problem in threading

2004-12-29 Thread Fredrik Lundh
Gurpreet Sachdeva wrote: >for i in nloops: # wait for all >threads[i].join threads[i].join() -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem in threading

2004-12-29 Thread Alex Martelli
Gurpreet Sachdeva <[EMAIL PROTECTED]> wrote: > for i in nloops: # wait for all > threads[i].join Missing () after 'join'. Alex -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem in threading

2004-12-29 Thread Gurpreet Sachdeva
>threads[i].join() Oh thanks I corrected that but still the time taken after using thread is more without using them Please Advice... Thanks, Gurpreet Singh -- http://mail.python.org/mailman/listinfo/python-list

MDaemon Warning - virus found: Python-list@python.org

2004-12-29 Thread Mail Administrator
*** WARNING ** Este mensaje ha sido analizado por MDaemon AntiVirus y ha encontrado un fichero anexo(s) infectado(s). Por favor revise el reporte de abajo. AttachmentVirus name Action taken ---

Re: built-in 'property'

2004-12-29 Thread Alex Martelli
Steven Bethard <[EMAIL PROTECTED]> wrote: > For this reason, I usually suggest declaring properties like[1]: > > py> class E(object): > ... def x(): > ... def get(self): > ... return float(self._x) > ... def set(self, x): > ... self._x = x**2 > ...

Re: Problem in threading

2004-12-29 Thread Binu K S
You haven't split the task between the threads here. loops should be set to [2500,2500] for a correct comparison. On a single processor system, a tight loop like the one you are testing will at best show the same time as the non-threaded case. Most likely the threaded version will take more time o

portable text user interface

2004-12-29 Thread Maxim Kasimov
Hi. Are there widely used and recommended Python libraries that will let me makes a portable text user interface? -- Best regards, Maxim -- http://mail.python.org/mailman/listinfo/python-list

what would you like to see in a 2nd edition Nutshell?

2004-12-29 Thread Alex Martelli
I'm considering proposing to O'Reilly a 2nd edition of "Python in a Nutshell", that I'd write in 2005, essentially to cover Python 2.3 and 2.4 (the current 1st edition only covers Python up to 2.2). What I have in mind is not as complete a rewrite as for the 2nd vs 1st edition of the Cookbook -- P

Re: Why tuples use parentheses ()'s instead of something else like <>'s?

2004-12-29 Thread Brian Beck
[EMAIL PROTECTED] wrote: Wouldn't it have been better to define tuples with <>'s or {}'s or something else to avoid this confusion?? Well, to comment on the part that nobody else did... < and > are binary operators, a la 3 > 1, "one" < "two" and {}'s are clearly already used for dictionaries. -- Br

Re: Tkinter vs wxPython

2004-12-29 Thread Alejandro Weinstein
> Sure wxGlade/Boa/etc can help speed design and layout up, but what > happens when you want to do non standard things or just get stuck > because some thing just isn't working. Then you add the necesary hand crafted code to the automatic generated code. At least is what I did when I needed. --

Re: Problem in threading

2004-12-29 Thread Duncan Booth
Gurpreet Sachdeva wrote: > Also the difference of time is not much... > How do we best optimize our task by using threads... please help... > For most tasks splitting the processing into separate threads will result in an increase in the total time to complete the task. The only times when it

Re: what would you like to see in a 2nd edition Nutshell?

2004-12-29 Thread TZOTZIOY
On Wed, 29 Dec 2004 11:35:18 +0100, rumours say that [EMAIL PROTECTED] (Alex Martelli) might have written: [snip: things to cover in a tentative 2nd edition of the nutshell] >and new capabilities of existing modules, such as thread-local >storage. ...which I most surely missed learning about it.

Re: Unicode entries on sys.path

2004-12-29 Thread Thomas Heller
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: > Thomas Heller wrote: >> How should these patches be approached? > > Please have a look as to how posixmodule.c and fileobject.c deal with > this issue. > >> On windows, it would probably >> be easiest to use the MS generic text routines: _tcslen inst

Re: Mutable objects which define __hash__ (was Re: Why are tuples immutable?)

2004-12-29 Thread Nick Coghlan
Bengt Richter wrote: A second time a key may be hashed is when it is used as a lookup key. This can be a reference to the identical key object first used, or it can be a new object. A new object has to be hashed in order to have a hash value to use in finding candidate keys to compare to. If _th

Re: what would you like to see in a 2nd edition Nutshell?

2004-12-29 Thread Arthur
On Wed, 29 Dec 2004 11:35:18 +0100, [EMAIL PROTECTED] (Alex Martelli) wrote: >So, if there's any advice or request about a 2nd edition of the >Nutshell, this is the right time for y'all to let me know. Feedback is >welcome, either privately or right here. Thanks in advance -- _and_ >apologies in

Re: Are tuple really immutable?

2004-12-29 Thread Chris
I'm suing Google Groups (beta) which has a treeview and my thanks were a reply to Fredrik Lundh. In fact I simply clicked a "reply" link below his post. Of course you all helped me to better understand the "mutable/immutable" concept but Fredrik Lundh deserves more thanks since he replied to all my

Python + Lisp integration?

2004-12-29 Thread Simo Melenius
Hi, I'm wondering (after a bit of googling) whether there exists a Python binding to any open source Lisp environment (like librep or some Scheme or Common Lisp implementation) that could be recommended for non-toy use? My intention would be to use the Lisp environment to augment and help my Pyt

Re: Unicode entries on sys.path

2004-12-29 Thread "Martin v. Löwis"
Thomas Heller wrote: I wasn't asking about the *W functions, I'm asking about string/unicode handling in Python source files. Looking into Python/import.c, wouldn't it be required to change the signature of a lot of functions to receive PyObject* arguments, instead of char* ? Yes, that would be one

Re: objects as mutable dictionary keys

2004-12-29 Thread Nick Coghlan
Yeah, that looks like a pretty decent summary to me. I wonder if this would be worth posting on the Wiki somewhere? Maybe: http://www.python.org/moin/DictionaryKeys That makes it easy to point to when this issue comes up again. The page may also want to mention an extant bug with new-style clas

Re: Python + Lisp integration?

2004-12-29 Thread Arthur
On 29 Dec 2004 14:50:53 +0200, Simo Melenius <[EMAIL PROTECTED]> wrote: > >Hi, > >I'm wondering (after a bit of googling) whether there exists a Python >binding to any open source Lisp environment (like librep or some >Scheme or Common Lisp implementation) that could be recommended for >non-toy us

Re: portable text user interface

2004-12-29 Thread Miki Tebeka
Hello Maxim, > Are there widely used and recommended Python libraries that will > let me makes a portable text user interface? If you just need a text-like interface you can use Tkinter. See (shameless plug) http://developer.berlios.de/projects/bcd/ and http://developer.berlios.de/dbimage.php?id=1

RE: Other notes

2004-12-29 Thread Batista, Facundo
Title: RE: Other notes [EMAIL PROTECTED] #- Here are some questions and suggestions of mine that I've #- collected in #- the last weeks on the language (please note that some (most?) of them #- are probably wrong/useless/silly, but I've seen that such #- notes help me #- understand a lot o

Santa Clause like you have never seen him before

2004-12-29 Thread joshz
Santa Clause like you have never seen him before, this is a must see for everyone http://paddy.home.comcast.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python + Lisp integration?

2004-12-29 Thread Fuzzyman
Simo Melenius wrote: > Hi, > > I'm wondering (after a bit of googling) whether there exists a Python > binding to any open source Lisp environment (like librep or some > Scheme or Common Lisp implementation) that could be recommended for > non-toy use? > > My intention would be to use the Lisp env

Re: Using python to deploy software

2004-12-29 Thread secun
Sounds interesting. Do you know if he/she would be willing to share the code? Anand wrote: > I haven't but one of my friends have used Pyro (Python Remote Objects) > to do so. > > You basically need to write a custom Pyro server and run it on a > central machine. Your pyro clients can be install

Re: ANN: GallerPy 0.6.0

2004-12-29 Thread Fuzzyman
Nice one Freddie. You beat me to it - I had adding a 'header_file' type thingy to gallerpy on my list of things to do. gallerpy will be replacing my static galleries on voidspace 'soon'. Regards, Fuzzy http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/pyth

MySQLdb Windows Installer (2.4) published [was: Problems installing MySQLdb on Windows [newbie]]

2004-12-29 Thread Steve Holden
Alex Meier wrote: In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... http://pydish.holdenweb.com/pwp/MySQL-python.exe-1.0.0.win32-py2.4.exe That's a ready-to-go no-compilation-required installer for Windows Python 2.4, and will get you going straight away. Thanx a lot, Steve! This worked w

Re: Why tuples use parentheses ()'s instead of something else like <>'s?

2004-12-29 Thread Steve Holden
Marius Bernklev wrote: * [EMAIL PROTECTED] Perhaps ()'s are a good idea for some other reason I don't know? One-element tuples are written as (4,). And, even there, the parenthesis is only required when it would otherwise be embiguous: >>> x = 4, >>> x (4,) >>> print 4, 4 >>> regards Steve

[Poll] Frameworks for Web Development

2004-12-29 Thread Antonio Cangiano
Dear all, I want to propose a small "poll" about frameworks & tools that you use to develop web applications in Python. I think it would be interesting if you could list your favourite tools as well as explain the reasons for your choice.   Thanks in advance, Antonio--My programming blog: http

Re: Tkinter vs wxPython

2004-12-29 Thread Steve Holden
Alejandro Weinstein wrote: Sure wxGlade/Boa/etc can help speed design and layout up, but what happens when you want to do non standard things or just get stuck because some thing just isn't working. Then you add the necesary hand crafted code to the automatic generated code. At least is what I di

Re: Why tuples use parentheses ()'s instead of something else like <>'s?

2004-12-29 Thread John Roth
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Tuples are defined with regards to parentheses ()'s as everyone knows. To expand on what Alex Martelli said: Tuples don't use parentheses except for the special case of the empty tuple. Those are expression parentheses. The two most obvio

Re: portable text user interface

2004-12-29 Thread Fuzzyman
Miki Tebeka wrote: > Hello Maxim, > > > Are there widely used and recommended Python libraries that will > > let me makes a portable text user interface? > If you just need a text-like interface you can use Tkinter. > See (shameless plug) http://developer.berlios.de/projects/bcd/ and > http://deve

Re: what would you like to see in a 2nd edition Nutshell?

2004-12-29 Thread TZOTZIOY
On Wed, 29 Dec 2004 14:05:18 +0200, rumours say that Christos "TZOTZIOY" Georgiou <[EMAIL PROTECTED]> might have written: >[snip: things to cover in a tentative 2nd edition of the nutshell] [Alex] >>and new capabilities of existing modules, such as thread-local >>storage. [I] >...which I most su

Re: Why tuples use parentheses ()'s instead of something else like <>'s?

2004-12-29 Thread Grant Edwards
On 2004-12-29, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Tuples are defined with regards to parentheses ()'s as everyone knows. Except they're not. >>> x = 1,2,3,4 >>> type(x) >>> Tuples are defined by the infix comma "operator". -- Grant Edwards grante

learning about threads and processes (was Re: what would you like to see in a 2nd edition Nutshell?)

2004-12-29 Thread Alex Martelli
Arthur <[EMAIL PROTECTED]> wrote: ... > speaking in Python. As to these concepts, the implicit point of view > seems to be to leave Python to learn the concepts, and return to > Python to understand its implementation of the details, once the > concepts are well grasped. Hmmm, well, the concept

Re: what would you like to see in a 2nd edition Nutshell?

2004-12-29 Thread Thomas Heller
[EMAIL PROTECTED] (Alex Martelli) writes: > I'm considering proposing to O'Reilly a 2nd edition of "Python in a > Nutshell", that I'd write in 2005, essentially to cover Python 2.3 and > 2.4 (the current 1st edition only covers Python up to 2.2). > > What I have in mind is not as complete a rewrit

Re: what would you like to see in a 2nd edition Nutshell?

2004-12-29 Thread djw
I found the discussion of unicode, in any python book I have, insufficient. Thomas +1 Don -- http://mail.python.org/mailman/listinfo/python-list

Re: Why tuples use parentheses ()'s instead of something else like <>'s?

2004-12-29 Thread Roy Smith
In article <[EMAIL PROTECTED]>, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2004-12-29, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > Tuples are defined with regards to parentheses ()'s as everyone knows. > > Except they're not. > > >>> x = 1,2,3,4 > >>> type(x) > > >>> > > Tuples

Re: what would you like to see in a 2nd edition Nutshell?

2004-12-29 Thread terraplane
As an already-experienced programmer, I came to Python via this book and still use it as my primary reference. As a Python beginner, I had a difficult time with the section on "Slicing a sequence" (p. 47). In particular, a better explanation and examples of negative indicies would be helpful. Th

Re: extract news article from web

2004-12-29 Thread Simon Brunning
On 22 Dec 2004 09:22:15 -0800, Zhang Le <[EMAIL PROTECTED]> wrote: > Hello, > I'm writing a little Tkinter application to retrieve news from > various news websites such as http://news.bbc.co.uk/, and display them > in a TK listbox. All I want are news title and url information. Well, the BBC pub

Re: what would you like to see in a 2nd edition Nutshell?

2004-12-29 Thread Scott David Daniels
Alex Martelli wrote: I'm considering proposing to O'Reilly a 2nd edition of "Python in a Nutshell", that I'd write in 2005, essentially to cover Python 2.3 and 2.4 (the current 1st edition only covers Python up to 2.2). So, if there's any advice or request about a 2nd edition of the Nutshell, this

Re: what would you like to see in a 2nd edition Nutshell?

2004-12-29 Thread Fuzzyman
I second that Regards, Fuzzy http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

Re: what would you like to see in a 2nd edition Nutshell?

2004-12-29 Thread beliavsky
I like the current edition. Since it is a reference work, I would like to see it in a CD-ROM as well as in print, either packaged with a book or as part of a Python CD Bookshelf, analogous to the other CD bookshelves O'Reilly offers. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why are tuples immutable?

2004-12-29 Thread Scott David Daniels
Antoon Pardon wrote: Op 2004-12-23, Scott David Daniels schreef <[EMAIL PROTECTED]>: This is half the problem. In the period where an element is in the wrong hash bucket, a new entry for the same value can be created in the proper hash bucket. Then the code will have to determine how to merge two

Re: learning about threads and processes (was Re: what would you like to see in a 2nd edition Nutshell?)

2004-12-29 Thread Aahz
In article <[EMAIL PROTECTED]>, Alex Martelli <[EMAIL PROTECTED]> wrote: > >Hmmm - have you looked at Deitel, Deitel, Liperi, Wiedermann, "Python >how to program", chapters 18 (Process Management) and 19 >(Multithreading), pages 613-687? They seem to do a rather workmanlike >job -- of course, they

Re: objects as mutable dictionary keys

2004-12-29 Thread Stian Søiland
On 2004-12-29 14:04:19, Nick Coghlan wrote: > This *is* a bug (since Guido called it such), but one not yet fixed as the > obvious solution (removing object.__hash__) causes problems for Jython, and > a non-obvious solution has not been identified. class object: def __hash__(self):

Re: Why tuples use parentheses ()'s instead of something else like <>'s?

2004-12-29 Thread John Roth
"Roy Smith" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] In article <[EMAIL PROTECTED]>, Grant Edwards <[EMAIL PROTECTED]> wrote: On 2004-12-29, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Tuples are defined with regards to parentheses ()'s as everyone knows. Except they're not.

calling functions across threads

2004-12-29 Thread Steven Bethard
I'm playing around with some threading stuff right now, and I'm having a little trouble calling a function from one thread that affects another. Here's my setup: py> import os, threading, time py> def write(file_in, input_lines): ... for line in input_lines: ... time.sleep(0.5) ...

Re: Other notes

2004-12-29 Thread Mike Meyer
[EMAIL PROTECTED] writes: > @infix > def interval(x, y): return range(x, y+1) # 2 parameters needed > > This may allow: > assert 5 interval 9 == interval(5,9) I don't like the idea of turning words into operators. I'd much rather see something like: @infix('..') def interval(x, y): return ra

RE: Best GUI for small-scale accounting app?

2004-12-29 Thread Gabriel Cosentino de Barros
Title: RE: Best GUI for small-scale accounting app? From: Paul Rubin [mailto:"http://phr.cx"@NOSPAM.invalid] > This still seems way too complicated.  Why execute a bunch of separate > statements when what you're trying to set up is a single structure? IMHO, i think that the code to create e

RE: Best GUI for small-scale accounting app?

2004-12-29 Thread Gabriel Cosentino de Barros
Title: RE: Best GUI for small-scale accounting app? > But even then, if DaBo ever becomes as easy to use as Delphi/VB for this > type of applications, while remaining cross-platform, that might easily > double the number of Python developers.  ;-) VB/delphi are ridiculous. dont' aim to tha

RE: Best GUI for small-scale accounting app?

2004-12-29 Thread Gabriel Cosentino de Barros
Title: RE: Best GUI for small-scale accounting app? > > - speed where it matters (ie. no 20s load time) > >   Load what? The app, or the data? Users don't care how long the app > takes to start up, since they usually run it all day long. Data > response is a whole 'nother matter, and Da

Re: Other notes

2004-12-29 Thread Steve Holden
Mike Meyer wrote: [EMAIL PROTECTED] writes: @infix def interval(x, y): return range(x, y+1) # 2 parameters needed This may allow: assert 5 interval 9 == interval(5,9) I don't like the idea of turning words into operators. I'd much rather see something like: @infix('..') def interval(x, y): re

Re: Other notes

2004-12-29 Thread Jp Calderone
On Wed, 29 Dec 2004 11:42:00 -0600, Mike Meyer <[EMAIL PROTECTED]> wrote: >[EMAIL PROTECTED] writes: > > > @infix > > def interval(x, y): return range(x, y+1) # 2 parameters needed > > > > This may allow: > > assert 5 interval 9 == interval(5,9) > > I don't like the idea of turning words into ope

copying classes?

2004-12-29 Thread harold fellermann
Hi all, In the documentation of module 'copy' it is said that "This version does not copy types like module, class, function, method, stack trace, stack frame, file, socket, window, array, or any similar types." Does anyone know another way to (deep)copy objects of type class? What is special a

RE: A scoping question

2004-12-29 Thread Gabriel Cosentino de Barros
Title: RE: A scoping question > myBaseClass.AddChild(file2.NextClass()) > [snip] > class NextClass: > def __init__(self): > for eachChild in myBaseClass.MyChilds:  # <- ERROR > ... I never assumes globals in my classes. always pass them as parameters. it's safer and

Re: Python + Lisp integration?

2004-12-29 Thread Erno Kuusela
hello, you might want to look at . -- erno -- http://mail.python.org/mailman/listinfo/python-list

Re: Using python to deploy software

2004-12-29 Thread secun
Would the pyro client need to be installed as a service on the machine so it could run the installer as the system acct? Otherwise, it would run with the current user's credentials. Anand wrote: > I haven't but one of my friends have used Pyro (Python Remote Objects) > to do so. > > You basically

Re: Other notes

2004-12-29 Thread Mike Meyer
Jp Calderone <[EMAIL PROTECTED]> writes: > On Wed, 29 Dec 2004 11:42:00 -0600, Mike Meyer <[EMAIL PROTECTED]> wrote: >>[EMAIL PROTECTED] writes: >> >> > @infix >> > def interval(x, y): return range(x, y+1) # 2 parameters needed >> > >> > This may allow: >> > assert 5 interval 9 == interval(5,9) >

Re: Other notes

2004-12-29 Thread Mike Meyer
Steve Holden <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: > >> [EMAIL PROTECTED] writes: >> >>>@infix >>>def interval(x, y): return range(x, y+1) # 2 parameters needed >>> >>>This may allow: >>>assert 5 interval 9 == interval(5,9) >> I don't like the idea of turning words into operators. I'd mu

Re: copying classes?

2004-12-29 Thread Bob Van Zant
copy.deepcopy() should do the trick. This URL answers a little bit of your question about the difficulties in copying "complex" data structures. http://pydoc.org/2.3/copy.html -Bob On Wed, 2004-12-29 at 19:29 +0100, harold fellermann wrote: > Hi all, > > In the documentation of module 'copy' it

Re: Problem in threading

2004-12-29 Thread Mike Meyer
Duncan Booth <[EMAIL PROTECTED]> writes: > That leaves the former case: if your task has to stop and wait for > something else to happen (e.g. data to be read from a network, or to > be read from a disc file), then splitting it into multiple threads > may allow the waits to be overlapped with usef

Re: Best GUI for small-scale accounting app?

2004-12-29 Thread Ed Leafe
On Dec 29, 2004, at 1:06 PM, Gabriel Cosentino de Barros wrote: So, to be more direct: If you create one app that opens one window with one button in wxWindow and exit (exit, so that 'time' can canculate it for you), and then the same thing in Dabo, what's the time diference? I used the timeit

Re: calling functions across threads

2004-12-29 Thread Thomas Rast
Steven Bethard <[EMAIL PROTECTED]> writes: > I get the correct output, but if you run this yourself, you'll see > that the numbers 1 through 10 aren't printed in sync with the writes > (i.e. every half second); they're all printed at the end. Could > someone explain to me why this happens, and ho

Re: copying classes?

2004-12-29 Thread Bob Van Zant
Ha. I just read down to the bottom of pyDoc page. "This version does not copy types like module, class, function, method, nor stack trace, stack frame, nor file, socket, window, nor array, nor any similar types." However, I actually tried it and it worked at least in the simple case: >>> class x:

Re: Other notes

2004-12-29 Thread Jp Calderone
On Wed, 29 Dec 2004 12:38:02 -0600, Mike Meyer <[EMAIL PROTECTED]> wrote: >Jp Calderone <[EMAIL PROTECTED]> writes: > > > On Wed, 29 Dec 2004 11:42:00 -0600, Mike Meyer <[EMAIL PROTECTED]> wrote: > >>[EMAIL PROTECTED] writes: > >> > >> > @infix > >> > def interval(x, y): return range(x, y+1) # 2

Re: calling functions across threads

2004-12-29 Thread Steven Bethard
Thomas Rast wrote: Steven Bethard <[EMAIL PROTECTED]> writes: I get the correct output, but if you run this yourself, you'll see that the numbers 1 through 10 aren't printed in sync with the writes (i.e. every half second); they're all printed at the end. Could someone explain to me why this happe

Re: what would you like to see in a 2nd edition Nutshell?

2004-12-29 Thread Fernando Perez
Alex Martelli wrote: > the coverage of Twisted and adding just a few things (numarray -- > perhaps premature to have it _instead_ of Numeric, though; dateutils, You might want to keep in touch with the scipy/numarray gang on this particular topic. An effort is currently under way to make scipy w

Re: what would you like to see in a 2nd edition Nutshell?

2004-12-29 Thread Craig Ringer
On Wed, 2004-12-29 at 23:54, Thomas Heller wrote: > I found the discussion of unicode, in any python book I have, insufficient. I couldn't agree more. I think explicit treatment of implicit conversion, the role of sysdefaultencoding, the u'' constructor and unicode() built in, etc would be helpfu

Re: calling functions across threads

2004-12-29 Thread Fernando Perez
Steven Bethard wrote: > I get the correct output, but if you run this yourself, you'll see that > the numbers 1 through 10 aren't printed in sync with the writes (i.e. > every half second); they're all printed at the end. Could someone > explain to me why this happens, and how (if possible) I can

Re: copying classes?

2004-12-29 Thread Jeff Epler
You copied an instance, not a class. Here's an example of attempting to deepcopy a class: >>> class X: pass ... >>> import copy >>> X is copy.deepcopy(X) Traceback (most recent call last): File "", line 1, in ? File "/usr/lib/python2.2/copy.py", line 179, in deepcopy raise error, \ copy.E

Re: objects as mutable dictionary keys

2004-12-29 Thread Terry Reedy
"Nick Coghlan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > This *is* a bug (since Guido called it such), but one not yet fixed as > the obvious solution (removing object.__hash__) causes problems for > Jython, > and a non-obvious solution has not been identified. Since object

Re: calling functions across threads

2004-12-29 Thread Steven Bethard
Fernando Perez wrote: Steven Bethard wrote: I get the correct output, but if you run this yourself, you'll see that the numbers 1 through 10 aren't printed in sync with the writes (i.e. every half second); they're all printed at the end. Could someone explain to me why this happens, and how (if p

Re: Why tuples use parentheses ()'s instead of something else like <>'s?

2004-12-29 Thread Roy Smith
"John Roth" <[EMAIL PROTECTED]> wrote: > > If Python had originally been invented in a unicode world, I suppose we > > wouldn't have this problem. We'd just be using guillemots for tuples > > (and have keyboards which made it easy to type them). > > I suppose the forces of darkness will forever k

Re: Tkinter vs wxPython

2004-12-29 Thread Thomas Bartkus
"Jarek Zgoda" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Cameron Laird wrote: > > Well, while on Windows "native" look exists, on X11 "native" has other > meaning. On my wife's desktop it's KDE that is native, GNUStep is native > on mine and I strongly object calling GTK "native"

Re: Other notes

2004-12-29 Thread Steve Holden
Mike Meyer wrote: Steve Holden <[EMAIL PROTECTED]> writes: [...] Well, perhaps you can explain how a change that's made at run time (calling the decorator) can affect the parser's compile time behavior, then. At the moment, IIRC, the only way Python code can affect the parser's behavior is in the _

Re: Tkinter vs wxPython

2004-12-29 Thread Jp Calderone
On Wed, 29 Dec 2004 13:37:22 -0600, Thomas Bartkus <[EMAIL PROTECTED]> wrote: >"Jarek Zgoda" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Cameron Laird wrote: > > > > Well, while on Windows "native" look exists, on X11 "native" has other > > meaning. On my wife's desktop it's K

Re: Why tuples use parentheses ()'s instead of something else like <>'s?

2004-12-29 Thread Reinhold Birkenfeld
Roy Smith wrote: > "John Roth" <[EMAIL PROTECTED]> wrote: >> > If Python had originally been invented in a unicode world, I suppose we >> > wouldn't have this problem. We'd just be using guillemots for tuples >> > (and have keyboards which made it easy to type them). >> >> I suppose the forces of

Re: Other notes

2004-12-29 Thread Terry Reedy
"Steven Bethard" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'll second that. Please, "Bearophile", do us the courtesy of checking > > (1) Google groups archive of the mailing list: > http://groups-beta.google.com/group/comp.lang.python > > and > > (2) The Python Enhancement P

Re: Python 3000, zip, *args and iterators

2004-12-29 Thread Raymond Hettinger
[Steven Bethard] I'm just suggesting that in a function with a > *args in the def, the args variable be an iterator instead of > a tuple. So people would lose the useful abilities to check len(args) or extract an argument with args[1]? Besides, if a function really wants an iterator, then its si

Re: Other notes

2004-12-29 Thread Terry Reedy
"Mike Meyer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Steve Holden <[EMAIL PROTECTED]> writes: >> Well, perhaps you can explain how a change that's made at run time >> (calling the decorator) can affect the parser's compile time behavior, >> then. At the moment, IIRC, the onl

Re: Why tuples use parentheses ()'s instead of something else like <>'s?

2004-12-29 Thread Grant Edwards
On 2004-12-29, Reinhold Birkenfeld <[EMAIL PROTECTED]> wrote: > Perl6 experiments with the use of guillemots as part of the syntax. As if Perl didn't look like bird-tracks already... http://www.seabird.org/education/animals/guillemot.html http://www.birdguides.com/html/vidlib/species/Uria_aalge.

Re: calling functions across threads

2004-12-29 Thread Fernando Perez
Steven Bethard wrote: > Fernando Perez wrote: >> Steven Bethard wrote: >> >> >>>I get the correct output, but if you run this yourself, you'll see that >>>the numbers 1 through 10 aren't printed in sync with the writes (i.e. >>>every half second); they're all printed at the end. Could someone >

Re: Why tuples use parentheses ()'s instead of something else like <>'s?

2004-12-29 Thread Rocco Moretti
[EMAIL PROTECTED] wrote: Why tuples use parentheses ()'s instead of something else like <>'s? > > Please enlighten me as I really want to know. So to summarize: Commas define tuples, except when they don't, and parentheses are only required when they are necessary. I hope that clears up any confu

Re: Python 3000, zip, *args and iterators

2004-12-29 Thread Steven Bethard
Raymond Hettinger wrote: [Steven Bethard] I'm just suggesting that in a function with a *args in the def, the args variable be an iterator instead of a tuple. So people would lose the useful abilities to check len(args) or extract an argument with args[1]? No more than you lose these abilities wi

Re: Why tuples use parentheses ()'s instead of something else like <>'s?

2004-12-29 Thread Reinhold Birkenfeld
Grant Edwards wrote: > On 2004-12-29, Reinhold Birkenfeld <[EMAIL PROTECTED]> wrote: > >> Perl6 experiments with the use of guillemots as part of the syntax. > > As if Perl didn't look like bird-tracks already... > > http://www.seabird.org/education/animals/guillemot.html > http://www.birdguides

Re: calling functions across threads

2004-12-29 Thread Steven Bethard
Fernando Perez wrote: Steven Bethard wrote: Fernando Perez wrote: Steven Bethard wrote: I get the correct output, but if you run this yourself, you'll see that the numbers 1 through 10 aren't printed in sync with the writes (i.e. every half second); they're all printed at the end. Could someone

Re: learning about threads and processes (was Re: what would you like to see in a 2nd edition Nutshell?)

2004-12-29 Thread Arthhur
On Wed, 29 Dec 2004 16:41:23 +0100, Alex Martelli wrote: > > Hmmm, well, the concepts are reasonably independent of the programming > language involved. If anything, threads and processes may be more tied > to whatever _operating system_ you're using. A very fundamental but > good introduction t

Re: what would you like to see in a 2nd edition Nutshell?

2004-12-29 Thread Russell E. Owen
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Alex Martelli) wrote: >I'm considering proposing to O'Reilly a 2nd edition of "Python in a >Nutshell", that I'd write in 2005, essentially to cover Python 2.3 and >2.4 (the current 1st edition only covers Python up to 2.2). >... Since you were k

Re: Why tuples use parentheses ()'s instead of something else like <>'s?

2004-12-29 Thread Roy Smith
In article <[EMAIL PROTECTED]>, Reinhold Birkenfeld <[EMAIL PROTECTED]> wrote: > >>+<< being an operator Looks more like a smiley for "guy wearing a bowtie" -- http://mail.python.org/mailman/listinfo/python-list

Re: Why tuples use parentheses ()'s instead of something else like <>'s?

2004-12-29 Thread Grant Edwards
On 2004-12-29, Reinhold Birkenfeld <[EMAIL PROTECTED]> wrote: >>> Perl6 experiments with the use of guillemots as part of the syntax. >> >> As if Perl didn't look like bird-tracks already... >> >> http://www.seabird.org/education/animals/guillemot.html >> http://www.birdguides.com/html/vidlib/sp

Re: what would you like to see in a 2nd edition Nutshell?

2004-12-29 Thread c d saunter
Alex Martelli ([EMAIL PROTECTED]) wrote: : I'm considering proposing to O'Reilly a 2nd edition of "Python in a : Nutshell", that I'd write in 2005, essentially to cover Python 2.3 and : 2.4 (the current 1st edition only covers Python up to 2.2). : So, if there's any advice or request about a 2nd e

Re: calling functions across threads

2004-12-29 Thread Steve Holden
Steven Bethard wrote: Fernando Perez wrote: Steven Bethard wrote: Fernando Perez wrote: Steven Bethard wrote: I get the correct output, but if you run this yourself, you'll see that the numbers 1 through 10 aren't printed in sync with the writes (i.e. every half second); they're all printed at t

Re: Why tuples use parentheses ()'s instead of something else like <>'s?

2004-12-29 Thread Dan Sommers
On 29 Dec 2004 21:03:59 GMT, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2004-12-29, Reinhold Birkenfeld <[EMAIL PROTECTED]> wrote: Perl6 experiments with the use of guillemots as part of the syntax. >>> >>> As if Perl didn't look like bird-tracks already... >>> >>> http://www.seabird.org

Re: Why tuples use parentheses ()'s instead of something else like <>'s?

2004-12-29 Thread [EMAIL PROTECTED]
> There just isn't enough > neat-looking punctuation in the ASCII character set. Alex I can't thank you enough for your reply and for everyones' great info on this thread. The end of your email gave a rock solid reason why it is impossible to improve upon ()'s for tuples *There simply isn't

vga output

2004-12-29 Thread Gabriel Cosentino de Barros
Title: vga output i'm writting an app to display images without X... i'm scared just to think about writting it in C... The hardware won't run X. and the CPU is very humble, around 20Mhz (and it must have fade outs). it run a minimalisc OpenBSD kernel. Anyone already did something similar and

Re: Why tuples use parentheses ()'s instead of something else like <>'s?

2004-12-29 Thread [EMAIL PROTECTED]
Brian I am so thankful for your reply and for Alex's and everyone else's on this thread. (See my reply to Alex.) This email may seem minor but it was bugging me for months. You just pointed out what I should have remembered on my own... *<>'s wouldn't have been a perfect choice because they wo

Re: what would you like to see in a 2nd edition Nutshell?

2004-12-29 Thread RM
Alex Martelli wrote: > I still > believe Tkinter coverage is going to help more readers. Alex, I know this can be a can of worms. But honestly, I wonder what do you base that idea on. -Ruben -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >