Re: I'm faint why this can't work

2007-02-16 Thread Gary Herron
[EMAIL PROTECTED] wrote: > Hello, > > I got this similar sample script from books: > > $ cat sampdict.py > #!/usr/bin/python > class SampDict(dict): > def __init__(self, filename=None): > self["name"] = filename > > But when I run it I got the errors: > > >>> from sampdict impor

Re: I'm faint why this can't work

2007-02-16 Thread Gabriel Genellina
En Fri, 16 Feb 2007 03:38:43 -0300, <[EMAIL PROTECTED]> escribió: > Hello, > I got this similar sample script from books: > $ cat sampdict.py > #!/usr/bin/python > class SampDict(dict): > def __init__(self, filename=None): > self["name"] = filename Are you sure you copied it exactly as it appe

Re: I'm faint why this can't work

2007-02-16 Thread JStoneGT
> Hello, > I got this similar sample script from books: > $ cat sampdict.py > #!/usr/bin/python > class SampDict(dict): > def __init__(self, filename=None): > self["name"] = filename > Are you sure you copied it exactly as it appears? Where did you find it? Thank you for the help,Gabri

Re: builtin set literal

2007-02-16 Thread bearophileHUGS
Raymond Hettinger: > One of the reasons for the > rejection was that the small benefit of a literal notion was more than > offset by the attendant need for syntactical atrocities like those > listed above. {:} for empty dict and {} for empty set don't look too much atrocious to me. Note: the lan

Compression library

2007-02-16 Thread roche . alexis
Hi all, I'm looking for a library in python containing severall compression algorithms like RLE, Deflate, LZ77-78-W, Huffman,.. do someone know if such of this type of lib exists?? Thanks -- http://mail.python.org/mailman/listinfo/python-list

KeyboardInterrupt not caught

2007-02-16 Thread ruka_at_
Hi, why is KeyboardInterrupt not caught (xp)? import sys try: inp = sys.stdin.read() except (KeyboardInterrupt, SystemExit): print "kbd-interr,SystemExit" except EOFError: print "eof encountered" except: print "caught all" self.showtraceback() print "normal end" result after sc

Re: Tkinter __call__

2007-02-16 Thread Gigs_
John McMonagle wrote: > Gigs_ wrote: >> from Tkinter import * >> from tkFileDialog import askopenfilename >> from tkColorChooser import askcolor >> from tkMessageBox import askquestion, showerror >> from tkSimpleDialog import askfloat >> >> demos = { >> 'Open': askopenfilename, >> 'C

Re: rot13 in a more Pythonic style?

2007-02-16 Thread Steven D'Aprano
On Fri, 16 Feb 2007 04:53:23 +, Dennis Lee Bieber wrote: > On 15 Feb 2007 11:10:53 -0800, "Andy Dingley" <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > >> >> Fortunately I don't think it's _quite_ that bad. > > Possibly not, but that description of the problem wo

Re: KeyboardInterrupt not caught

2007-02-16 Thread Daniel Nogradi
> why is KeyboardInterrupt not caught (xp)? > import sys > try: > inp = sys.stdin.read() > except (KeyboardInterrupt, SystemExit): > print "kbd-interr,SystemExit" > except EOFError: > print "eof encountered" > except: > print "caught all" > self.showtraceback() > print "normal e

Re: I'm faint why this can't work

2007-02-16 Thread Gabriel Genellina
En Fri, 16 Feb 2007 05:27:46 -0300, <[EMAIL PROTECTED]> escribió: >> I got this similar sample script from books: >> $ cat sampdict.py >> #!/usr/bin/python >> class SampDict(dict): >> def __init__(self, filename=None): >> self["name"] = filename > > >> Are you sure you copied it exactly as it

Approaches of interprocess communication

2007-02-16 Thread exhuma.twn
Hi all, Supposing you have two separate processes running on the same box, what approach would you suggest to communicate between those two processes. Let me list the ones I know of: * Sockets Advantage: Supported per se in nearly every programming language without even the need to install ad

Re: KeyboardInterrupt not caught

2007-02-16 Thread Gabriel Genellina
En Fri, 16 Feb 2007 06:58:54 -0300, Daniel Nogradi <[EMAIL PROTECTED]> escribió: >> why is KeyboardInterrupt not caught (xp)? > > Hi, are you sure this is exactly what you run? > The code above works perfectly for me and prints > > kbd-interr,SystemExit > normal end > > as it should upon pressin

Re: Tkinter __call__

2007-02-16 Thread Peter Otten
Gigs_ wrote: > I have tried but cant get it to work properly. It does work, but not the way you want it to. > I want to instead printit method to put __call__ and call it like that I don't understand. > Can someone help me, please? Try to explain what you want a bit more explicitly. Peter --

Re: KeyboardInterrupt not caught

2007-02-16 Thread Steven D'Aprano
On Fri, 16 Feb 2007 01:47:43 -0800, ruka_at_ wrote: > Hi, > why is KeyboardInterrupt not caught (xp)? > import sys > try: > inp = sys.stdin.read() > except (KeyboardInterrupt, SystemExit): > print "kbd-interr,SystemExit" > except EOFError: > print "eof encountered" I don't think you e

Re: Pep 3105: the end of print?

2007-02-16 Thread Steven D'Aprano
On Thu, 15 Feb 2007 19:04:34 -0600, Edward K Ream wrote: >> Isn't the very concept of major releases (1.x, 2.x, 3.x) that they *can* >> be not backwards-compatible with previous releases? > > Not at all. Backwards compatibility means that one can still run old code > provided the code eschews

Re: Approaches of interprocess communication

2007-02-16 Thread Gabriel Genellina
En Fri, 16 Feb 2007 07:11:36 -0300, exhuma.twn <[EMAIL PROTECTED]> escribió: > Hi all, > > Supposing you have two separate processes running on the same box, > what approach would you suggest to communicate between those two > processes. > > Let me list the ones I know of: > > * Sockets >Advan

Re: KeyboardInterrupt not caught

2007-02-16 Thread Gabriel Genellina
En Fri, 16 Feb 2007 07:26:09 -0300, Steven D'Aprano <[EMAIL PROTECTED]> escribió: > I seem to have a vague recollection that the keyboard interrupt under > Windows isn't ^C but something else... ^Z maybe? Ctrl-C is the keyboard interrupt, Ctrl-Z means EOF. -- Gabriel Genellina -- http://mai

Re: The Python interactive interpreter has no command history

2007-02-16 Thread Alan Franzoni
Il Thu, 15 Feb 2007 15:14:00 -0200, Eduardo "EdCrypt" O. Padoan ha scritto: > Are you using Ubuntu? The last comes with 2.4.x and 2.5. This only > occurs on 2.5. This happens when you compile Python with libreadline > installed, AFAIK. I'm on Edgy and command history works well both with 2.4 and

Pickling of generators

2007-02-16 Thread KIaus Muller
Generators are becoming more and more important and powerful in Python. The inability of pickle to save/restore generators has become a major (and growing) limitation to the full exploitation of generators. The requirement for pickling generators has already been raised in 2003. My project (SimP

Re: I'm faint why this can't work

2007-02-16 Thread Ben Finney
[EMAIL PROTECTED] writes: > The codes got by me from the book of "Dive into Python".The original > codes are below: > > class FileInfo(dict): > "store file metadata" > def __init__(self, filename=None): > self["name"] = filename You've put the lines of code in your message without indentation

Re: Approaches of interprocess communication

2007-02-16 Thread Daniel Nogradi
> Supposing you have two separate processes running on the same box, > what approach would you suggest to communicate between those two > processes. > > Let me list the ones I know of: > > * Sockets >Advantage: Supported per se in nearly every programming language > without even the need to ins

Re: Approaches of interprocess communication

2007-02-16 Thread Ben Finney
"exhuma.twn" <[EMAIL PROTECTED]> writes: > Supposing you have two separate processes running on the same box, > what approach would you suggest to communicate between those two > processes. > > Let me list the ones I know of: > > * Sockets >Advantage: Supported per se in nearly every programmi

Re: Tkinter __call__

2007-02-16 Thread James Stroud
Gigs_ wrote: > from Tkinter import * > from tkFileDialog import askopenfilename > from tkColorChooser import askcolor > from tkMessageBox import askquestion, showerror > from tkSimpleDialog import askfloat > > demos = { > 'Open': askopenfilename, > 'Color': askcolor, > 'Query': la

Re: Approaches of interprocess communication

2007-02-16 Thread Ben Finney
"Gabriel Genellina" <[EMAIL PROTECTED]> writes: > (And I would expect that making a connection to "localhost" actually > does *not* go down up to the network card hardware layer, but I > don't know for real if this is the case or not). It damned well better. That's the entire point of the loopbac

Any Idea about thread safe issue with python

2007-02-16 Thread mralokkp
Hi All I need help guys. I have a code running properly and execute again after a certain time. But The thing i am looking for that it should not start from other instance says looking for thread safe In Simple words self.lock = thread.allocate_lock()

Re: KeyboardInterrupt not caught

2007-02-16 Thread ruka_at_
On 16 Feb., 11:44, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: Thanks to all of you, for the fast answers. The code I showed you is actually the code running. I tried to catch eof, cause I read ^C could produce EOF (the self.showtraceback() was just a stupid cut 'n paste). But not even the exce

Re: KeyboardInterrupt not caught

2007-02-16 Thread ruka_at_
On 16 Feb., 12:16, [EMAIL PROTECTED] wrote: > On 16 Feb., 11:44, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > > I've tried it in cygwin, result: $ python.exe c:/work/py_src/ctrl_test.py kbd-interr,SystemExit normal end br Rudi -- http://mail.python.org/mailman/listinfo/python-list

Re: Pep 3105: the end of print?

2007-02-16 Thread Eduardo \"EdCrypt\" O. Padoan
On 2/15/07, Edward K Ream <[EMAIL PROTECTED]> wrote: > > Isn't the very concept of major releases (1.x, 2.x, 3.x) that they *can* > > be not backwards-compatible with previous releases? > > Not at all. [...] It is the only intent of Python 3.0: be free of backward compatibity constraints. There ar

Command line prompt broken on XP with Python 2.5 - help!

2007-02-16 Thread Endless Story
My last version of Python was 2.4, running smoothly on XP with path c: \Python24 - no need even to include this path in PATH; everything worked as it's supposed to at the command line. Just installed Python 2.5, after uninstalling 2.4 (and also 2.3 which had lingered). Now if I open a shell in Win

Re: Pep 3105: the end of print?

2007-02-16 Thread Edward K Ream
> In short, if you need to support 2.3, you're not ready to be looking at > 3.0. I hope this turns out not to be true. As a developer, I have no way to force people to 3.0, and no reason to want to. For me, maintaining two incompatible code bases is out of the question. It will be interesti

Re: Pep 3105: the end of print?

2007-02-16 Thread Edward K Ream
> There are a tool called "2to3" that translates things like "print foo" to > print(foo). The point of my original post was that if I want to maintain a common code base the tool must translate 'print foo' to 'print2(foo)'. Edward

Re: Pep 3105: the end of print?

2007-02-16 Thread Edward K Ream
> I'm pretty sure you're mistaken. Python 3 will be the release that breaks > code. Hopefully very little, but there almost certainly will be some. Pep 3105 breaks a *lot* of code, despite the bland assertion that most production programs don't use print. Presumably, Guido wanted to improve print

Re: Tkinter __call__

2007-02-16 Thread Gigs_
James Stroud wrote: > Gigs_ wrote: >> from Tkinter import * >> from tkFileDialog import askopenfilename >> from tkColorChooser import askcolor >> from tkMessageBox import askquestion, showerror >> from tkSimpleDialog import askfloat >> >> demos = { >> 'Open': askopenfilename, >> 'Color

Re: Pep 3105: the end of print?

2007-02-16 Thread Edward K Ream
> Is that what you intend to say? I intended to say what I did say: "Python releases have generally been backwards compatible with previous releases, with a few minor exceptions." Imo, this is compatible with what you are saying. > So long as it's done in a well-documented way, with a change in

Re: Bush, yank bastards kicked by india in their arse Re: *POLL* How many sheeple believe in the 911 fairy tale and willing to accept an Orwellian doublespeak and enslavement world ?

2007-02-16 Thread Overlord
You are a moron... OL -- http://mail.python.org/mailman/listinfo/python-list

Re: Pep 3105: the end of print?

2007-02-16 Thread Fuzzyman
On Feb 16, 11:54 am, "Edward K Ream" <[EMAIL PROTECTED]> wrote: > > In short, if you need to support 2.3, you're not ready to be looking at > > 3.0. > > I hope this turns out not to be true. As a developer, I have no way to > force people to 3.0, and no reason to want to. For me, maintaining two

Re: Approaches of interprocess communication

2007-02-16 Thread Duncan Grisby
In article <[EMAIL PROTECTED]>, exhuma.twn <[EMAIL PROTECTED]> wrote: >Supposing you have two separate processes running on the same box, >what approach would you suggest to communicate between those two >processes. [...] >* Webservices > Advantage: Relatively easy to use, can work across diffe

Re: Bush, yank bastards kicked by india in their arse Re: *POLL* How many sheeple believe in the 911 fairy tale and willing to accept an Orwellian doublespeak and enslavement world ?

2007-02-16 Thread Fuzzyman
On Jan 29, 10:18 pm, [EMAIL PROTECTED] wrote: > On Jan 29, 11:15 am, "Vance P. Frickey" <[EMAIL PROTECTED]> wrote: > > > Directorate (overseas espionage), his old employers owned > > someone in just about every important government agency in > > India, from the 1970s until they stopped being able t

Regex - where do I make a mistake?

2007-02-16 Thread Johny
I have string="""55. 128 170 """ where I need to replace 55. 170 by space. So I tried # import re string="""55.128170 """ Newstring=re.sub(r'.*'," ",string) ### But it does NOT work. Can anyone explain why? Thank you L. -- http://mail.python.org/mailman/listinfo/python-lis

Re: Pep 3105: the end of print?

2007-02-16 Thread Edward K Ream
> There is also the 2to3 converter. The aim is that this will be effective enough that coders should be able to maintain a 2.X (2.6 ?) codebase, run it through 2to3 and have the result run unchanged on Python 3. That way there will be no need to maintain two code bases. I have offered a proof that

Re: Pep 3105: the end of print?

2007-02-16 Thread Peter Otten
Edward K Ream wrote: >> There is also the 2to3 converter. The aim is that this will be > effective enough that coders should be able to maintain a 2.X (2.6 ?) > codebase, run it through 2to3 and have the result run unchanged on > Python 3. That way there will be no need to maintain two code bases.

Re: Pep 3105: the end of print?

2007-02-16 Thread Edward K Ream
> There could be something like from __future__ import print_function To repeat: this would be compatible only with Python 2.6. Edward Edward K. Ream email: [EMAIL PROTECTED] Leo: http://webpages.charter.net/edreamleo/front.

Re: Bush, yank bastards kicked by india in their arse Re: *POLL* How many sheeple believe in the 911 fairy tale and willing to accept an Orwellian doublespeak and enslavement world ?

2007-02-16 Thread Peter Decker
On 16 Feb 2007 04:34:08 -0800, Fuzzyman <[EMAIL PROTECTED]> wrote: > You're a racist malicious moron. You mis-spelled 'troll'. -- # p.d. -- http://mail.python.org/mailman/listinfo/python-list

Re: Approaches of interprocess communication

2007-02-16 Thread exhuma.twn
On Feb 16, 1:33 pm, Duncan Grisby <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > > exhuma.twn <[EMAIL PROTECTED]> wrote: > >Supposing you have two separate processes running on the same box, > >what approach would you suggest to communicate between those two > >processes. > > [...]

Re: Pep 3105: the end of print?

2007-02-16 Thread Peter Otten
Edward K Ream wrote: >> There could be something like from __future__ import print_function > > To repeat: this would be compatible only with Python 2.6. Indeed. Don't lose your nerves over that bunch of casual readers of your thread :-) Peter -- http://mail.python.org/mailman/listinfo/pytho

Re: Regex - where do I make a mistake?

2007-02-16 Thread Peter Otten
Johny wrote: > I have > string="""55. > 128 > 170 > """ > > where I need to replace > 55. > 170 > > by space. > So I tried > > # > import re > string="""55. class="test123">128170 > """ > Newstring=re.sub(r'.*'," ",string) > ### > > But it does NOT work. > Can anyone explai

Re: Approaches of interprocess communication

2007-02-16 Thread Diez B. Roggisch
> Maybe this line of mine was a bit too condensed ;) I fully agree with > you on what you say about CORBA. It's just that for most people IDL > looks a bit out of place. Especially because it resembles C. But once > you actually wrote a few projects using CORBA, you actually begin to > see it's ele

Re: builtin set literal

2007-02-16 Thread Schüle Daniel
> {:} for empty dict and {} for empty set don't look too much atrocious > to me. this looks consistent to me -- http://mail.python.org/mailman/listinfo/python-list

Re: Pep 3105: the end of print?

2007-02-16 Thread Fuzzyman
On Feb 16, 12:47 pm, "Edward K Ream" <[EMAIL PROTECTED]> wrote: > > There is also the 2to3 converter. The aim is that this will be > > effective enough that coders should be able to maintain a 2.X (2.6 ?) > codebase, run it through 2to3 and have the result run unchanged on > Python 3. That way ther

Re: Regex - where do I make a mistake?

2007-02-16 Thread Johny
On Feb 16, 2:14 pm, Peter Otten <[EMAIL PROTECTED]> wrote: > Johny wrote: > > I have > > string="""55. > > 128 > > 170 > > """ > > > where I need to replace > > 55. > > 170 > > > by space. > > So I tried > > > # > > import re > > string="""55. > class="test123">128170 > > """ > > Newstr

Re: Approaches of interprocess communication

2007-02-16 Thread Paul Boddie
On 16 Feb, 14:16, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > > You can't leave WSDL out of SOAP Yes you can, since they're two different things. What you probably meant was that you can't leave WSDL out of "big architecture", W3C standards-intensive Web services. Of course, RPC-style SOAP wit

Re: Regex - where do I make a mistake?

2007-02-16 Thread Peter Otten
Johny wrote: > On Feb 16, 2:14 pm, Peter Otten <[EMAIL PROTECTED]> wrote: >> Johny wrote: >> > I have >> > string="""55. >> > 128 >> > 170 >> > """ >> >> > where I need to replace >> > 55. >> > 170 >> >> > by space. >> > So I tried >> >> > # >> > import re >> > string="""55.> > class="

Re: Approaches of interprocess communication

2007-02-16 Thread Diez B. Roggisch
Paul Boddie wrote: > On 16 Feb, 14:16, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: >> >> You can't leave WSDL out of SOAP > > Yes you can, since they're two different things. What you probably > meant was that you can't leave WSDL out of "big architecture", W3C > standards-intensive Web service

starship.python.net is down

2007-02-16 Thread Tom Bryan
One of the system administrators had to reboot starship.python.net last night, but it appears that the machine did not come back up properly. starship.python.net is currently down while we investigate. ---Tom -- http://mail.python.org/mailman/listinfo/python-list

Re: Pep 3105: the end of print?

2007-02-16 Thread Edward K Ream
> Why won't it be possible to make 'print' in Python 3 that supports all > the functionality of the current print statement, and then translate to > that ? > I saw an assertion to the effect that it wasn't possible - but no proof. As discussed in the original post, the problem is the reverse: the

Re: Regex - where do I make a mistake?

2007-02-16 Thread Carsten Haese
On Fri, 2007-02-16 at 05:34 -0800, Johny wrote: > On Feb 16, 2:14 pm, Peter Otten <[EMAIL PROTECTED]> wrote: > > Johny wrote: > > > I have > > > string="""55. > > > 128 > > > 170 > > > """ > > > > > where I need to replace > > > 55. > > > 170 > > > > > by space. > > > So I tried > > > > > #

Re: Approaches of interprocess communication

2007-02-16 Thread Paul Boddie
On 16 Feb, 14:53, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > [XMPP, XML messaging] > Didn't know that. Yet I presume it is pretty awful to manually decompose and > compose the method invocations and parameter sets. It depends on how well you like working with XML, I suppose. > I've got no

Re: numpy, numarray, or numeric?

2007-02-16 Thread RickMuller
On Feb 15, 11:23 pm, "Frank" <[EMAIL PROTECTED]> wrote: > On Feb 15, 4:40 pm, "Christian Convey" <[EMAIL PROTECTED]> > wrote: > > > I need to bang out an image processing library (it's schoolwork, so I > > can't just use an existing one). But I see three libraries competing > > for my love: numpy,

Re: Pep 3105: the end of print?

2007-02-16 Thread Roel Schroeven
Edward K Ream schreef: >> I'm pretty sure you're mistaken. Python 3 will be the release that breaks >> code. Hopefully very little, but there almost certainly will be some. > > Pep 3105 breaks a *lot* of code, despite the bland assertion that most > production programs don't use print. > > Presum

Re: Pep 3105: the end of print?

2007-02-16 Thread Roel Schroeven
Edward K Ream schreef: >> There are a tool called "2to3" that translates things like "print foo" to >> print(foo). > > The point of my original post was that if I want to maintain a common code > base the tool must translate 'print foo' to 'print2(foo)'. At first sight it seems to me that it's

Re: Pep 3105: the end of print?

2007-02-16 Thread Steven D'Aprano
On Fri, 16 Feb 2007 06:07:42 -0600, Edward K Ream wrote: >> I'm pretty sure you're mistaken. Python 3 will be the release that breaks >> code. Hopefully very little, but there almost certainly will be some. > > Pep 3105 breaks a *lot* of code, despite the bland assertion that most > production pr

Re: Pep 3105: the end of print?

2007-02-16 Thread Fuzzyman
On Feb 16, 2:01 pm, "Edward K Ream" <[EMAIL PROTECTED]> wrote: > > Why won't it be possible to make 'print' in Python 3 that supports all > > the functionality of the current print statement, and then translate to > > that ? > > I saw an assertion to the effect that it wasn't possible - but no proo

Re: Pep 3105: the end of print?

2007-02-16 Thread Edward K Ream
> print is only a problem if you expect your code to work under both Python > 2.x and 3.x. Exactly. Edward Edward K. Ream email: [EMAIL PROTECTED] Leo: http://webpages.charter.net/edreamleo/front.html ---

Re: Pep 3105: the end of print?

2007-02-16 Thread Stefan Rank
on 16.02.2007 13:02 Edward K Ream said the following: >> There are a tool called "2to3" that translates things like "print foo" to >> print(foo). > > The point of my original post was that if I want to maintain a common code > base the tool must translate 'print foo' to 'print2(foo)'. I think y

Re: Pep 3105: the end of print?

2007-02-16 Thread Jean-Paul Calderone
On Sat, 17 Feb 2007 01:32:21 +1100, Steven D'Aprano > [snip] > >I don't think that follows at all. print is only a problem if you expect >your code to work under both Python 2.x and 3.x. I wouldn't imagine >that many people are going to expect that: I know I don't. I think some people are confuse

Re: Pep 3105: the end of print?

2007-02-16 Thread Edward K Ream
> It looks your main issue is that you're complaining that Python 3000 is going to break things in a non-backward compatible way. No. My complaint is *only* that changing the meaning of 'print' is needless pain. Edward Edward

Re: Approaches of interprocess communication

2007-02-16 Thread Steve Holden
Ben Finney wrote: > "Gabriel Genellina" <[EMAIL PROTECTED]> writes: > >> (And I would expect that making a connection to "localhost" actually >> does *not* go down up to the network card hardware layer, but I >> don't know for real if this is the case or not). > > It damned well better. That's th

Re: Pep 3105: the end of print?

2007-02-16 Thread Steven D'Aprano
On Fri, 16 Feb 2007 08:01:11 -0600, Edward K Ream wrote: >> Why won't it be possible to make 'print' in Python 3 that supports all >> the functionality of the current print statement, and then translate to >> that ? >> I saw an assertion to the effect that it wasn't possible - but no proof. > > A

Re: Pep 3105: the end of print?

2007-02-16 Thread Steven D'Aprano
On Fri, 16 Feb 2007 06:42:55 -0800, Fuzzyman wrote: > I mentioned the 2to3 translator- the goal of which is *precisely* to > allow you to write code that will run on Python 2.X and when > translated run under Python 3.0. Unfortunately, that is not a realistic goal for the 2to3 translator. The goa

Re: Pickling of generators

2007-02-16 Thread Steve Holden
KIaus Muller wrote: > Generators are becoming more and more important and powerful in Python. > The inability of pickle to save/restore generators has become a major > (and growing) limitation to the full exploitation of generators. > > The requirement for pickling generators has already been ra

Re: Command line prompt broken on XP with Python 2.5 - help!

2007-02-16 Thread Jim
On Feb 16, 5:52 am, "Endless Story" <[EMAIL PROTECTED]> wrote: > My last version of Python was 2.4, running smoothly on XP with path c: > \Python24 - no need even to include this path in PATH; everything > worked as it's supposed to at the command line. > > Just installed Python 2.5, after uninstal

Re: Pep 3105: the end of print?

2007-02-16 Thread Edward K Ream
> So you only have one codebase to maintain and you can still use print... Not if the theorum is correct. > It may be true that you won't be able to write code that runs > untranslated on 2 and 3. That's my definition of a common code base. That is the content of the theorum. > That doesn't

Re: Pep 3105: the end of print?

2007-02-16 Thread Edward K Ream
>> That's the proof. Can you find a flaw in it? > No, but it doesn't matter. There's no particular reason why you have to > write "print (whatever)" in your code. What you need is *some function* > that is capable of duplicating the functionality of print, Precisely wrong. The title of this thre

Re: Pep 3105: the end of print?

2007-02-16 Thread Steven D'Aprano
On Fri, 16 Feb 2007 09:49:03 -0500, Jean-Paul Calderone wrote: > On Sat, 17 Feb 2007 01:32:21 +1100, Steven D'Aprano >> [snip] >> >>I don't think that follows at all. print is only a problem if you expect >>your code to work under both Python 2.x and 3.x. I wouldn't imagine >>that many people are

Re: Pep 3105: the end of print?

2007-02-16 Thread Fuzzyman
On Feb 16, 2:54 pm, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Fri, 16 Feb 2007 06:42:55 -0800, Fuzzyman wrote: > > I mentioned the 2to3 translator- the goal of which is *precisely* to > > allow you to write code that will run on Python 2.X and when > > translated run under Python 3.0. > > Unf

Re: Command line prompt broken on XP with Python 2.5 - help!

2007-02-16 Thread Endless Story
On Feb 16, 9:56 am, "Jim" <[EMAIL PROTECTED]> wrote: > On Feb 16, 5:52 am, "Endless Story" <[EMAIL PROTECTED]> wrote: > Are you talking about the Environment Variables-->System Variable-->path? > You may want to right click on My Computer-->System Properties-->Advanced--> > Environment Variables-->

Re: Pep 3105: the end of print?

2007-02-16 Thread Fuzzyman
On Feb 16, 3:00 pm, "Edward K Ream" <[EMAIL PROTECTED]> wrote: > > So you only have one codebase to maintain and you can still use print... > > Not if the theorum is correct. > > > It may be true that you won't be able to write code that runs > > untranslated on 2 and 3. > > That's my definition of

Reg Google Web Toolkit and Python

2007-02-16 Thread Shadab Sayani
Hi , We have a project where I need to read files store them in database in the backend.We have done this in python.Now we decided to use Ajax technique for user interface.For that we found that GWT is one of the best toolkits.Now I got a doubt can I interface GWT with python. Thanks , Shadab. Sen

Re: Pep 3105: the end of print?

2007-02-16 Thread Jean-Paul Calderone
On Sat, 17 Feb 2007 02:17:23 +1100, Steven D'Aprano <[EMAIL PROTECTED]> wrote: >On Fri, 16 Feb 2007 09:49:03 -0500, Jean-Paul Calderone wrote: > >> On Sat, 17 Feb 2007 01:32:21 +1100, Steven D'Aprano >>> [snip] >>> >>>I don't think that follows at all. print is only a problem if you expect >>>your

Re: Command line prompt broken on XP with Python 2.5 - help!

2007-02-16 Thread Tim Golden
Endless Story wrote: > On Feb 16, 9:56 am, "Jim" <[EMAIL PROTECTED]> wrote: >> On Feb 16, 5:52 am, "Endless Story" <[EMAIL PROTECTED]> wrote: >> Are you talking about the Environment Variables-->System Variable-->path? >> You may want to right click on My Computer-->System Properties-->Advanced-->

[ANN] wxCocoaDialog v0.3

2007-02-16 Thread Alexander Stigsen
wxCocoaDialog v0.3 http://code.google.com/p/wxcocoadialog/ wxCocoaDialog is an multi-platform port of the CocoaDialog application for OS X, that allows the use of common GUI controls such as file selectors, text input, progress bars, yes/no confirmations and more with a command-line applicatio

why I don't like range/xrange

2007-02-16 Thread stdazi
Hello! Many times I was suggested to use xrange and range instead of the while constructs, and indeed, they are quite more elegant - but, after calculating the overhead (and losen flexibility) when working with range/xrange, and while loops, you get to the conclusion that it isn't really worth usi

Re: Pep 3105: the end of print?

2007-02-16 Thread Edward K Ream
> Even in the Python world, nobody expects to run the same code base under C Python and Jython and IronPython and PyPy. Leo now runs under CPython with both wxWidgets and Tkinter. The gui code is confined to plugins, and a similar gui plugin will suffice to run Leo under IronPython. Indeed, Leo

Re: Pep 3105: the end of print?

2007-02-16 Thread Steven D'Aprano
On Fri, 16 Feb 2007 09:07:02 -0600, Edward K Ream wrote: >>> That's the proof. Can you find a flaw in it? >> No, but it doesn't matter. There's no particular reason why you have to >> write "print (whatever)" in your code. What you need is *some function* >> that is capable of duplicating the fun

Re: Reg Google Web Toolkit and Python

2007-02-16 Thread Roman Yakovenko
On 2/16/07, Shadab Sayani <[EMAIL PROTECTED]> wrote: > Hi , > We have a project where I need to read files store > them in database in the backend.We have done this in > python.Now we decided to use Ajax technique for user > interface.For that we found that GWT is one of the > best toolkits.Now I g

Re: output to console and to multiple files

2007-02-16 Thread [EMAIL PROTECTED]
On Feb 15, 5:48 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Thu, 15 Feb 2007 19:35:10 -0300, Matimus <[EMAIL PROTECTED]> escribió: > > > > >> I think you should be able to use my or goodwolf's solution with the > >> subprocess module. Something like this (untested): > > >> [code] > >> c

Re: Pep 3105: the end of print?

2007-02-16 Thread Edward K Ream
> Keep the print name; > Keep the print functionality; > Keep a single code base. Retain the print statement and its functionality, and define an official_print_function to be used in the common code base. I would be satisfied with this (it's what I do now), and it would cause no needless prob

MS Word mail merge automation

2007-02-16 Thread [EMAIL PROTECTED]
Hi Steve M. , Your articole is very interesting to me becouse I'm just tring to do the same thing. Could you please show me the last version of your python code so that I could use it for my purpose. I'm not a programmer but a my friend could help me for this. Thanks so much in advance for your

Re: Pep 3105: the end of print?

2007-02-16 Thread BJörn Lindqvist
On 2/16/07, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > I was just pointing out that some people might be confused. I didn't make > any judgement about that fact. You seem to be suggesting that because there > are other confusing things, it's okay for Python to be confusing too. I'm > not m

Re: Pep 3105: the end of print?

2007-02-16 Thread Jean-Paul Calderone
On Fri, 16 Feb 2007 16:49:05 +0100, BJörn Lindqvist <[EMAIL PROTECTED]> wrote: >On 2/16/07, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: >>I was just pointing out that some people might be confused. I didn't make >>any judgement about that fact. You seem to be suggesting that because >>there >

Re: why I don't like range/xrange

2007-02-16 Thread Chris Mellon
On 16 Feb 2007 07:30:15 -0800, stdazi <[EMAIL PROTECTED]> wrote: > Hello! > > Many times I was suggested to use xrange and range instead of the > while constructs, and indeed, they are quite more elegant - but, after > calculating the overhead (and losen flexibility) when working with > range/xrang

Re: why I don't like range/xrange

2007-02-16 Thread Paul McGuire
On Feb 16, 9:30 am, "stdazi" <[EMAIL PROTECTED]> wrote: > Hello! > > Many times I was suggested to use xrange and range instead of the > while constructs, and indeed, they are quite more elegant - but, after > calculating the overhead (and losen flexibility) when working with > range/xrange, and wh

Re: Command line prompt broken on XP with Python 2.5 - help!

2007-02-16 Thread Endless Story
On Feb 16, 10:29 am, Tim Golden <[EMAIL PROTECTED]> wrote: > I would ask if you had *any* other Python installation > -- say a cygwin one -- which might just be getting in the way? It's a cygwin problem, guddammit. I was wondering if this might be the case - I should have mentioned in my initial p

Re: why I don't like range/xrange

2007-02-16 Thread Larry Bates
stdazi wrote: > Hello! > > Many times I was suggested to use xrange and range instead of the > while constructs, and indeed, they are quite more elegant - but, after > calculating the overhead (and losen flexibility) when working with > range/xrange, and while loops, you get to the conclusion that

Re: why I don't like range/xrange

2007-02-16 Thread Steven D'Aprano
On Fri, 16 Feb 2007 07:30:15 -0800, stdazi wrote: > Hello! > > Many times I was suggested to use xrange and range instead of the > while constructs, and indeed, they are quite more elegant - but, after > calculating the overhead (and losen flexibility) when working with > range/xrange, and while

Re: Pep 3105: the end of print?

2007-02-16 Thread Steven D'Aprano
On Fri, 16 Feb 2007 09:32:56 -0600, Edward K Ream wrote: >> Even in the Python world, nobody expects to run the same code base under > C Python and Jython and IronPython and PyPy. > > Leo now runs under CPython with both wxWidgets and Tkinter. The gui code is > confined to plugins, and a similar

Re: Approaches of interprocess communication

2007-02-16 Thread Daniel Nogradi
> About "Linda": Am I right that it looks very similar to "JavaSpaces"? > If yes, are there any funcdamental differences between those two? Yes, they are both linda implementations, but I have no idea what so ever how they compare. A local java expert maybe? -- http://mail.python.org/mailman/list

Re: Reg Google Web Toolkit and Python

2007-02-16 Thread Steve Holden
Shadab Sayani wrote: > Hi , > We have a project where I need to read files store > them in database in the backend.We have done this in > python.Now we decided to use Ajax technique for user > interface.For that we found that GWT is one of the > best toolkits.Now I got a doubt can I interface GWT >

Re: Command line prompt broken on XP with Python 2.5 - help!

2007-02-16 Thread Steve Holden
Endless Story wrote: > On Feb 16, 10:29 am, Tim Golden <[EMAIL PROTECTED]> wrote: >> I would ask if you had *any* other Python installation >> -- say a cygwin one -- which might just be getting in the way? > > It's a cygwin problem, guddammit. I was wondering if this might be the > case - I should

CENSURING FEMALE SHALLOWNESS

2007-02-16 Thread Urlet
A thought-provoking, yet genuine document supporting recognition of the role of true fathers, even if ex-lifeguards at the Hotel Riviera. Against Blondes' momentary hanky-panky that, however, has long-term consequences. http://www.youtube.com/watch?v=RtDfdlsgREI -- http://mail.python.org/mailman

  1   2   >