Re: comparison with None

2007-04-20 Thread Hendrik van Rooyen
"Steve Holden" <[EMAIL PROTECTED]> wrote: > PS: Revision question: How many objects of type NoneType are there? You ask the damnesd Questions. There must be millions of the little buggers out there, with the population shifting incessantly as instances of the interpreter are started, and die..

Re: List of Objects

2007-04-20 Thread Hendrik van Rooyen
"Steve Holden" wrote: > Steven D'Aprano wrote: > [...] > > > > Forth method: create identical gazelles, then modify them: > > > > list_of_beasties = [Gazelle(defaults) for i in xrange(1000)] > > for i, beastie in enumerate(xrange(1000)): > > list_of_beasties[i] = modify(beastie) > > > N

Re: PY shutil on win xp home version

2007-04-20 Thread Tim Golden
jim-on-linux wrote: > On Wednesday 18 April 2007 17:02, Tim Golden > wrote: >> jim-on-linux wrote: >>> python help, >>> >>> A client is using win xp home. >>> >>> my program contains; >>>shutil.copyfile(n, 'prn') >>> >>> This runs fine on win xp pro but they are >>> getting the following trac

launching python in parallel

2007-04-20 Thread Toon Knapen
Dear all, I'm looking into launching python in parallel using MPI. There are many projects already doing this but I would like to understand how this can be done in a portable way. For instance, is it possible to launch myscript.py (which calls MPI_Init through an extension module) like: mpir

Re: Do other Python GUI toolkits require this?

2007-04-20 Thread Antoon Pardon
On 2007-04-19, Steve Holden <[EMAIL PROTECTED]> wrote: > Antoon Pardon wrote: >> On 2007-04-19, Steve Holden <[EMAIL PROTECTED]> wrote: >>> Michael Bentley wrote: On Apr 19, 2007, at 4:11 AM, Antoon Pardon wrote: > On 2007-04-19, Michael Bentley <[EMAIL PROTECTED]> wrote: >>> [...] T

Re: Do other Python GUI toolkits require this?

2007-04-20 Thread Antoon Pardon
On 2007-04-19, Wayne Brehaut <[EMAIL PROTECTED]> wrote: > On 19 Apr 2007 10:54:20 GMT, Antoon Pardon <[EMAIL PROTECTED]> > wrote: > >>On 2007-04-19, Michael Bentley <[EMAIL PROTECTED]> wrote: >>> >>> On Apr 19, 2007, at 4:11 AM, Antoon Pardon wrote: >>> On 2007-04-19, Michael Bentley <[EMAIL P

Re: Do other Python GUI toolkits require this?

2007-04-20 Thread Antoon Pardon
On 2007-04-19, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > On Apr 19, 6:54 am, Antoon Pardon <[EMAIL PROTECTED]> wrote: >> I don't know how you come to the conclusion that it is a mathematical >> absurdity but consider this: If you find that common usage propagates >> something that is incorrect

Re: Do other Python GUI toolkits require this?

2007-04-20 Thread Antoon Pardon
On 2007-04-20, Nigel Rowe <[EMAIL PROTECTED]> wrote: > On Thu, 19 Apr 2007 19:11, Antoon Pardon wrote in comp.lang.python: >> On 2007-04-19, Michael Bentley <[EMAIL PROTECTED]> wrote: > > > >>> The learning curve is rather steep IMO, but worth it. >> >> Just a throw in remark, that you may ignore

Re: Python un-plugging the Interpreter

2007-04-20 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, John Nagle wrote: > Many cases are easy. If a smart compiler sees > > for i in range(n) : > ... # something > > and there are no other assignments to "i", then it's clear that > "i" can be represented as an integer, without "boxing" into a > general ob

setDaemon problem.

2007-04-20 Thread Ramashish Baranwal
Hi, I am facing an issue in daemonizing a thread using setDaemon method. Here is my code- import time from threading import Thread class MThread(Thread): def run(self): f = open('/tmp/t.log', 'w') for i in range(10): f.write('Iteration %d\n' % i) time.

Re: How to upgrade python from 2.3 to 2.4

2007-04-20 Thread Ramashish Baranwal
On Apr 20, 2:03 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi, > > Red hat 4 comes with python 2.3, and I am trying to upgrade to python > 2.4. So I download and compile the source of python2.4. > > But as I run it I get the following error, can you please tell me how > to fix it? > > # /

Re: Python Feature Request: Explicit variable declarations

2007-04-20 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Alex Martelli wrote: > Jorgen Grahn <[EMAIL PROTECTED]> wrote: > >> As a C and C++ programmer (not a C/C++ programmer), I have to say that > > Yeah, I wonder, what's C divided by C++ -- maybe about 0.731...? Isn't it 1 unless `C` is 0? The increment happens after the di

Re: Calling private base methods

2007-04-20 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Isaac Rodriguez wrote: > But the truth is that C++ and Java made a decision to do that for a > reason, and the times when you have to work around those language > features come once in a blue moon; they are the exception, not the > rule, and you don't implement features in

Re: Python Feature Request: Explicit variable declarations

2007-04-20 Thread Gabriel Genellina
En Fri, 20 Apr 2007 00:41:04 -0300, Alex Martelli <[EMAIL PROTECTED]> escribió: > Jorgen Grahn <[EMAIL PROTECTED]> wrote: > >> As a C and C++ programmer (not a C/C++ programmer), I have to say that > > Yeah, I wonder, what's C divided by C++ -- maybe about 0.731...? C/C++ == 1 most of the time (b

Re: Do other Python GUI toolkits require this?

2007-04-20 Thread Roel Schroeven
Antoon Pardon schreef: > On 2007-04-19, Wayne Brehaut <[EMAIL PROTECTED]> wrote: >> So the remark that " a steep learning curve means that the subject is >> easily familiarized and that the learning period is short" is >> completely incorrect on two points (i.e., all points that are >> relevant): f

Re: Do other Python GUI toolkits require this?

2007-04-20 Thread Jan Danielsson
Antoon Pardon wrote: >> a) In English, "learning curve" is not restricted to a mathematical >> plot--Webster's also defines it as "the course of progress made in >> learning something". In that context, adding the adjective steep >> ("extremely or excessively high...STEEP implies such sharpness of

RE: Byte-Array to String

2007-04-20 Thread Robert Rawlins - Think Blue
Morning Steve, That stuff looks mighty promising, I did play around with the toString() function yesterday but couldn't get the damned thing working. The syntax has me a little muddled, perhaps you can help out on this by taking a look at my code. #!/usr/bin/python import dbus bus = db

Re: Do other Python GUI toolkits require this?

2007-04-20 Thread Steve Holden
Antoon Pardon wrote: > On 2007-04-19, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> On Apr 19, 6:54 am, Antoon Pardon <[EMAIL PROTECTED]> wrote: >>> I don't know how you come to the conclusion that it is a mathematical >>> absurdity but consider this: If you find that common usage propagates >>>

Domain Keys in Python

2007-04-20 Thread Andrew Veitch
I am trying to implement Domain Keys (http://domainkeys.sourceforge.net/) in Python. In Perl I would just use Crypt:RSA which has a sign method with an armour option which generates exactly what I want but I can't find a way of doing this in Python. I tried this: from M2Crypto import RSA key = R

Re: Python un-plugging the Interpreter

2007-04-20 Thread Steve Holden
Marc 'BlackJack' Rintsch wrote: > In <[EMAIL PROTECTED]>, John Nagle wrote: > >> Many cases are easy. If a smart compiler sees >> >> for i in range(n) : >> ... # something >> >> and there are no other assignments to "i", then it's clear that >> "i" can be represented as an intege

Re: Do other Python GUI toolkits require this?

2007-04-20 Thread Antoon Pardon
On 2007-04-20, Roel Schroeven <[EMAIL PROTECTED]> wrote: > Antoon Pardon schreef: >> On 2007-04-19, Wayne Brehaut <[EMAIL PROTECTED]> wrote: >>> So the remark that " a steep learning curve means that the subject is >>> easily familiarized and that the learning period is short" is >>> completely inc

Re: Do other Python GUI toolkits require this?

2007-04-20 Thread Antoon Pardon
On 2007-04-20, Steve Holden <[EMAIL PROTECTED]> wrote: > Antoon Pardon wrote: >> On 2007-04-19, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >>> On Apr 19, 6:54 am, Antoon Pardon <[EMAIL PROTECTED]> wrote: I don't know how you come to the conclusion that it is a mathematical absurdity but

Re: Python's handling of unicode surrogates

2007-04-20 Thread Paul Boddie
On 20 Apr, 07:02, Neil Hodgson <[EMAIL PROTECTED]> wrote: > Adam Olsen: > > > To solve this I propose Python's unicode type using UTF-16 should have > > gaps in its index, allowing it to only expose complete unicode scalar > > values. Iteration would produce surrogate pairs rather than > > individ

Re: Do other Python GUI toolkits require this?

2007-04-20 Thread Christophe
Nigel Rowe a écrit : > On Thu, 19 Apr 2007 19:11, Antoon Pardon wrote in comp.lang.python: >> On 2007-04-19, Michael Bentley <[EMAIL PROTECTED]> wrote: > > > >>> The learning curve is rather steep IMO, but worth it. >> Just a throw in remark, that you may ignore if you wish, but a steep >> lear

Re: Do other Python GUI toolkits require this?

2007-04-20 Thread Paul Boddie
On 20 Apr, 09:21, Antoon Pardon <[EMAIL PROTECTED]> wrote: > > Indeed I have no wish to bow before common usage. Then nobody will understand you properly if you start referring to a "steep learning curve" when in their terminology you actually mean a "shallow learning curve". Certainly, this discu

Re: using tkinter to display html

2007-04-20 Thread Rob Wolfe
Stephen M. Gava wrote: > On Thu, 19 Apr 2007 06:09:33 -0700, kyosohma wrote: > > > On Apr 19, 6:29 am, "Stephen M. Gava" <[EMAIL PROTECTED]> > > wrote: > >> Hi all, > >> > >> I prefer using tkinter to wxpython (so sue me :) and i need to display > >> a lot of html in a particular app. does anyone

python-list@python.org

2007-04-20 Thread Anton Vredegoor
[EMAIL PROTECTED] wrote: > This one gets the order wrong. With > > def test(): > L = 1, 2, 3, 'a', 4, 'a', 5, 'a', 6, 'a' > it1, it2 = xsplitter(L, lambda x: x == 'a') > print it1.next() > print it2.next() > print it1.next() > print it2.next() > print it1.next() >

Re: setDaemon problem.

2007-04-20 Thread Diez B. Roggisch
Ramashish Baranwal schrieb: > Hi, > > I am facing an issue in daemonizing a thread using setDaemon method. > Here is my code- > > import time > from threading import Thread > > class MThread(Thread): > def run(self): > f = open('/tmp/t.log', 'w') > for i in range(10): >

Re: Calculating CIDR blocks

2007-04-20 Thread Eddie Corns
Look at: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/466298 it handles most of the logic of combining IP ranges. Eddie -- http://mail.python.org/mailman/listinfo/python-list

Re: Do other Python GUI toolkits require this?

2007-04-20 Thread Steve Holden
Antoon Pardon wrote: > On 2007-04-20, Steve Holden <[EMAIL PROTECTED]> wrote: >> Antoon Pardon wrote: >>> On 2007-04-19, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: On Apr 19, 6:54 am, Antoon Pardon <[EMAIL PROTECTED]> wrote: > I don't know how you come to the conclusion that it is a math

Re: Do other Python GUI toolkits require this? (OT)

2007-04-20 Thread Hendrik van Rooyen
"Steve Holden" <[EMAIL PROTECTED]> wrote: > Perhaps in Belgium they prefer climbing mountains over walking up and > down gentle hills? Mountains ? Hills ? In Belgium ?? Its not called the battlefield of Europe for nothing... - Hendrik -- http://mail.python.org/mailman/listinfo/python-

Problems with os.rename

2007-04-20 Thread loial
I am having problems with os.rename on AIX The source file definately exists and the target file does not. However the rename always generates an OSerror exception. I can do the rename via a mv statement at the AIX command line with no problem. How can I get more info what the cause of the OSE

Re: Do other Python GUI toolkits require this?

2007-04-20 Thread Antoon Pardon
On 2007-04-20, Steve Holden <[EMAIL PROTECTED]> wrote: > Antoon Pardon wrote: >> On 2007-04-20, Steve Holden <[EMAIL PROTECTED]> wrote: >>> Antoon Pardon wrote: On 2007-04-19, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > On Apr 19, 6:54 am, Antoon Pardon <[EMAIL PROTECTED]> wrote: >>

mysqldb execute timeout

2007-04-20 Thread Carles Pina i Estany
Hello, I need to implement timeout for execute method in Mysql queries. I am using MySQLdb. I have tried it: signal.signal(signal.SIGALRM,handler) signal.alarm(1) cursor.execute(sql) signal.alarm(0) But handler is never executed. In other example (changing cursor.execute by time

Re: Do other Python GUI toolkits require this?

2007-04-20 Thread Diez B. Roggisch
Antoon Pardon schrieb: > On 2007-04-19, Steve Holden <[EMAIL PROTECTED]> wrote: >> Antoon Pardon wrote: >>> On 2007-04-19, Steve Holden <[EMAIL PROTECTED]> wrote: Michael Bentley wrote: > On Apr 19, 2007, at 4:11 AM, Antoon Pardon wrote: > >> On 2007-04-19, Michael Bentley <[EMAIL

Re: comparison with None

2007-04-20 Thread Tommy Grav
On Apr 19, 2007, at 11:00 PM, Alex Martelli wrote: > Alan Isaac <[EMAIL PROTECTED]> wrote: > >> currently documented behavior: >> "objects of different types always compare unequal". > > Where is that documented? URL please? > 1.0 == 1 > True type(1.0), type(1) > (, ) > Isn't this an

Re: Calculating CIDR blocks

2007-04-20 Thread Pekka Järvinen
On 20 huhti, 14:34, [EMAIL PROTECTED] (Eddie Corns) wrote: > Look at:http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/466298 > it handles most of the logic of combining IP ranges. > > Eddie I'm getting error: Traceback (most recent call last): File "ipr.py", line 5, in x = ipv4.IP4Ra

Re: International Python user groups events calendar

2007-04-20 Thread Tarek Ziadé
Hi, we have one to add: the french speaking python days http://journees.afpy.org/ 2/3 June - Paris - France Regards On 19 Apr 2007 18:43:23 -0700, TechVenue Eventmaster <[EMAIL PROTECTED]> wrote: FYI All, International Python user groups events calendar: http://TechVenue.com/Calendars/Pyt

RE: Byte-Array to String

2007-04-20 Thread Robert Rawlins - Think Blue
Thanks for that Carsten, I've given that a go and I still get similar results to what I've seen in the past whereby it prints a couple of elements I would expect to see but other which I'm not sure about, and what seems to be ALOT of blank characters. 6e 555 5 5

Re: Do other Python GUI toolkits require this?

2007-04-20 Thread Antoon Pardon
On 2007-04-20, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: >> So if you have the choice between a steep or a shalow income curve >> you will prefer the shalow curve because a steep curve makes you >> think about verticale clifs and such? >> >> The analogy with a walk is just silly because curves a

Re: Do other Python GUI toolkits require this?

2007-04-20 Thread Tommy Grav
On Apr 20, 2007, at 9:22 AM, Antoon Pardon wrote: > Well if you want to do it that way, nobody can stop you, but people > in the habit of processing numbers usually put the time on the X-axis > like in time spend learning or exercising and put the other value > on the Y-axis. > > That is because

Re: using tkinter to display html

2007-04-20 Thread Kevin Walzer
Stephen M. Gava wrote: > Hi all, > > I prefer using tkinter to wxpython (so sue me :) and i need to display a > lot of html in a particular app. does anyone know if one of the existing > add on tk html widgets have been wrapped for tkinter already? > > TIA for any reply, > Stephen PySol has an

Re: Do other Python GUI toolkits require this? (OT)

2007-04-20 Thread Roel Schroeven
Hendrik van Rooyen schreef: > "Steve Holden" <[EMAIL PROTECTED]> wrote: > > >> Perhaps in Belgium they prefer climbing mountains over walking up and >> down gentle hills? > > Mountains ? Hills ? In Belgium ?? > > Its not called the battlefield of Europe for nothing... I'm not sure if th

Re: setDaemon problem.

2007-04-20 Thread Richard Brodie
"Ramashish Baranwal" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I was also wondering about "daemonizing" a thread, but I interpreted > that it would daemonize the process which it didn't. I think setDaemon > should be renamed to setDetached or something similar. Neither is pa

Re: Future Python Gui?

2007-04-20 Thread Magnus Lycka
Jarek Zgoda wrote: > I am not a hacker, just a software developer, but I'd have no problems > in either installing PyGTK on Ubuntu box (sudo apt-get install > python-gtk2, but it's installed by default anyway) or on Windows XP > machine (double click on installer icon). "Simple user" is not an idio

Re: Python Feature Request: Explicit variable declarations

2007-04-20 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > Hello. Please tell me whether this feature request is sane (and not > done before) for python so it can be posted to the python-dev mailing > list. I should say first that I am not a professional programmer with > too much technical knowledge. > > I would like to have

Re: wxPython and how to return text entry to main program?

2007-04-20 Thread kyosohma
On Apr 19, 9:05 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > 7stud wrote: > > On Apr 19, 1:38 pm, Tyler <[EMAIL PROTECTED]> wrote: > > [after quoting umpteen lines of code] > > > > > > > You can do this: > > > --- > > class MyFrame(wx.Frame): > > > .. > > .. > > .. > > def OnSubmit(self, event

Re: HTTP getreply() never returns

2007-04-20 Thread Steve Holden
[EMAIL PROTECTED] wrote: > On Apr 20, 12:06 am, Steve Holden <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] wrote: [about httplib problems] >> >> If so, would it be a usable workaround just to use the 2.4 httplib for >> that one program? >> > > Thanks. Can you please tell me how can I 'borrow' a

Re: matplotlib basic question

2007-04-20 Thread Colin J. Williams
orangeDinosaur wrote: > Hi, > > I am exploring the possibility of using python as a replacement of > MATLAB when I leave school. So, I've been playing with matplotlib and > have run into some weird behavior after recently installing python > 2.5.1 and matplotlib 0.90 on my Windows XP machine. Her

Re: comparison with None

2007-04-20 Thread Alex Martelli
Tommy Grav <[EMAIL PROTECTED]> wrote: > On Apr 19, 2007, at 11:00 PM, Alex Martelli wrote: > > > Alan Isaac <[EMAIL PROTECTED]> wrote: > > > >> currently documented behavior: > >> "objects of different types always compare unequal". > > > > Where is that documented? URL please? > > > 1.0 ==

Re: Calling private base methods

2007-04-20 Thread Alex Martelli
Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > In <[EMAIL PROTECTED]>, Isaac > Rodriguez wrote: > > > But the truth is that C++ and Java made a decision to do that for a > > reason, and the times when you have to work around those language > > features come once in a blue moon; they are th

Re: How to upgrade python from 2.3 to 2.4

2007-04-20 Thread [EMAIL PROTECTED]
On Apr 20, 3:21 am, Ramashish Baranwal <[EMAIL PROTECTED]> wrote: > On Apr 20, 2:03 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > Hi, > > > Red hat 4 comes with python 2.3, and I am trying to upgrade to python > > 2.4. So I download and compile the source of python2.4. > > > But as I run

Re: setDaemon problem.

2007-04-20 Thread Richard Brodie
"Michael Hoffman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >> Neither is particularly intuitive; it just depends whether you are more >> familiar with the Posix terminology or the Java one. I personally prefer >> detached but there is little chance of a name change now. > > Wh

Re: setDaemon problem.

2007-04-20 Thread Michael Hoffman
Richard Brodie wrote: > "Michael Hoffman" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>> Neither is particularly intuitive; it just depends whether you are more >>> familiar with the Posix terminology or the Java one. I personally prefer >>> detached but there is little chanc

Re: HTTP getreply() never returns

2007-04-20 Thread Marko . Cain . 23
On Apr 20, 12:06 am, Steve Holden <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > On Apr 19, 2:39 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > >> [EMAIL PROTECTED] wrote: > >>> Hi, > >>> I have the following code which send/receive HTTP request/response: > >>># where sampleUrl is '12

RE: Byte-Array to String

2007-04-20 Thread Carsten Haese
On Fri, 2007-04-20 at 14:39 +0100, Robert Rawlins - Think Blue wrote: > Thanks for that Carsten, > > I've given that a go and I still get similar results to what I've seen in the > past whereby it prints a couple of elements I would expect to see but other > which I'm not sure about, and what se

Re: wxPython and how to return text entry to main program?

2007-04-20 Thread Steve Holden
[EMAIL PROTECTED] wrote: > On Apr 19, 9:05 pm, Steve Holden <[EMAIL PROTECTED]> wrote: >> 7stud wrote: >>> On Apr 19, 1:38 pm, Tyler <[EMAIL PROTECTED]> wrote: >> [after quoting umpteen lines of code] >> >> >> >> >> >>> You can do this: >>> --- >>> class MyFrame(wx.Frame): >>> .. >>> .. >>> .. >>>

Re: PY shutil on win xp home version

2007-04-20 Thread jim-on-linux
Thanks Tim for resopnding, I appreciate the help. I convinced the client to install Linux on 4 machines rather than upgrade from xp home to XP Pro, and more machines to come if the like it. jim-on-linux On Friday 20 April 2007 03:22, you wrote: > jim-on-linux wrote: > > On Wednesday 18 April

Re: Calculating CIDR blocks

2007-04-20 Thread Eddie Corns
=?iso-8859-1?q?Pekka_J=E4rvinen?= <[EMAIL PROTECTED]> writes: >On 20 huhti, 14:34, [EMAIL PROTECTED] (Eddie Corns) wrote: >> Look at:http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/466298 >> it handles most of the logic of combining IP ranges. >> >> Eddie >I'm getting error: >Traceback (m

Re: Do other Python GUI toolkits require this?

2007-04-20 Thread Max Erickson
Antoon Pardon <[EMAIL PROTECTED]> wrote: > On 2007-04-20, Max Erickson <[EMAIL PROTECTED]> wrote: >> >> If we are being pedantic about describing a curve that shows the >> progress of a person in learning a topic, there is no arguing >> with you, a steep curve describes fast uptake and is a good >

Re: Do other Python GUI toolkits require this?

2007-04-20 Thread Antoon Pardon
On 2007-04-20, Paul Boddie <[EMAIL PROTECTED]> wrote: > On 20 Apr, 15:22, Antoon Pardon <[EMAIL PROTECTED]> wrote: >> On 2007-04-20, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: >> >> > Which is nonsense. The goal is to go from A - ignorance - to B - >> > knowledge - which both lie on the X-Axis. >>

Re: setDaemon problem.

2007-04-20 Thread Michael Hoffman
Richard Brodie wrote: > "Ramashish Baranwal" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >> I was also wondering about "daemonizing" a thread, but I interpreted >> that it would daemonize the process which it didn't. I think setDaemon >> should be renamed to setDetached or som

Re: Python Feature Request: Explicit variable declarations

2007-04-20 Thread Eduardo \"EdCrypt\" O. Padoan
> The thoughts of the inventor of Python on "Adding Optional Static > Typing to Python" are at > http://www.artima.com/weblogs/viewpost.jsp?thread=86641 > . I wonder if the idea will be implemented in Python 3.0. No. He says it in another newer post and in PEP 3099, AFAIK. -- EduardoOPadoan (e

Re: Do other Python GUI toolkits require this?

2007-04-20 Thread Max Erickson
Antoon Pardon <[EMAIL PROTECTED]> wrote: >>> Just asserting how something can make a difference withouth >>> arguing how in the particular case it actucally makes a >>> difference is just a divertion tactic without real merrit. >>> >> In the face of a notion that all steep curves determining >> "p

Re: Do other Python GUI toolkits require this?

2007-04-20 Thread Paul Boddie
On 20 Apr, 16:34, Antoon Pardon <[EMAIL PROTECTED]> wrote: > On 2007-04-20, Paul Boddie <[EMAIL PROTECTED]> wrote: > > > You could have knowledge or accomplishment > > on the X axis and effort or work on the Y axis. > > What else is effort than the time you spent on it? What's the difference betwe

Re: Do other Python GUI toolkits require this?

2007-04-20 Thread Paul Boddie
On 20 Apr, 15:22, Antoon Pardon <[EMAIL PROTECTED]> wrote: > On 2007-04-20, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: > > > Which is nonsense. The goal is to go from A - ignorance - to B - > > knowledge - which both lie on the X-Axis. > > Well if you want to do it that way, nobody can stop you, b

Re: wxPython and how to return text entry to main program?

2007-04-20 Thread kyosohma
On Apr 19, 9:05 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > 7stud wrote: > > On Apr 19, 1:38 pm, Tyler <[EMAIL PROTECTED]> wrote: > > [after quoting umpteen lines of code] > > > > > > > You can do this: > > > --- > > class MyFrame(wx.Frame): > > > .. > > .. > > .. > > def OnSubmit(self, event

pydoc and imported modules

2007-04-20 Thread [EMAIL PROTECTED]
When I "from foo import *" in my __init__.py, sometimes module foo's docs will be expanded in the pydocs. It seems to depend in what language foo was implemented. For example, if you "from math import *" in your __init__.py, you will see math's members will appear in the resulting pydocs, as thoug

Re: Python Feature Request: Explicit variable declarations

2007-04-20 Thread Beliavsky
On Apr 14, 6:21 am, [EMAIL PROTECTED] wrote: > Hello. Please tell me whether this feature request is sane (and not > done before) for python so it can be posted to the python-dev mailing > list. I should say first that I am not a professional programmer with > too much technical knowledge. > > I wo

Re: Do other Python GUI toolkits require this?

2007-04-20 Thread Antoon Pardon
On 2007-04-20, Paul Boddie <[EMAIL PROTECTED]> wrote: > On 20 Apr, 09:21, Antoon Pardon <[EMAIL PROTECTED]> wrote: >> >> Indeed I have no wish to bow before common usage. > > Then nobody will understand you properly if you start referring to a > "steep learning curve" when in their terminology you

Re: Problems with os.rename

2007-04-20 Thread Michael Hoffman
loial wrote: > How can I get more info what the cause of the OSError exception is? For starters, post the traceback here. -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

RE: Byte-Array to String

2007-04-20 Thread Carsten Haese
On Fri, 2007-04-20 at 09:51 +0100, Robert Rawlins - Think Blue wrote: > Morning Steve, > > > > That stuff looks mighty promising, I did play around with the > toString() function yesterday but couldn’t get the damned thing > working. That's because Steven seems to have given you suboptimal adv

Re: setDaemon problem.

2007-04-20 Thread Ramashish Baranwal
> > Hi, > > > I am facing an issue in daemonizing a thread using setDaemon method. > > Here is my code- > > > import time > > from threading import Thread > > > class MThread(Thread): > > def run(self): > > f = open('/tmp/t.log', 'w') > > for i in range(10): > > f.wr

Re: Do other Python GUI toolkits require this?

2007-04-20 Thread Antoon Pardon
On 2007-04-20, Max Erickson <[EMAIL PROTECTED]> wrote: > > If we are being pedantic about describing a curve that shows the > progress of a person in learning a topic, there is no arguing with > you, a steep curve describes fast uptake and is a good thing. > > If we are being pedantic about what

Re: Domain Keys in Python

2007-04-20 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, Andrew Veitch <[EMAIL PROTECTED]> wrote: > I am trying to implement Domain Keys > (http://domainkeys.sourceforge.net/) in Python. > > In Perl I would just use Crypt:RSA which has a sign > method with an armour option which generates exactly > what I want but I can

Fast and capable XML parser?

2007-04-20 Thread Magnus Lycka
I'm looking for some library to parse XML code much faster than the libs built into Python 2.4 (I'm stuck with 2.4 for quite a while) and I also need XML Schema validation, and would appreciate support for e.g. XPath and XInclude. I also want an API which is more Pythonic than e.g. a thin wrapper o

python-list@python.org

2007-04-20 Thread Anton Vredegoor
Anton Vredegoor wrote: > from collections import deque > > def xsplitter(seq, pred): > Q = deque(),deque() > it = iter(seq) > def gen(p): > for x in it: > if pred(x) == p: > Q[p].append(x) > while Q[p]: yield Q[p].popleft() >

Re: Fast and capable XML parser?

2007-04-20 Thread Larry Bates
Magnus Lycka wrote: > I'm looking for some library to parse XML code > much faster than the libs built into Python 2.4 > (I'm stuck with 2.4 for quite a while) and I > also need XML Schema validation, and would > appreciate support for e.g. XPath and XInclude. > I also want an API which is more Pyt

Expanding tkinter widgets to fill the window

2007-04-20 Thread KDawg44
Hi, I am writing a GUI front end in Python using Tkinter. I have developed the GUI in a grid and specified the size of the window. The widgets are centered into the middle of the window. I would like them to fill the window. I tried using the sticky=E+W+N+S option on the widgets themselves and

python-list@python.org

2007-04-20 Thread Anton Vredegoor
Anton Vredegoor wrote: > What's up here? Was it a fata morgana? Am I overlooking something? Even more crazy version: def xsplitter(seq, pred): Q = deque(),deque() it = iter(seq) def gen(p): for x in it: Q[pred(x) == p].append(x) while Q[p]: yiel

Re: matplotlib basic question

2007-04-20 Thread Pete Forman
orangeDinosaur <[EMAIL PROTECTED]> writes: > [...] But now, the figure window is completely unresponsive -- I > can't even close it without getting the "your program is not > repsonding" business. What am I missing? This behavior so far > seems pretty unintuitive. The best way out of this i

I need a string/list/generator/comprehension incantation.

2007-04-20 Thread Steven W. Orr
I really tried. I give up. I got this one last time (for which I'm very grateful). import calendar months = dict([(month,ii) for ii,month in enumerate(calendar.month_abbr)][1:]) Now I want something that's going to give me a string whose value is the set of all of the first letters of months. O

Re: Fast and capable XML parser?

2007-04-20 Thread Steven Bethard
Magnus Lycka wrote: > I'm looking for some library to parse XML code > much faster than the libs built into Python 2.4 > (I'm stuck with 2.4 for quite a while) and I > also need XML Schema validation, and would > appreciate support for e.g. XPath and XInclude. > I also want an API which is more Pyt

When to clear a dictionary...

2007-04-20 Thread Bill Jackson
What is the benefit of clearing a dictionary, when you can just reassign it as empty? Similarly, suppose I generate a new dictionary b, and need to have it accessible from a. What is the best method, under which circumstances? >>> import some_function >>> a = {1:2,3:4} >>> b = {1:2:4:3}

Re: When to clear a dictionary...

2007-04-20 Thread Bill Jackson
Bill Jackson wrote the following on 04/20/2007 09:48 AM: > >>> import some_function > > >>> a = {1:2,3:4} > >>> b = {1:2:4:3} > >>> a.clear() > >>> a.update(b) > > >>> a = {1:2,3:4} > >>> b = {1:2,4:3} > >>> for key in b: > a[key] = b[key] Clearly, this won't have the same resul

Re: I need a string/list/generator/comprehension incantation.

2007-04-20 Thread Jon Ribbens
In article <[EMAIL PROTECTED]>, Steven W. Orr wrote: > Now I want something that's going to give me a string whose value is the > set of all of the first letters of months. Order is not important. "".join(set(m[0] for m in calendar.month_abbr[1:])) > And for extra credit, I need the string whose

Re: I need a string/list/generator/comprehension incantation.

2007-04-20 Thread Jerry Hill
On 4/20/07, Steven W. Orr <[EMAIL PROTECTED]> wrote: > I really tried. I give up. > > Now I want something that's going to give me a string whose value is the > set of all of the first letters of months. Order is not important. >>> ''.join(set([s[0] for s in calendar.month_abbr[1:]])) 'ADFJMONS'

Re: Fast and capable XML parser?

2007-04-20 Thread Magnus Lycka
Larry Bates wrote: > I don't know if it meets ALL of your requirements but this might > help: > > http://www.reportlab.org/pyrxp.html AFAIK, there is no XML Schema support in PyRXP. This is really bad enough. GPL is not an option for us, and a commercial licence is less good than e.g. MIT or LGP

When are immutable tuples *essential*? Why can't you just use lists *everywhere* instead?

2007-04-20 Thread [EMAIL PROTECTED]
Please help me think of an example where immutable tuples are essential. It seems that everywhere a tuple is used one could just as easily use a list instead. chris -- http://mail.python.org/mailman/listinfo/python-list

Re: When are immutable tuples *essential*? Why can't you just use lists *everywhere* instead?

2007-04-20 Thread Bjoern Schliessmann
[EMAIL PROTECTED] wrote: > Please help me think of an example where immutable tuples are > essential. When used as dictionary keys (also everywhere else where they must be in a constant order). Yes, this *is* used in practice. Regards, Björn -- BOFH excuse #14: sounds like a Windows probl

Re: When are immutable tuples *essential*? Why can't you just use lists *everywhere* instead?

2007-04-20 Thread Luis M . González
On Apr 20, 2:06 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Please help me think of an example where immutable tuples are > essential. > > It seems that everywhere a tuple is used one could just as easily use > a list instead. > > chris I don't remember exactly where I read about it, but

python-list@python.org

2007-04-20 Thread Anton Vredegoor
Anton Vredegoor wrote: > def xsplitter(seq, pred): > Q = deque(),deque() > it = iter(seq) > def gen(p): > for x in it: > Q[pred(x) == p].append(x) > while Q[p]: yield Q[p].popleft() > while Q[p]: yield Q[p].popleft() > return gen(1)

Re: When to clear a dictionary...

2007-04-20 Thread Larry Bates
Bill Jackson wrote: > What is the benefit of clearing a dictionary, when you can just reassign > it as empty? If you have objects that point to the dictionary (something like a cache) then you want to clear the existing dictionary instead of just assigning it to empty. If nothing points to it, as

Re: Expanding tkinter widgets to fill the window

2007-04-20 Thread Anton Vredegoor
KDawg44 wrote: > I am writing a GUI front end in Python using Tkinter. I have > developed the GUI in a grid and specified the size of the window. The > widgets are centered into the middle of the window. I would like them > to fill the window. I tried using the sticky=E+W+N+S option on the > w

Re: matplotlib basic question

2007-04-20 Thread orangeDinosaur
OK, I'll go with the enthought installation. This seems to be the path of least resistance. For those of you who have been in my position, is there a reason NOT to go with the enthought installation and do things piecemeal instead? thanks, trevis On Apr 20, 11:36 am, Pete Forman <[EMAIL PROTECT

Re: Expanding tkinter widgets to fill the window

2007-04-20 Thread jim-on-linux
On Friday 20 April 2007 13:56, Anton Vredegoor wrote: > KDawg44 wrote: > > I am writing a GUI front end in Python using > > Tkinter. I have developed the GUI in a grid > > and specified the size of the window. The > > widgets are centered into the middle of the > > window. I would like them to

Re: When are immutable tuples *essential*? Why can't you just use lists *everywhere* instead?

2007-04-20 Thread Bjoern Schliessmann
Luis M. González wrote: > I don't remember exactly where I read about it, but Guido said > once that tuples are being kept mainly for historical reasons. Weren't tuples added when lists already existed? Regards, Björn -- BOFH excuse #101: Collapsed Backbone -- http://mail.python.org/mailm

Re: Calculating CIDR blocks

2007-04-20 Thread Pekka Järvinen
On 20 huhti, 18:30, [EMAIL PROTECTED] (Eddie Corns) wrote: > =?iso-8859-1?q?Pekka_J=E4rvinen?= <[EMAIL PROTECTED]> writes: > >On 20 huhti, 14:34, [EMAIL PROTECTED] (Eddie Corns) wrote: > >> Look at:http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/466298 > >> it handles most of the logic of c

Re: matplotlib basic question

2007-04-20 Thread Colin J. Williams
orangeDinosaur wrote: > OK, I'll go with the enthought installation. This seems to be the > path of least resistance. For those of you who have been in my > position, is there a reason NOT to go with the enthought installation > and do things piecemeal instead? > > thanks, > trevis > > On Apr 2

Re: Python Feature Request: Explicit variable declarations

2007-04-20 Thread Bjoern Schliessmann
Dennis Lee Bieber wrote: > Unless it should be interpreted as (C/C)++, which would result in > 2 No, since postfix ++ "returns before and increments after". But what you say is true for ++(C/C). Regards, Björn -- BOFH excuse #274: It was OK before you touched it. -- http://mail.python.org

  1   2   >