Re: [Info] PEP 308 accepted - new conditional expressions

2005-09-30 Thread Paul Rubin
Reinhold Birkenfeld <[EMAIL PROTECTED]> writes: > For a conditional, syntax must be found, and the tradition of Python > design is not to use punctuation for something that can be solved with > keywords. Yeah, "if C then A else B" is a ancient tradition stretching from Algol-60 to OCAML, and who k

Re: [Info] PEP 308 accepted - new conditional expressions

2005-09-30 Thread Reinhold Birkenfeld
Sam wrote: > Jaime Wyant writes: > >> On 9/30/05, Sam <[EMAIL PROTECTED]> wrote: >>> Reinhold Birkenfeld writes: >>> >>> > Hi, >>> > >>> > after Guido's pronouncement yesterday, in one of the next versions of >>> > Python >>> > there will be a conditional expression with the following syntax: >>>

Re: [Info] PEP 308 accepted - new conditional expressions

2005-09-30 Thread Reinhold Birkenfeld
Erik Max Francis wrote: > Dave Benjamin wrote: > >> Hooray! After years of arguing over which syntax to use, and finally >> giving up since nobody could agree, the Benevolent Dictator did what >> only a dictator can do, and just made a damn decision already. >> >> Thank you, Guido! =) > > Yes,

Re: [Info] PEP 308 accepted - new conditional expressions

2005-09-30 Thread Reinhold Birkenfeld
Ron Adam wrote: >> It will be >> >> A if B else (C if D else F) > > So this evaluates as if there are parentheses around each section.. Hmm? > >(A) if (B) else ( (C) if (D) else (F) ) > > The first 'if' divided the expr, then each succeeding 'if' divides the > sub expressions, etc... ? >

Re: Feature Proposal: Sequence .join method

2005-09-30 Thread Michele Simionato
This can be shortened to def interlace(x, i): """interlace(x, i) -> i0, x, i1, x, ..., x, iN """ i = iter(i) i.next() for e in i: yield x yield e I have noticed a while ago that inside generators StopIteration is automatically trappe

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread Steven D'Aprano
A cautionary tale of what happens when religious wars enter programming debates. For all I know, Paul Rubin is intelligent, gentle, kind to animals and small children, generous, charitable and modest. But touch his religious belief in the necessity of "truly" private variables, and boy oh boy does

Re: OT: Phases of the moon

2005-09-30 Thread Steven D'Aprano
On Sat, 01 Oct 2005 00:18:44 -0400, Sherm Pendley wrote: > *whoosh* > > That, my friend, was the sound of a joke flying past and completely > missing you. ;-) Wouldn't be the first time, and surely not the last. *wink* -- Steven. -- http://mail.python.org/mailman/listinfo/python-list

how to send a SIGINT to a Python process?

2005-09-30 Thread Michele Simionato
Is there a way to send a SIGINT/KeyboardInterrupt to a Python process (knowing the pid) that works both on Unix and Windows? Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 308 accepted - new conditional expressions

2005-09-30 Thread Michele Simionato
Terry Reedy ha scritto: > "Dave Benjamin" <[EMAIL PROTECTED]> > > > Hooray! After years of arguing over which syntax to use, and finally > > giving up since nobody could agree, > > I understand that this has become the local 'politically correct' view, but > as a participant in the discussion, I k

Re: A Moronicity of Guido van Rossum

2005-09-30 Thread [EMAIL PROTECTED]
I have an excellent idea. Create your own programming language and do whatever you want with it. Until then, I'm thinking that Guido can do whatever he wants with his. But I'm guessing that your programming skills will be in the same place as your greatness - in your own head. -- http://mail.pyth

Re: RELEASED Python 2.4.2 (final)

2005-09-30 Thread Bugs
- I had an old ActiveState python24.dll in \windows\system32 which I deleted. That must've been left over from a 2.4.1 ActiveState installation which I had installed then uninstalled sometime ago. - I then uninstalled Python 2.4.2 and re-installed it for "all" users. After that everything seeme

Re: OT: Phases of the moon [was Re: A Moronicity of Guido van Rossum]

2005-09-30 Thread [EMAIL PROTECTED]
Steven D'Aprano wrote: > On Fri, 30 Sep 2005 18:02:14 -0400, Sherm Pendley wrote: > > > [EMAIL PROTECTED] writes: > > > >> I wonder if his postings are related to the phases of the moon? It > >> might explain a lot. > > > > Yes, it would. Note that the word lunatic is derived from the Latin word >

Re: OT: Phases of the moon

2005-09-30 Thread Sherm Pendley
Steven D'Aprano <[EMAIL PROTECTED]> writes: > On Fri, 30 Sep 2005 18:02:14 -0400, Sherm Pendley wrote: > >> [EMAIL PROTECTED] writes: >> >>> I wonder if his postings are related to the phases of the moon? It >>> might explain a lot. >> >> Yes, it would. Note that the word lunatic is derived from

OT: Phases of the moon [was Re: A Moronicity of Guido van Rossum]

2005-09-30 Thread Steven D'Aprano
On Fri, 30 Sep 2005 18:02:14 -0400, Sherm Pendley wrote: > [EMAIL PROTECTED] writes: > >> I wonder if his postings are related to the phases of the moon? It >> might explain a lot. > > Yes, it would. Note that the word lunatic is derived from the Latin word > luna, meaning moon. Yes, lunatic is

Re: [Info] PEP 308 accepted - new conditional expressions

2005-09-30 Thread Sam
Jaime Wyant writes: On 9/30/05, Sam <[EMAIL PROTECTED]> wrote: Reinhold Birkenfeld writes: > Hi, > > after Guido's pronouncement yesterday, in one of the next versions of Python > there will be a conditional expression with the following syntax: > > X if C else Y > > which is the same as today

Re: Duplicating Modules

2005-09-30 Thread Steven D'Aprano
On Fri, 30 Sep 2005 19:52:56 +0200, Misto . wrote: > There is a way to dumplicate a module ? [snip] > P.S: I know that there is some design Issue here, but my boss says no :) It depends on what you are expecting to do with the duplicated module. If all you need is to access the same module from

Re: A Moronicity of Guido van Rossum

2005-09-30 Thread Tony Meyer
On 30/09/2005, at 10:56 PM, Gerrit Holl wrote: > Tony Meyer wrote: > >> X-Spambayes-Classification: ham; 0.048 >> X-Spambayes-Evidence: '*H*': 0.90; '*S*': 0.00; 'bug.': 0.07; >> 'flagged': 0.07; >> "i'd": 0.08; 'bayes': 0.09; 'from:addr:ihug.co.nz': 0.09; >> 'really,': 0.09; 'cc:no real

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread Mike Meyer
Paul Rubin writes: > Mike Meyer <[EMAIL PROTECTED]> writes: >> So, fool._bar is now clobbered. Nuts, the _bar attribute is broken for >> *every* instance of Fools. According to you, the error must be in >> Fools. Care to point it out? > > Yes, the error is in the "breake

Re: [Info] PEP 308 accepted - new conditional expressions

2005-09-30 Thread Terry Reedy
"Dave Benjamin" <[EMAIL PROTECTED]> > > Hooray! After years of arguing over which syntax to use, and finally > giving up since nobody could agree, I understand that this has become the local 'politically correct' view, but as a participant in the discussion, I know it not true and actively dece

Re: [Info] PEP 308 accepted - new conditional expressions

2005-09-30 Thread Bengt Richter
On Fri, 30 Sep 2005 20:25:35 +0200, Reinhold Birkenfeld <[EMAIL PROTECTED]> wrote: >Fredrik Lundh wrote: >> Reinhold Birkenfeld wrote: >> >>> after Guido's pronouncement yesterday, in one of the next versions of Python >>> there will be a conditional expression with the following syntax: >>> >>>

Re: A Moronicity of Guido van Rossum

2005-09-30 Thread Mike Meyer
Steve Holden <[EMAIL PROTECTED]> writes: > [off-list] > > Peter Hansen wrote: >> Gerrit Holl wrote: >> >>>True. However, most mail to this mailinglist has less than 0.001 spam >>>probability. As you can see, this one had 0.048 - a vast score, almost >>>enough to put it in my unsure box. It seems t

Re: where to post python code?

2005-09-30 Thread Mike Meyer
Alessandro Bottoni <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] wrote: > >> the question it - where should i post the code to? >> It's not big enough to justify a source forge project, nor is it small >> enough to be considered a receipt fit for ASPN's Python Cookbook. > > Maybe "The Vaults of

Re: PEP 350: Codetags

2005-09-30 Thread François Pinard
[Bengt Richter] > The most detailed discussion I could find was > http://hydracen.com/dx/iso8601.htm Also of interest:: http://www.cl.cam.ac.uk/~mgk25/iso-time.html > IMO they [ISO] ought to think of another way to get funded). People have been complaining for decades. ISO seemingly ru

Re: Google Not Universal Panacea

2005-09-30 Thread Mike Meyer
Steve Holden <[EMAIL PROTECTED]> writes: > However, > > >> Are people really too lazy to do elementary research on Google? > > goes a bit too far in imputing motives to the enquirer and overlooking > the fact that there are some very good reasons for *not* using Google. Ok, *what* are the reasons

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread Paul Rubin
Mike Meyer <[EMAIL PROTECTED]> writes: > So, fool._bar is now clobbered. Nuts, the _bar attribute is broken for > *every* instance of Fools. According to you, the error must be in > Fools. Care to point it out? Yes, the error is in the "breaker" function, which leaks the private variable to other

Re: PDF Viewer

2005-09-30 Thread David Boddie
John J. Lee wrote: > Alternatively, if you feel rather adventurous, try compiling KPDF on > Windows with the free Qt3 port(s?) or Qt4, if that's arrived yet. I think you might be slightly too optimistic about getting KPDF to run natively on Windows. The project you mention does have a page descri

Re: Hello gnome-terminal

2005-09-30 Thread Mike Meyer
egbert <[EMAIL PROTECTED]> writes: > When I start the following script in a gnome-terminal: > > #!/usr/bin/env python > import os > print "hello gnome-terminal" > print os.environ["PYTHONPATH"] > > I see the expected results in the same gnome-terminal window. > > However start

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread Mike Meyer
Paul Rubin writes: > OTOH, "private" lets you say 100% for certain that another class > didn't clobber __xyz, and that any bug that clobbered it MUST reside > in the class that declared it. That makes auditing for __xyz-related > errors a lot simpler since you only have

Re: Python profiler

2005-09-30 Thread Stephen Kellett
In message <[EMAIL PROTECTED]>, Celine & Dave <[EMAIL PROTECTED]> writes >I am trying to find a profiler that can measure the >memory usage in a Python program. >I would like to >gather some statistics about object usages. For Python Memory Validator. Apply for beta here: http://www.softw

Re: Zope3 Examples?

2005-09-30 Thread Markus Wankus
Gerhard Häring wrote: > Markus Wankus wrote: >> [...] Thanks for the reply - maybe I'll give it another shot. I'm >> currently demoing Snakelets. Quite a turn in the opposite direction, >> but small and super-easy to get going with. [...] > > I also found Snakelets a pleasure to use and chose

Re: A Moronicity of Guido van Rossum

2005-09-30 Thread dimitri pater
that's lunatic, of course (check spelling is not in my system yet)On 10/1/05, dimitri pater <[EMAIL PROTECTED]> wrote: Yes, it would. Note that the word lunatic is derived from the Latin wordluna, meaning moon. so, he is a just another lunitac barking at the moon? well, err barking at the python

Re: A Moronicity of Guido van Rossum

2005-09-30 Thread dimitri pater
Yes, it would. Note that the word lunatic is derived from the Latin wordluna, meaning moon. so, he is a just another lunitac barking at the moon? well, err barking at the python list... greetz, dimitri -- http://mail.python.org/mailman/listinfo/python-list

add keyword argument to itertools.chain [was Feature Proposal: Sequence .join method]

2005-09-30 Thread David Murmann
Hi again, i wrote a small patch that changes itertools.chain to take a "link" keyword argument. If given, it is iterated between the normal arguments, otherwise the behavior is unchanged. I'd like to hear your opinion on both, the functionality and the actual implementation (as this is one of th

Re: [Info] PEP 308 accepted - new conditional expressions

2005-09-30 Thread Jaime Wyant
On 9/30/05, Sam <[EMAIL PROTECTED]> wrote: > Reinhold Birkenfeld writes: > > > Hi, > > > > after Guido's pronouncement yesterday, in one of the next versions of Python > > there will be a conditional expression with the following syntax: > > > > X if C else Y > > > > which is the same as today's >

Re: [Info] PEP 308 accepted - new conditional expressions

2005-09-30 Thread Ron Adam
Reinhold Birkenfeld wrote: > Rocco Moretti wrote: > >>Reinhold Birkenfeld wrote: >> >>>Hi, >>> >>>after Guido's pronouncement yesterday, in one of the next versions of Python >>>there will be a conditional expression with the following syntax: >>> >>>X if C else Y >> >>Any word on chaining? >> >>

Re: PDF Viewer

2005-09-30 Thread John J. Lee
Pepe Pena <[EMAIL PROTECTED]> writes: > I am new to programming and need some guidance on the development of > the following application. The proposed application will display > two pdf documents simultaneously to be viewed and simple navigation > will be facilitated (i.e. turning pages). > > Fu

Re: [Info] PEP 308 accepted - new conditional expressions

2005-09-30 Thread Sam
Reinhold Birkenfeld writes: Hi, after Guido's pronouncement yesterday, in one of the next versions of Python there will be a conditional expression with the following syntax: X if C else Y which is the same as today's (Y, X)[bool(C)] What's wrong with "C ? X:Y"? Aside from ":" being overl

Re: PEP 350: Codetags

2005-09-30 Thread Bengt Richter
On Fri, 30 Sep 2005 13:27:57 -0400, =?iso-8859-1?Q?Fran=E7ois?= Pinard <[EMAIL PROTECTED]> wrote: >[Tom Anderson] > >> ISO 8601 suggests writing date-and-times like 2005-09-26T12:34:56 - >> using a T as the separator between date and time. I don't really like >> the look of it, but it is a standa

Re: unittest setup

2005-09-30 Thread Kent Johnson
paul kölle wrote: > hi all, > > I noticed that setUp() and tearDown() is run before and after *earch* > test* method in my TestCase subclasses. I'd like to run them *once* for > each TestCase subclass. How do I do that. One way to do this is to make a TestSuite subclass that includes your startup

Re: What encoding is used when initializing sys.argv?

2005-09-30 Thread Neil Hodgson
Petr Prikryl: > ... I have discovered that > I do not understand what encoding should be used > to convert the sys.argv into unicode. Martin mentioned CP_ACP. In Python on Windows, this can be accessed as the "mbcs" codec. import sys print repr(sys.argv[1]) print repr(unicode(sys.argv[1], "

Re: [Info] PEP 308 accepted - new conditional expressions

2005-09-30 Thread Erik Max Francis
Dave Benjamin wrote: > Hooray! After years of arguing over which syntax to use, and finally > giving up since nobody could agree, the Benevolent Dictator did what > only a dictator can do, and just made a damn decision already. > > Thank you, Guido! =) Yes, hear hear. So what made him change

Re: Sybase Python WinXP

2005-09-30 Thread Thorsten Kampe
* len (2005-09-30 18:59 +0100) > Before posting I did search through the newsgroup and saw several > references to people requesting the binaries to the Sybase module. Binaries? > However I did not see in these requests answers as to where they might > be found. > > Could someone please point me

Re: PEP 308 accepted - new conditional expressions

2005-09-30 Thread Carl Banks
Reinhold Birkenfeld wrote: > X if C else Y Oh well. Just about any conditional is better than no conditional. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

Re: What encoding is used when initializing sys.argv?

2005-09-30 Thread Martin v. Löwis
Petr Prikryl wrote: > I know about the rejected attempt to implement > sys.argvu. Still, how the sys.argv is filled? What > encoding is used when parsing the cmd line internally? > To what encoding is it converted when non ASCII > characters appear? Python does not perform any conversion whatsoeve

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread John J. Lee
Steve Holden <[EMAIL PROTECTED]> writes: > Rocco Moretti wrote: [...] > > Right, but like doors that automatically lock when they close, items > > which are there to protect you can be a nusaince, especially when you've > > left your keys on the dining room table. > > That would make a good Onio

Re: RELEASED Python 2.4.2 (final)

2005-09-30 Thread Martin v. Löwis
Trent Mick wrote: > I suppose that is possible. Martin, does python-2.4.2.msi install > python24.dll to the Python install dir for a "per-user" installation? Yes, that is supported. It would be good if Bugs could confirm that he only deleted the wrong python24.dll, with the proper one being insta

Re: New Python chess module

2005-09-30 Thread Dave Hansen
On Sat, 01 Oct 2005 06:27:01 +1000, Tim Churches <[EMAIL PROTECTED]> wrote: >Will McGugan wrote: >> There is a new version if anyone is interested... >> >> http://www.willmcgugan.com/chess.py >> >> It contains optimizations and bugfixes. >> >> Can anyone suggest a name for this module? pyChess

Re: MS Word mail merge automation

2005-09-30 Thread [EMAIL PROTECTED]
Steve M wrote: > I'm trying to do invoke the mail merge functionality of MS Word from a > Python script. The situation is that I have a template Word document, > and a record that I've generated in Python, and I want to output a new > Word .doc file with the template filled in with the record I've

Re: Python <=> Excel question

2005-09-30 Thread riplin
> Suppose abc.xls has sheets a, b, c. > How can I find, in Python, the sheet names? > Given a sheet name, how can I export the sheet as a csv file? http://chicago.sourceforge.net/xlhtml/ This has options to output csv files, the list of sheets and many other things. Just execute this on the .xls

Re: A Moronicity of Guido van Rossum

2005-09-30 Thread Sherm Pendley
[EMAIL PROTECTED] writes: > I wonder if his postings are related to the phases of the moon? It > might explain a lot. Yes, it would. Note that the word lunatic is derived from the Latin word luna, meaning moon. sherm-- -- Cocoa programming in Perl: http://camelbones.sourceforge.net Hire me! My

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread Paul Rubin
Rocco Moretti <[EMAIL PROTECTED]> writes: > There is little in the way of technical problems that are solved by > language level enforcement of private variables. The issues in > question are mostly social ones, and if you're not reading and > following the documented interface, stopping private va

Re: Where to find python c-sources

2005-09-30 Thread Paul Boddie
John J. Lee wrote: > How odd -- the most useful link (the viewcvs page for this source > file) is the very first link for me when I search for socketmodule.c > > Does google vary in its results across the globe? Actually, yes, although in this case the top result is the same for both google.no (wh

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread Paul Rubin
Steve Holden <[EMAIL PROTECTED]> writes: > That would make a good Onion (www.TheOnion.com) headline: "Users > Discover Computer Security Conflicts with Desire for Convenience" +1 QOTW -- http://mail.python.org/mailman/listinfo/python-list

Re: Opinion on Pyrex

2005-09-30 Thread Don
Carl wrote: > I have recently started to use Pyrex and am amazed by it's useability. > > Are there any alternatives to Pyrex? > > One thing that I haven't figured out is how to embed pure C/C++ source > code into Pyrex. For example, if you have a bunch of C files that you want > to use together

Python profiler

2005-09-30 Thread Celine & Dave
Hello All, I am trying to find a profiler that can measure the memory usage in a Python program. I would like to gather some statistics about object usages. For example, I would like to be able to see how much time it takes to search for an item in a dict object, how many times it has to access th

Re: A Moronicity of Guido van Rossum

2005-09-30 Thread John J. Lee
Steve Holden <[EMAIL PROTECTED]> writes: > I'm responding off-list No you're not! Sorry if I missed some subtle joke here... John -- http://mail.python.org/mailman/listinfo/python-list

Re: Where to find python c-sources

2005-09-30 Thread John J. Lee
"Tor Erik Sønvisen" <[EMAIL PROTECTED]> writes: > "Erik Max Francis" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Tor Erik S�nvisen wrote: > > > >> I need to browse the socket-module source-code. I believe it's contained > >> in the file socketmodule.c, but I can't locate th

Re: xml2schema

2005-09-30 Thread uche . ogbuji
""" Er, do you mean to generate a Relax NG (or possibly a DTD in fact) from some XML file?? If you do mean this then just think of that how you could generate grammar from some paragraphs of English text... Sorta non-trivial, if possible at all, isn't it? :-) """ Very well put. However, for REL

MS Word mail merge automation

2005-09-30 Thread Steve M
I'm trying to do invoke the mail merge functionality of MS Word from a Python script. The situation is that I have a template Word document, and a record that I've generated in Python, and I want to output a new Word .doc file with the template filled in with the record I've generated. (To refresh

Re: [Info] PEP 308 accepted - new conditional expressions

2005-09-30 Thread Reinhold Birkenfeld
Rocco Moretti wrote: > Reinhold Birkenfeld wrote: >> Hi, >> >> after Guido's pronouncement yesterday, in one of the next versions of Python >> there will be a conditional expression with the following syntax: >> >> X if C else Y > > Any word on chaining? > > That is, what would happen with the

Re: A Moronicity of Guido van Rossum

2005-09-30 Thread Pietro Campesato
Jorge Godoy wrote: > His intent was never to convince people or pass information. On comp.lang.lisp Xah Lee is a well known troll... don't feed him :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Opinion on Pyrex

2005-09-30 Thread Lisandro Dalcin
That's the reason I am using SWIG http://www.swig.org For C++ classes, you can get a working Python module autmatically. It also has advanced features, like "directors", enablig subclassing from Python (to be used in de C++ side). However, I should warn you SWIG is not as friendly as Pyrex. But

Re: Google Not Universal Panacea [was: Re: Where to find python c-sources]

2005-09-30 Thread Erik Max Francis
Steve Holden wrote: > While a snappish "go and look it up on Google" might suffice for a > mouthy apprentice who's just asked their thirteenth question in the last > half hour, it's (shall we say) a little on the brusque side for someone > who only appears on the group last February, and has a

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread Jules Dubois
On Friday 30 September 2005 01:58, Paul Rubin (<[EMAIL PROTECTED]>) wrote: > Steve Holden <[EMAIL PROTECTED]> writes: >> Good grief, the ultimate choice is to use Python because you like it, >> or not to use it because you don't. Enough with the picking every >> availabl

Re: [Info] PEP 308 accepted - new conditional expressions

2005-09-30 Thread Dave Benjamin
Reinhold Birkenfeld wrote: > after Guido's pronouncement yesterday, in one of the next versions of Python > there will be a conditional expression with the following syntax: > > X if C else Y Hooray! After years of arguing over which syntax to use, and finally giving up since nobody could agree,

Re: Python 3! Finally!

2005-09-30 Thread Dan Sommers
On Fri, 30 Sep 2005 20:50:06 +0200, Stefan Behnel <[EMAIL PROTECTED]> wrote: > Hi! > I just firefoxed to Python.org and clicked on the bz2 link at > http://python.org/2.4.2/ and what did I get? > Python-3.4.2.tar.bz2 !! > Python 3 - what we've all been waiting for, finally, it's there! > Weird,

Re: Duplicating Modules

2005-09-30 Thread Dave Benjamin
Misto . wrote: > Hi folks! > > Short: > > There is a way to dumplicate a module ? Here's one way... it doesn't quite work with modules inside of packages, unfortunately, but it does avoid defeating module caching and tries to keep sys.modules in a predictable state. I don't know what the thre

Re: New Python chess module

2005-09-30 Thread Tim Churches
Will McGugan wrote: > There is a new version if anyone is interested... > > http://www.willmcgugan.com/chess.py > > It contains optimizations and bugfixes. > > Can anyone suggest a name for this module? pyChess is already taken... Pyawn??? Tim C -- http://mail.python.org/mailman/listinfo/pyt

Re: A Moronicity of Guido van Rossum

2005-09-30 Thread Anonymous Coward
[EMAIL PROTECTED] wrote: > In comp.lang.perl.misc Kalle Anke <[EMAIL PROTECTED]> wrote: > >>On Thu, 29 Sep 2005 19:44:28 +0200, Matt wrote >>(in article <[EMAIL PROTECTED]>): > > > >>>OK... your post seems to indicate a belief that everyone else is >>>somehow incompetent. Sounds a bit like the

Re: 'ascii' codec can't encode character u'\u2013'

2005-09-30 Thread John J. Lee
deelan <[EMAIL PROTECTED]> writes: [...] > query = "UPDATE blogs_news SET text = %s WHERE id=%s" > cursor.execute(query, (text_extrated, id)) > > so mysqldb will take care to quote text_extrated automatically. this > may not not your problem, but it's considered "good style" when dealing > with db

Re: Overloading __init__ & Function overloading

2005-09-30 Thread John J. Lee
Paul Rubin <"http://phr.cx"@NOSPAM.invalid> writes: > "Iyer, Prasad C" <[EMAIL PROTECTED]> writes: > > But I want to do something like this > > > > class BaseClass: > > def __init__(self): > > # Some code over here > > def __init__(self, a, b): > > # Some code over

Re: Sybase Python WinXP

2005-09-30 Thread len
Thanks I will do that. Len Sumnler -- http://mail.python.org/mailman/listinfo/python-list

Re: [Info] PEP 308 accepted - new conditional expressions

2005-09-30 Thread Rocco Moretti
Reinhold Birkenfeld wrote: > Hi, > > after Guido's pronouncement yesterday, in one of the next versions of Python > there will be a conditional expression with the following syntax: > > X if C else Y Any word on chaining? That is, what would happen with the following constructs: A if B else C

Re: Opinion on Pyrex

2005-09-30 Thread Robert Kern
Carl wrote: > I have recently started to use Pyrex and am amazed by it's useability. > > Are there any alternatives to Pyrex? > > One thing that I haven't figured out is how to embed pure C/C++ source code > into Pyrex. For example, if you have a bunch of C files that you want to > use together

Re: Opinion on Pyrex

2005-09-30 Thread George Sakkis
"Carl" <[EMAIL PROTECTED]> wrote: > I have recently started to use Pyrex and am amazed by it's useability. > > Are there any alternatives to Pyrex? > > One thing that I haven't figured out is how to embed pure C/C++ source code > into Pyrex. For example, if you have a bunch of C files that you wan

Re: where to post python code?

2005-09-30 Thread Ido . Yehieli
thanks, decided to post it to the python cheese shop over python.org instead. damn, that site is _slow_ today... -- http://mail.python.org/mailman/listinfo/python-list

Re: Sybase Python WinXP

2005-09-30 Thread Larry Bates
You can use ODBC interface to the database. Sybase should ship with ODBC drivers. Just create a DSN and use odbc and dbi modules. Larry Bates len wrote: > Before posting I did search through the newsgroup and saw several > references to people requesting the binaries to the Sybase module. > Ho

Python 3! Finally!

2005-09-30 Thread Stefan Behnel
Hi! I just firefoxed to Python.org and clicked on the bz2 link at http://python.org/2.4.2/ and what did I get? Python-3.4.2.tar.bz2 !! Python 3 - what we've all been waiting for, finally, it's there! Weird, though, the md5sum is the same as for the Python-2.4.2.tar.bz2 that I downloaded late (l

Re: ASCII

2005-09-30 Thread Tuvas
Thanks alot! -- http://mail.python.org/mailman/listinfo/python-list

Re: Parser suggestion

2005-09-30 Thread François Pinard
[Jorge Godoy] > You're someone [...] You make me shy! :-) Nevertheless, thanks for the appreciation! :-) > > > It looks like it stopped being developed circa 2002... > How can I be sure that if I find a bug I'll be able to discuss it with > the developer if it's 3 years since the last release

Re: Duplicating Modules

2005-09-30 Thread Peter Otten
kimes wrote: > Why don't you do like this.. > > import module > import mudule as module2 >>> import module as a >>> import module as b >>> b is a True You have to remove the module from the cache before the second import: >>> import sys >>> import module as a >>> del sys.modules["module"] >>>

Re: ASCII

2005-09-30 Thread Steve Horsley
Tuvas wrote: > Is there a function that will take a char. and return the ascii value? > Thanks! > >>> print ord('A') 65 >>> Steve -- http://mail.python.org/mailman/listinfo/python-list

Re: 2.4.2 compilation

2005-09-30 Thread Reinhold Birkenfeld
pnm wrote: > I have a standard Debian x86 system with Python 2.4.1 (compiled from > source). Attempts to compile 2.4.2 fail with references to Unicode -- > is there a basic system library that's missing? > > ++ output from make: > libpython2.4.a(funcobject.o)(.text+0x96): In function `PyFuncti

Re: ASCII

2005-09-30 Thread Will McGugan
Tuvas wrote: > Is there a function that will take a char. and return the ascii value? > Thanks! > ord Will McGugan -- http://www.willmcgugan.com "".join({'*':'@','^':'.'}.get(c,0) or chr(97+(ord(c)-84)%26) for c in "jvyy*jvyyzpthtna^pbz") -- http://mail.python.org/mailman/listinfo/python-lis

Re: [Info] PEP 308 accepted - new conditional expressions

2005-09-30 Thread Reinhold Birkenfeld
Fredrik Lundh wrote: > Reinhold Birkenfeld wrote: > >> after Guido's pronouncement yesterday, in one of the next versions of Python >> there will be a conditional expression with the following syntax: >> >> X if C else Y >> >> which is the same as today's >> >> (Y, X)[bool(C)] > > hopefully, only

ASCII

2005-09-30 Thread Tuvas
Is there a function that will take a char. and return the ascii value? Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: New Python chess module

2005-09-30 Thread Will McGugan
There is a new version if anyone is interested... http://www.willmcgugan.com/chess.py It contains optimizations and bugfixes. Can anyone suggest a name for this module? pyChess is already taken... Will McGugan -- http://www.willmcgugan.com "".join({'*':'@','^':'.'}.get(c,0) or chr(97+(ord(c)-

Re: Duplicating Modules

2005-09-30 Thread kimes
Why don't you do like this.. import module import mudule as module2 -- http://mail.python.org/mailman/listinfo/python-list

Sybase Python WinXP

2005-09-30 Thread len
Before posting I did search through the newsgroup and saw several references to people requesting the binaries to the Sybase module. However I did not see in these requests answers as to where they might be found. Could someone please point me to them (if they exist). I do not have a C compiler a

Re: A Moronicity of Guido van Rossum

2005-09-30 Thread axel
In comp.lang.perl.misc Kalle Anke <[EMAIL PROTECTED]> wrote: > On Thu, 29 Sep 2005 19:44:28 +0200, Matt wrote > (in article <[EMAIL PROTECTED]>): >> OK... your post seems to indicate a belief that everyone else is >> somehow incompetent. Sounds a bit like the "I am sane, it is everyone >> else wh

Re: A Moronicity of Guido van Rossum

2005-09-30 Thread Kalle Anke
On Thu, 29 Sep 2005 19:44:28 +0200, Matt wrote (in article <[EMAIL PROTECTED]>): > OK... your post seems to indicate a belief that everyone else is > somehow incompetent. Sounds a bit like the "I am sane, it is everyone > else who is crazy" concept. Can you suggest a technology or > technologist w

Duplicating Modules

2005-09-30 Thread Misto .
Hi folks! Short: There is a way to dumplicate a module ? I tried copy.deepcopy(module) but hangs with an error (also with standard modules ). The only solution that I have by now is creating two files and importing them. I.E: > cp module.py module1.py >> import module >> import module1 Any

Re: what does 0 mean in MyApp(0)

2005-09-30 Thread Alex
Thanks for the replies. It seems that I have three options 1. app=MyApp() 2. app=MyApp(0) 3. app=MyApp('myfile.txt') 1. In the first case the output stream will be set to stdout/stderr, which means that errors will be sent to a window which will be closed when the app crashes. 2. In the second cas

2.4.2 compilation

2005-09-30 Thread pnm
I have a standard Debian x86 system with Python 2.4.1 (compiled from source). Attempts to compile 2.4.2 fail with references to Unicode -- is there a basic system library that's missing? ++ output from make: libpython2.4.a(funcobject.o)(.text+0x96): In function `PyFunction_New': Objects/funcob

Re: PEP 350: Codetags

2005-09-30 Thread François Pinard
[Tom Anderson] > ISO 8601 suggests writing date-and-times like 2005-09-26T12:34:56 - > using a T as the separator between date and time. I don't really like > the look of it, but it is a standard, so i'd suggest using it. ISO 8601 suggests a few alternate writings, and the ``T`` you mention is fo

Re: Feature Proposal: Sequence .join method

2005-09-30 Thread David Murmann
Michael Spencer wrote: > Terry Reedy wrote: >> "David Murmann" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >> def join(sep, seq): return reduce(lambda x, y: x + sep + y, seq, type(sep)()) >>> >>> damn, i wanted too much. Proper implementation: >>> >>> def join(sep,

Re: RELEASED Python 2.4.2 (final)

2005-09-30 Thread Trent Mick
[Fuzzyman wrote] > I had problems updating from activestate 2.4 to activestate 2.4.1 > > I think it was caused by not uninstalling the original. This does mean > that even a *minor* version upgrade is a PITA. To do it cleanly all > extension modules have to be uninstalled and re-installed. > > *s

Re: RELEASED Python 2.4.2 (final)

2005-09-30 Thread Trent Mick
[Peter Hansen wrote] > Couldn't it also happen if the first time someone did an "admin" install > which (I believe) puts the DLLs in the system folder, and the next time > did just a non-admin install which doesn't do that? (Or am I > misunderstanding the conditions under which c:\windows\syste

Re: Feature Proposal: Sequence .join method

2005-09-30 Thread Jp Calderone
On Fri, 30 Sep 2005 09:38:25 -0700, Michael Spencer <[EMAIL PROTECTED]> wrote: >Terry Reedy wrote: >> "David Murmann" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >> def join(sep, seq): return reduce(lambda x, y: x + sep + y, seq, type(sep)()) >>> >>>damn, i wanted too

Re: PyWin SendMessage

2005-09-30 Thread g.franzkowiak
Gonzalo Monzón schrieb: > g.franzkowiak escribió: > >> Thomas Heller schrieb: >> >> >>> "g.franzkowiak" <[EMAIL PROTECTED]> writes: >>> >>> >>> >>> Thomas Heller schrieb: > "g.franzkowiak" <[EMAIL PROTECTED]> writes: > > > > > >> Hel

  1   2   3   >