Re: Wheel-reinvention with Python

2005-07-31 Thread Paul Rubin
Torsten Bronger <[EMAIL PROTECTED]> writes: > > No it's not on Fedora, at least FC3. > > It may not be on a DVD but the RPMs are avaiable where Fedora should > look for them. > > > I had huge trouble trying to build it and gave up. > > It's perfectly okay if you are used to build everything your

Re: Wheel-reinvention with Python

2005-07-31 Thread Torsten Bronger
Hallöchen! Cliff Wells <[EMAIL PROTECTED]> writes: > On Sun, 2005-07-31 at 23:46 +0200, Torsten Bronger wrote: > >> Cliff Wells <[EMAIL PROTECTED]> writes: >> >>> [...] >>> >>> Well, I think this exposes one of the more interesting sides of >>> open source software in general. For better or wor

Re: Wheel-reinvention with Python

2005-07-31 Thread Torsten Bronger
Hallöchen! Paul Rubin writes: > Torsten Bronger <[EMAIL PROTECTED]> writes: > >> I can't really understand your hostility towards non-Tkinter >> toolkits. In the case of wxPython, it's part of SUSE, which is >> probably also true for Fedora and Mandriva. Installing is

Re: [path-PEP] Path inherits from basestring again

2005-07-31 Thread phil hunt
On Sun, 31 Jul 2005 09:48:45 +0200, Reinhold Birkenfeld <[EMAIL PROTECTED]> wrote: >> >> An improvement to what? To how the class is implemented, or to how >> it is used? > >No, the second function is cleaner and more readable than the first, >IMHO. True, but the first function, at all of seven

Re: Wheel-reinvention with Python

2005-07-31 Thread phil hunt
On Sun, 31 Jul 2005 02:23:39 -0700, Robert Kern <[EMAIL PROTECTED]> wrote: >phil hunt wrote: > >> OK, hows this for an idea: >> >> 1. create a new API, loosely based on the Tkinter API, but more >> Pythonic >> >> 2. implement Tk using this API (probably won't be difficult because >> we can use

Re: keylogger in Python

2005-07-31 Thread Bengt Richter
On Sat, 30 Jul 2005 18:21:09 GMT, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: >On 30 Jul 2005 01:11:32 -0700, "Jay" <[EMAIL PROTECTED]> declaimed the >following in comp.lang.python: > >> ok, i thought for 2 seconds i might have created a Keylogger in python > [...] > > Doing key logging is

Re: Enumerate registered codecs

2005-07-31 Thread Martin v. Löwis
Paul Watson wrote: > The primary identifier and a descriptive string (localized) need to be > available at a minimum. Having aliases would be a plus. You will have to implement your own list. Getting the well-known aliases is possible through encodings.aliases, but a localized descriptive string

Re: rfc822 module bug?

2005-07-31 Thread Tim Roberts
Nemesis <[EMAIL PROTECTED]> wrote: > >Hi all, >I found that the function parsedate_tz of the rfc822 module has a bug >(or at least I think so). >I found a usenet article (message-id: <[EMAIL PROTECTED]>) >that has this Date field: > >Date: Tue,26 Jul 2005 13:14:27 GMT +0200 > >It seems to be correc

Re: Comparison of functions

2005-07-31 Thread Dan Bishop
Steven D'Aprano wrote: > On Sat, 30 Jul 2005 16:43:00 +, Adriano Varoli Piazza wrote: > > > If you want to treat numbers as strings, why not convert them before > > sorting them? > > Because that changes the object and throws away information. I think he meant doing something like ->>> lst =

Standards not standard

2005-07-31 Thread Dark Cowherd
Hi, Multiple threads running currently about reinventing the wheel, Multiple GUI's etc. Being able to write a usable GUI is key task for all programmers today - read. ESR's http://www.catb.org/~esr/writings/cups-horror.html And look at ESR's reason to come over to Python - he wanted to write a GUI

Re: python-dev summary for 2005-07-01 to 2005-07-15

2005-07-31 Thread Raymond Hettinger
> This is the seventh summary written by the python-dev summary cabal of > Steve Bethard, Tim Lesher, and Tony Meyer. Thanks guys. The work is excellent and appreciated. Raymond -- http://mail.python.org/mailman/listinfo/python-list

Re: namespaces

2005-07-31 Thread Paul Rubin
Steven D'Aprano <[EMAIL PROTECTED]> writes: > Most languages can create self-modifying code. That's not the > question. The question is whether developers should write > self-modifying code, not whether language designers should prohibit it. There was no self-modifying code in that closure example

Re: Determining method type given its string name presentation and itscorresponding object reference.

2005-07-31 Thread Apple
"or perhaps callable(getattr(obj, strg, None)) if the need is related to an unknown string which may be a callable attribute of an object whose class is unknown ..." Hm.. the problem is I cannot call getattr() at all. Because getattr() will call my __repr__() which will call another m() that will

Re: keylogger in Python

2005-07-31 Thread Premshree Pillai
On 30 Jul 2005 01:11:32 -0700, Jay <[EMAIL PROTECTED]> wrote: > ok, i thought for 2 seconds i might have created a Keylogger in python > keylogging = keylogger() > keylog = open("keylog2.log", "w") > text = raw_input() > > keylog.write(text) > keylog.close > keylog = open("keylog2.log", "r") > key

Re: namespaces

2005-07-31 Thread Steven D'Aprano
Rob Williscroft wrote: > Steven D'Aprano wrote in > news:[EMAIL PROTECTED] in > comp.lang.python: > > >>Quoting Rob Williscroft: >> >> >>> > def translate( text ) >>> > import string all=string.maketrans('','') >>> > badcars=all.translate(all,string.letters+string.digits) >>> >

Re: Printing Docstrings Without Importing

2005-07-31 Thread Bengt Richter
On 30 Jul 2005 11:08:29 -0700, "Kamilche" <[EMAIL PROTECTED]> wrote: >I have a large project that is getting complex, and I would like to >print the docstrings without importing the modules. The only Python >utility I could find references is apparently defunct and hasn't been >updated in 4 years.

Re: Thaughts from an (almost) Lurker.

2005-07-31 Thread Nigel Rowe
Benji York wrote: > Paddy wrote: >> Sometimes when reading c.l.p. I mentally stand off from what I have >> been reading and get an odd feeling that 'WE ARE BEING TESTED'. That >> someone else is purposefully posting a near repetitive post, or obvious >> flame bait etc - not for the usual reasons,

Re: Enumerate registered codecs

2005-07-31 Thread Paul Watson
John Machin wrote: > Paul Watson wrote: > >> I see the list of standard encodings in Python 2.4.1 documentation >> section 4.9.2. >> >> Is there a method to enumerate the registered codecs at runtime? > > This has been asked before, within the last couple of months AFAIR. Use > Google to search

Re: Determining method type given its string name presentation and itscorresponding object reference.

2005-07-31 Thread John Machin
Terry Reedy wrote: > "Apple" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>Hi I am a bit new to python. I was wondering if there is a way to >>determine whether or not a given string is a member method of a given >>object: > > > Does callable(cls.attr) fit your needs? > o

Re: Wheel-reinvention with Python

2005-07-31 Thread Paul Rubin
Ed Leafe <[EMAIL PROTECTED]> writes: > > I can put up a Tk gui in about 5 lines of code from a stock Python > > distro without having to install anything additional.  How do I do > > that with wxPython? > > import dabo > app = dabo.dApp() > dApp.start() > > Sorry, I couldn't do it in 5. ;-) Oh

Re: Wheel-reinvention with Python

2005-07-31 Thread Paul Rubin
Cliff Wells <[EMAIL PROTECTED]> writes: > > If it's for sensitive stuff normally you'd use https. > > Hm, I haven't tried piping X over https... I wasn't even aware it was > possible... do you have a link I can check this out on? I meant https for web interfaces. For other protocols it's simples

Re: Wheel-reinvention with Python

2005-07-31 Thread Paul Rubin
Ed Leafe <[EMAIL PROTECTED]> writes: > Because Tkinter looked like crap on OS X. Yes, it's cross-platform, it looks like crap everywhere ;-). > There are step-by-step instructions on the wxPython site for building it If I need step by step instructions beyond ./configure make make inst

Re: Dabo in 30 seconds?

2005-07-31 Thread Paul Rubin
Cliff Wells <[EMAIL PROTECTED]> writes: > > That's sort of interesting. I think I downloaded whatever was on > > wxpython.org. > > Usually there will be a link to a couple different builds on > wxpython.org. I can see where it would be pretty easy to grab the wrong > one. IIRC the problem I had

Re: subclassing list

2005-07-31 Thread Robert Kern
spike grobstein wrote: >>You also need to post the code that raises the error, or no one else can > > debug it. > > sorry, I thought I had pasted that line in there, but I guess I missed > it. Here's the full code (after modifying it slightly based on your > post): > > #! /usr/bin/env python >

Re: Determining method type given its string name presentation and itscorresponding object reference.

2005-07-31 Thread Terry Reedy
"Apple" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi I am a bit new to python. I was wondering if there is a way to > determine whether or not a given string is a member method of a given > object: Does callable(cls.attr) fit your needs? Terry J. Reedy -- http://mail.py

Re: subclassing list

2005-07-31 Thread spike grobstein
>You also need to post the code that raises the error, or no one else can debug it. sorry, I thought I had pasted that line in there, but I guess I missed it. Here's the full code (after modifying it slightly based on your post): #! /usr/bin/env python def circular_list(list): def __getitem_

RE: [path-PEP] Path inherits from basestring again

2005-07-31 Thread Delaney, Timothy (Tim)
I have to say, the examples of using / don't really suggest path concatenation to me. However, I think the problem is the use of whitespace. Specifically:: path = Path() subdir = "subdir" f = "filname" path = path / subdir / f looks more like division (even with the obvious name

Re: Thaughts from an (almost) Lurker.

2005-07-31 Thread Benji York
Paddy wrote: > Sometimes when reading c.l.p. I mentally stand off from what I have > been reading and get an odd feeling that 'WE ARE BEING TESTED'. That > someone else is purposefully posting a near repetitive post, or obvious > flame bait etc - not for the usual reasons, but to track the dynamic

Re: Escaping certain characters

2005-07-31 Thread Robert Kern
Jan Danielsson wrote: > Robert Kern wrote: > [---] > >>> I need to escape '\n', '"', '[' and ']'. I finally went with a few of >>>these: >>>string.replace('\n', '\\n') >>>string.replace('"', '\\"') >>>... >>> >>> I assume that's good enough, but I somehow expected there to exist >>>some form o

RE: [path-PEP] Path inherits from basestring again

2005-07-31 Thread Tony Meyer
> Above all, nobody can tell me that there's any programmer who > doesn't instantly recognize '/' as a directory separator. There is a programmer who doesn't instantly recognise '/' as a directory separator. I teach programming. The above is true. I think that the statement "any programmer wou

Re: Wheel-reinvention with Python

2005-07-31 Thread Ed Leafe
On Sunday 31 July 2005 19:38, Paul Rubin wrote: > I can put up a Tk gui in about 5 lines of code from a stock Python > distro without having to install anything additional.  How do I do > that with wxPython? import dabo app = dabo.dApp() dApp.start() Sorry, I couldn't do it in 5. ;-) Oh, and

RE: [path-PEP] Path inherits from basestring again

2005-07-31 Thread Tony Meyer
> While people are loathe to admit it, many stereotypes have > some basis in fact. The problem is when people extend that to generalize > about others (especially in a negative way). The intent was to use the basis-in-fact stereotype without having to explain in detail the factual basis, which

Re: Comparison of functions

2005-07-31 Thread Rocco Moretti
Adriano Varoli Piazza wrote: > As far as I recall from Math Analysis, which I studied two months ago, > you can't sort complex numbers. It makes no sense. The reason being > (reading from my book), it's not possible to define an order that > preserves the properties of arithmetical operations o

RE: [path-PEP] Path inherits from basestring again

2005-07-31 Thread Tony Meyer
>> I agree. It's yuck. > > So don't use it. If it were that simple, I wouldn't have bothered bringing it up. I really do believe this is a case of "There should be one-- and preferably only one --obvious way to do it" (as well as "Explicit is better than implicit" and "Readability counts"). If

Re: Wheel-reinvention with Python

2005-07-31 Thread Ed Leafe
On Sunday 31 July 2005 15:48, Kay Schluehr wrote: > Ed promised to support many GUI toolkits I promised nothing of the sort. I said that we had designed our UI layer to be toolkit-agnostic, with the design goal of making choice of UI toolkit irrelevant. I also said that we recognize the sheer

Re: Wheel-reinvention with Python

2005-07-31 Thread Cliff Wells
On Sun, 2005-07-31 at 17:45 -0700, Paul Rubin wrote: > Cliff Wells <[EMAIL PROTECTED]> writes: > > > The usual way to do that is with a web GUI, but nothing stops you from > > > running Tkinter on a Unix server through a remote X connection. > > > > Of course not, but unless the servers are on a t

Re: Escaping certain characters

2005-07-31 Thread Jan Danielsson
Robert Kern wrote: [---] >>I need to escape '\n', '"', '[' and ']'. I finally went with a few of >> these: >> string.replace('\n', '\\n') >> string.replace('"', '\\"') >> ... >> >>I assume that's good enough, but I somehow expected there to exist >> some form of "insert your conversion tabl

Re: Wheel-reinvention with Python

2005-07-31 Thread Ed Leafe
On Sunday 31 July 2005 13:07, Kay Schluehr wrote: > My objection with wrappers around wrappers around wrappers is that I > have no hope ever watching the ground. If some error occurs, which > layer has to be addressed? Which developing group is reponsible? My own > or that of team A, team B, team

RE: [path-PEP] Path inherits from basestring again

2005-07-31 Thread Tony Meyer
> Is classic Macintosh OS still supported on Python? No. At least, AFAIK, there is no intent to produce packages of new Python versions for Mac pre OS X. Old versions of Python still work, of course, but whatever version of Path makes it into Python (if any) is extremely unlikely to be supported

Re: Wheel-reinvention with Python

2005-07-31 Thread Cliff Wells
On Sun, 2005-07-31 at 16:38 -0700, Paul Rubin wrote: > Cliff Wells <[EMAIL PROTECTED]> writes: > > The bottom line is this: some people like Tk, some wxPython. Each has > > advantages and disadvantages. But to claim that you *can only* do > > something in one or the other only demonstrates that

RE: [path-PEP] Path inherits from basestring again

2005-07-31 Thread Tony Meyer
> Yes, I read and understood it. Saying "Don't read this if > you don't want to be offended" doesn't make an offensive > statement inoffensive. No, but it makes complaining that it was offensive pointless. > I grant that Python is much easier to learn than other > programming languages; stude

Re: Wheel-reinvention with Python

2005-07-31 Thread Ed Leafe
On Sunday 31 July 2005 19:51, André Roberge wrote: > On a somewhat unrelated note: is there any "overlap"/"possibility of > collaboration" between Dabo-UI and Wax?  (I have use neither, sticking > to pure wxPython so far.) I've contacted Hans and we've discussed the possibility, but he didn't se

Re: Wheel-reinvention with Python

2005-07-31 Thread Ed Leafe
On Sunday 31 July 2005 12:03, Paul Rubin wrote: > How on earth did you decide that, since tkinter actually runs out of > the box when you install Python on most platforms, and wxPython doesn't? Because Tkinter looked like crap on OS X. Sorry, but it's hard to sell an application that looks bad.

Re: Wheel-reinvention with Python

2005-07-31 Thread Paul Rubin
Cliff Wells <[EMAIL PROTECTED]> writes: > > The usual way to do that is with a web GUI, but nothing stops you from > > running Tkinter on a Unix server through a remote X connection. > > Of course not, but unless the servers are on a trusted network and use > an authentication scheme such as kerbe

Re: Dabo in 30 seconds?

2005-07-31 Thread Cliff Wells
On Sun, 2005-07-31 at 17:16 -0700, Paul Rubin wrote: > Cliff Wells <[EMAIL PROTECTED]> writes: > > > It did last time I tried installing it, which was maybe 3-6 months ago. > > > Someone posted that it had been updated recently. > > > > Looking on SourceForge, I see that 2.4.2.4 had GTK2 builds an

Re: Wheel-reinvention with Python

2005-07-31 Thread Cliff Wells
On Sun, 2005-07-31 at 16:57 -0700, Paul Rubin wrote: > Cliff Wells <[EMAIL PROTECTED]> writes: > > > And what do I use to bundle my application for Unix? Most of the > > > things I build get installed on Unix servers. > > > > You install GUI apps on Unix *servers*? > > The usual way to do that

Re: Dabo in 30 seconds?

2005-07-31 Thread James Stroud
On Sunday 31 July 2005 05:14 pm, Robert Kern wrote: > You can't blame Dabo for this one. Your wxPython install is broken. Yes, but my Tkinter install works just fine. -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/

Re: Dabo in 30 seconds?

2005-07-31 Thread Paul Rubin
Cliff Wells <[EMAIL PROTECTED]> writes: > > It did last time I tried installing it, which was maybe 3-6 months ago. > > Someone posted that it had been updated recently. > > Looking on SourceForge, I see that 2.4.2.4 had GTK2 builds and it's > dated 2003-10-01. That's sort of interesting. I thi

Re: subclassing list

2005-07-31 Thread John Machin
spike wrote: > I've googled like crazy and can't seem to find an answer to why this > isn't working. > > I want to create a custom list class that acts as a circular list. > > ie: my_list = (0, 1, 2) Perhaps you mean [0, 1, 2] > > how I want it to behave: > > my_list[0] -> 0 > my_list[1] -> 1

Re: Dabo in 30 seconds?

2005-07-31 Thread Robert Kern
James Stroud wrote: > "/data10/users/jstroud/Programs/lib/python2.3/site-packages/wx-2.6-gtk2-ansi/wx/py/editwindow.py", > > line 8, in ? > from wx import stc > File > "/data10/users/jstroud/Programs/lib/python2.3/site-packages/wx-2.6-gtk2-ansi/wx/stc.py", > > line 10, in ? > import

Re: Dabo in 30 seconds?

2005-07-31 Thread James Stroud
OK. I am open to new things and I am definitely open to being wrong. So lets try dabo (results below--how did I know this would happen?). This demonstration is not to pick on the dabo people (I'm sure they mean well), but to give an idea of what I face EVERY time I try to install some new, grea

Re: Dabo in 30 seconds?

2005-07-31 Thread Cliff Wells
On Sun, 2005-07-31 at 16:22 -0700, Paul Rubin wrote: > Cliff Wells <[EMAIL PROTECTED]> writes: > > wxWidgets/wxPython hasn't required GTK 1.x in quite a long time. Please > > get your facts straight. > > It did last time I tried installing it, which was maybe 3-6 months ago. > Someone posted that

Re: Wheel-reinvention with Python

2005-07-31 Thread Paul Rubin
Mike Meyer <[EMAIL PROTECTED]> writes: > I think you're the first person I've heard call IDLE an IDE. Then > again, I don't pay much attention to it. I use IDLE all the time and it wouldn't have occurred to me that it's something other than an IDE. It's not very good, but that's a different matte

Re: Wheel-reinvention with Python

2005-07-31 Thread Paul Rubin
Cliff Wells <[EMAIL PROTECTED]> writes: > > And what do I use to bundle my application for Unix? Most of the > > things I build get installed on Unix servers. > > You install GUI apps on Unix *servers*? The usual way to do that is with a web GUI, but nothing stops you from running Tkinter on a

Re: Wheel-reinvention with Python

2005-07-31 Thread Cliff Wells
On Sun, 2005-07-31 at 16:23 -0700, Paul Rubin wrote: > Torsten Bronger <[EMAIL PROTECTED]> writes: > > I can't really understand your hostility towards non-Tkinter > > toolkits. In the case of wxPython, it's part of SUSE, which is > > probably also true for Fedora and Mandriva. Installing is as e

Re: Wheel-reinvention with Python

2005-07-31 Thread André Roberge
Paul McNett wrote: [snip] >>Terry Hancock <[EMAIL PROTECTED]> writes: > >>>I know I'm diving into this conversation late, and I haven't read >>>the whole thread, but has someone yet mentioned the "anygui" >>>project? This has stalled, but it was IMHO a good idea. Well, it appears to be more than

Determining method type given its string name presentation and its corresponding object reference.

2005-07-31 Thread Apple
Hi I am a bit new to python. I was wondering if there is a way to determine whether or not a given string is a member method of a given object: def is_a_method(self, attr_name): 'returns True if attr_name is an instance method of self; false otherwise' The problem is that I have overridden

Re: Wheel-reinvention with Python

2005-07-31 Thread Jorge Godoy
Paul Rubin wrote: > I can put up a Tk gui in about 5 lines of code from a stock Python > distro without having to install anything additional. How do I do > that with wxPython? You can try it here, without installing the package python-tk. And since you need to install python-tk, there's no pro

Re: subclassing list

2005-07-31 Thread Robert Kern
spike wrote: > I've googled like crazy and can't seem to find an answer to why this > isn't working. > > I want to create a custom list class that acts as a circular list. > > ie: my_list = (0, 1, 2) > > how I want it to behave: > > my_list[0] -> 0 > my_list[1] -> 1 > my_list[2] -> 2 > my_list[

Re: Wheel-reinvention with Python

2005-07-31 Thread Paul Rubin
Cliff Wells <[EMAIL PROTECTED]> writes: > The bottom line is this: some people like Tk, some wxPython. Each has > advantages and disadvantages. But to claim that you *can only* do > something in one or the other only demonstrates that you haven't really > tried. I can put up a Tk gui in about 5

Re: Wheel-reinvention with Python

2005-07-31 Thread Paul Rubin
Paul McNett <[EMAIL PROTECTED]> writes: > Admittedly, installing from source is more difficult than any other > project I've found, I'm not interested in installing from non-source. If I wanted to do that, I'd buy a Macintosh instead of dealing with Linux. > but still doable. I'm sure I could

Re: Wheel-reinvention with Python

2005-07-31 Thread Paul Rubin
Torsten Bronger <[EMAIL PROTECTED]> writes: > I can't really understand your hostility towards non-Tkinter > toolkits. In the case of wxPython, it's part of SUSE, which is > probably also true for Fedora and Mandriva. Installing is as easy > as selecting a checkbox. This covers a very great deal

Re: Dabo in 30 seconds?

2005-07-31 Thread Paul Rubin
Cliff Wells <[EMAIL PROTECTED]> writes: > wxWidgets/wxPython hasn't required GTK 1.x in quite a long time. Please > get your facts straight. It did last time I tried installing it, which was maybe 3-6 months ago. Someone posted that it had been updated recently. > Also, the "1600" dependencies y

subclassing list

2005-07-31 Thread spike
I've googled like crazy and can't seem to find an answer to why this isn't working. I want to create a custom list class that acts as a circular list. ie: my_list = (0, 1, 2) how I want it to behave: my_list[0] -> 0 my_list[1] -> 1 my_list[2] -> 2 my_list[3] -> 0 my_list[4] -> 1 ...etc so, wha

Re: how to write a line in a text file

2005-07-31 Thread James Dennett
Peter Hansen wrote: > Steven D'Aprano wrote: > >> On Wed, 27 Jul 2005 04:26:31 +, Andrew Dalke wrote: >> >>> This isn't 1970. Why does your app code work directly with >>> files? Use a in-process database library (ZODB, SQLLite, >>> BerkeleyDB, etc.) to maintain your system state and let th

Re: Wheel-reinvention with Python

2005-07-31 Thread Paul McNett
Torsten Bronger wrote: > Hallöchen! > > Paul Rubin writes: > > >>Ed Leafe <[EMAIL PROTECTED]> writes: >> >> >>>But since UIs are incredibly complex beasts, we've chosen to >>>tackle one at a time, and after looking at them all and >>>considering different issues, we ch

Re: Wheel-reinvention with Python

2005-07-31 Thread Paul McNett
Torsten Bronger wrote: > Terry Hancock <[EMAIL PROTECTED]> writes: >>I know I'm diving into this conversation late, and I haven't read >>the whole thread, but has someone yet mentioned the "anygui" >>project? This has stalled, but it was IMHO a good idea. > I don't know exactly why this project

Re: Wheel-reinvention with Python

2005-07-31 Thread Jorge Godoy
Cliff Wells wrote: > Well, I think this exposes one of the more interesting sides of open > source software in general. For better or worse, you get choices. If > you don't like choice, you won't like open source. Many choices is > sometimes great, sometimes annoying, but the bottom line is th

python-dev summary for 2005-07-01 to 2005-07-15

2005-07-31 Thread Steven Bethard
[The HTML version of this Summary is available at http://www.python.org/dev/summary/2005-07-01_2005-07-15.html] = Announcements = -- QOTF (Quotes of the Fortnight) -- Marc-Andre Lemburg provides perhaps the best summ

Re: Wheel-reinvention with Python

2005-07-31 Thread Cliff Wells
On Sun, 2005-07-31 at 23:46 +0200, Torsten Bronger wrote: > Hallöchen! > > Cliff Wells <[EMAIL PROTECTED]> writes: > > > [...] > > > > Well, I think this exposes one of the more interesting sides of > > open source software in general. For better or worse, you get > > choices. If you don't like

Re: Escaping certain characters

2005-07-31 Thread Robert Kern
Jan Danielsson wrote: > Robert Kern wrote: > [---] > >>>Hmm... On second thought, I need to escape more characters. >>> >>>Is there no other way to escape characters in strings? >> >>Which characters? > >I need to escape '\n', '"', '[' and ']'. I finally went with a few of > these: > string.r

Re: Wheel-reinvention with Python

2005-07-31 Thread Torsten Bronger
Hallöchen! Cliff Wells <[EMAIL PROTECTED]> writes: > [...] > > Well, I think this exposes one of the more interesting sides of > open source software in general. For better or worse, you get > choices. If you don't like choice, you won't like open source. On the other hand, the GUI package bun

Re: Escaping certain characters

2005-07-31 Thread Jan Danielsson
Robert Kern wrote: [---] >> Hmm... On second thought, I need to escape more characters. >> >> Is there no other way to escape characters in strings? > > Which characters? I need to escape '\n', '"', '[' and ']'. I finally went with a few of these: string.replace('\n', '\\n') string.replace('"'

Re: Wheel-reinvention with Python

2005-07-31 Thread Torsten Bronger
Hallöchen! Mike Meyer <[EMAIL PROTECTED]> writes: > Torsten Bronger <[EMAIL PROTECTED]> writes: > >> [...] >> >> None of us has talked about changing syntax. However, the >> standard library is part of the language unless you're really >> very petty. > > Or you use different Python implementatio

Re: Wheel-reinvention with Python

2005-07-31 Thread Cliff Wells
On Sun, 2005-07-31 at 18:01 -0300, Jorge Godoy wrote: > Mike Meyer wrote: > > > We already have multiple distributions of Python: CPython, IronPython, > > and Jython (and there's at least one more). We even have multiple > > distributions of CPython, what with Active State doing their own and > >

Re: Wheel-reinvention with Python

2005-07-31 Thread Cliff Wells
On Sun, 2005-07-31 at 12:48 -0700, Kay Schluehr wrote: > Cliff Wells wrote: > > > > My objection with wrappers around wrappers around wrappers is that I > > > have no hope ever watching the ground. If some error occurs, which > > > layer has to be addressed? Which developing group is reponsible? M

Re: Enumerate registered codecs

2005-07-31 Thread John Machin
Paul Watson wrote: > I see the list of standard encodings in Python 2.4.1 documentation > section 4.9.2. > > Is there a method to enumerate the registered codecs at runtime? This has been asked before, within the last couple of months AFAIR. Use Google to search for codec(s) in this newsgroup i

Re: Wheel-reinvention with Python

2005-07-31 Thread Jorge Godoy
Mike Meyer wrote: > We already have multiple distributions of Python: CPython, IronPython, > and Jython (and there's at least one more). We even have multiple > distributions of CPython, what with Active State doing their own and > the MacPython distribution. I'm not proposing a fundamental change

Re: Dabo in 30 seconds?

2005-07-31 Thread Cliff Wells
On Sun, 2005-07-31 at 18:00 +, Dennis Lee Bieber wrote: > On Sun, 31 Jul 2005 00:13:18 -0400, Ed Leafe <[EMAIL PROTECTED]> declaimed > the following in comp.lang.python: > > > > > Sorry you feel that way. You'll miss out on really great Python products > > that > > aren't in the standard L

Python IDE's

2005-07-31 Thread Jon Hewer
Hi   I am yet to find a Python IDE (for both Windows and Mac) that I like.  Any suggestions?   Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Dabo in 30 seconds?

2005-07-31 Thread Cliff Wells
On Sun, 2005-07-31 at 01:03 -0700, Paul Rubin wrote: > Cliff Wells <[EMAIL PROTECTED]> writes: > > Then why are you using Python at all? Shouldn't you be in the "safe > > home" of Java or Visual Basic, where "standards" are all you have? > > I don't know about VB but Java does a much better job o

Re: Dabo in 30 seconds?

2005-07-31 Thread Cliff Wells
On Sun, 2005-07-31 at 00:32 -0700, Paul Rubin wrote: > Those issues about the 1600 dependencies don't apply nearly as much to > pure Python modules (e.g. Twisted) as they do to extension modules > that require the presence of further stuff on the system. E.g., on > Linux, to use wxPython, you nee

Re: namespaces

2005-07-31 Thread Kay Schluehr
Paolino wrote: > The second point also shows my perplexities about functions namespace: > > def function(): >function.foo='something' > > a=function.foo > > Traceback (most recent call last): >File "", line 1, in ? > AttributeError: 'function' object has no attribute 'foo' > > How should I

Re: keylogger in Python

2005-07-31 Thread Michael Hoffman
[Michael Hoffman] >>You think this is a suitable beginner project? [Francois Pinard] > One surely learns a lot! :-) I can agree with that! -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: Wheel-reinvention with Python

2005-07-31 Thread Kay Schluehr
Cliff Wells wrote: > > My objection with wrappers around wrappers around wrappers is that I > > have no hope ever watching the ground. If some error occurs, which > > layer has to be addressed? Which developing group is reponsible? My own > > or that of team A, team B, team C ... ? The baroque con

Re: A replacement for lambda

2005-07-31 Thread Bengt Richter
On Sun, 31 Jul 2005 00:30:36 -0400, Mike Meyer <[EMAIL PROTECTED]> wrote: >[EMAIL PROTECTED] (Bengt Richter) writes: > >> On Fri, 29 Jul 2005 18:07:31 -0400, Mike Meyer <[EMAIL PROTECTED]> wrote: >>>I know, lambda bashing (and defending) in the group is one of the most >>>popular ways to avoid wri

Re: python SMTP server

2005-07-31 Thread Cliff Wells
On Sun, 2005-07-31 at 13:14 +0200, Benjamin Niemann wrote: > But you should be aware of the fact that (if you send mail from a dialup > machine without going through a relay server) your mails will quickly be > marked as spam - I hope you do not intend to send spam... Yah, Postfix on my servers u

Re: Wheel-reinvention with Python

2005-07-31 Thread Cliff Wells
On Sun, 2005-07-31 at 14:58 -0400, Mike Meyer wrote: > And what do I use to bundle my application for Unix? Most of the > things I build get installed on Unix servers. You install GUI apps on Unix *servers*? Regardless, when you say "Unix", what do you mean? You may as well say "OS" as this te

Re: multiple inheritance super()

2005-07-31 Thread Mike Meyer
"Michele Simionato" <[EMAIL PROTECTED]> writes: > Mike Meyer: >> I think you're replying to me, but you didn't include any indication >> so I can't be sure. > > Oops, sorry, yes, I was replying to you. > >> These two are cases of what I was talking about when I referred to the >> Church-Turing thes

Re: How override ALL function calls? (Is there a "function call function"?)

2005-07-31 Thread Martin v. Löwis
[EMAIL PROTECTED] wrote: > I'm trying run a homegrown profiler on some Python code. > > Rather than apply profiler wrapper to ALL functions by hand > > Is there a low level Python function I can override to modify > > how ALL functions are called? Yes, please take a look at sys.setprofile()

Re: Wheel-reinvention with Python

2005-07-31 Thread Mike Meyer
Paul Rubin writes: > The others are non-Pythonic because they're not included in the > standard distro and therefore the Pythonic "use the included > batteries" tenet says to use Tkinter despite its flaws. When did "use the included batteries" become pythonic? "import t

Re: Wheel-reinvention with Python

2005-07-31 Thread Mike Meyer
Jorge Godoy <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: > > [ Having GUI stuff included on a standard installation of Python ] > >> However, you can get compilers for both that come bundled with a good >> GUI library. Could it be that that's what you really want - someone to >> distribute Pyth

Re: Wheel-reinvention with Python

2005-07-31 Thread Cliff Wells
On Sun, 2005-07-31 at 10:07 -0700, Kay Schluehr wrote: > Some other people already abandoned Python not for the worst reasons: > > http://www.kevin-walzer.com/pivot/entry.php?id=69 Being a developer requires not only a bit of brains, but quite a bit of tenacity as well. Apparently Kevin lacks t

How override ALL function calls? (Is there a "function call function"?)

2005-07-31 Thread [EMAIL PROTECTED]
I'm trying run a homegrown profiler on some Python code. Rather than apply profiler wrapper to ALL functions by hand Is there a low level Python function I can override to modify how ALL functions are called? Chris -- http://mail.python.org/mailman/listinfo/python-list

Re: Wheel-reinvention with Python

2005-07-31 Thread Mike Meyer
Cliff Wells <[EMAIL PROTECTED]> writes: > On Sun, 2005-07-31 at 00:59 -0400, Mike Meyer wrote: > >> I don't particularly like Tkinter, but it seems to me that it's pretty >> much won. It seems to be installed on every desktop platform along >> with Python. That means that if I want to distribute G

Re: Wheel-reinvention with Python

2005-07-31 Thread Mike Meyer
Torsten Bronger <[EMAIL PROTECTED]> writes: > Hallöchen! > Mike Meyer <[EMAIL PROTECTED]> writes: >> Torsten Bronger <[EMAIL PROTECTED]> writes: >>> Calvin Spealman <[EMAIL PROTECTED]> writes: The choice is GUI toolkits is largely seperate from Python. Consider that they are just binding

Re: Changing interpreter's deafult output/error streams

2005-07-31 Thread Michael Hudson
"Ira" <[EMAIL PROTECTED]> writes: > Using an embedded interpreter, how do I change it's default output > streams (specifically the one used by PyErr_Print() which I'm > guessing is the default error stream)? It looks as though it writes to stderr unconditionally. But most of the reasons for ende

Re: Wheel-reinvention with Python

2005-07-31 Thread Cliff Wells
On Sun, 2005-07-31 at 00:23 -0700, Paul Rubin wrote: > [EMAIL PROTECTED] (phil hunt) writes: > > What you say Pythonic, what do you mean? And how do you rate > > Tkinter, PyGtk, PyQt/PyKDE, wxWindows for "Pythonicness"? > > Tkinter is not very Pythonic because it's sort of a Frankenstein > hybri

Re: Wheel-reinvention with Python

2005-07-31 Thread Cliff Wells
On Sun, 2005-07-31 at 01:08 -0700, Paul Rubin wrote: > Cliff Wells <[EMAIL PROTECTED]> writes: > > application. End users shouldn't need to worry about installing third > > party packages (or even Python for that matter). Tools such as py2exe > > and Inno installer make this pretty simple on Wind

Re: namespaces

2005-07-31 Thread Paolino
George Sakkis wrote: > Then write a closure. You get both encapsulation and efficience, and as > a bonus, customization of the translating function: > > import string > > def translateFactory(validChars=string.letters+string.digits, > replaceChar='_'): > all=string.maket

  1   2   >