Python training in Colorado, June 2007

2007-04-20 Thread Python Training
Python author and trainer Mark Lutz will be teaching another 3-day Python class at a conference center in Longmont, Colorado, on June 11-13, 2007. This is a public training session open to individual enrollments, and covers the same topics as the 3-day onsite sessions that Mark teaches, with

International Python user groups events calendar

2007-04-20 Thread TechVenue Eventmaster
FYI All, International Python user groups events calendar: http://TechVenue.com/Calendars/Python/ Enjoy! TechVenue.com Eventmasters -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation:

Zope 3.4.0a1 released

2007-04-20 Thread Christian Theune
19 April 2007 - The Zope 3 development team announces the Zope 3.4.0a1 release This release introduces support for binary large objects in the ZODB, provides a new postprocessing hook for publishing results and makes all Zope packages available as Python eggs. Development release and feedback

qxjsonrpc 0.0.9 - new online demo and more

2007-04-20 Thread Viktor Ferenczi
Released qxjsonrpc 0.0.9, a library to easily implement JSON-RPC servers for WEB applications using the qooxdoo JavaScript library. Supports HTTP, WSGI, access control and session handling. Provides easy session handling and extensible access control. Any method can be publised by adding a single

Can I place a question on the mailing list

2007-04-20 Thread chachou martel juvet
Good Morning Dear Sir , I will like you allowing me to place question on the web. Kind Regards: Martel. - All new Yahoo! Mail - - Get a sneak peak at messages with a handy reading pane.--

Re: Can I place a question on the mailing list

2007-04-20 Thread rishi pathak
Any one can post if it's regarding python On 4/20/07, chachou martel juvet [EMAIL PROTECTED] wrote: Good Morning Dear Sir , I will like you allowing me to place question on the web. Kind Regards: Martel. -- *All new Yahoo! Mail -

Re: Python's handling of unicode surrogates

2007-04-20 Thread Rhamphoryncus
On Apr 19, 11:02 pm, 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 individual

Re: using tkinter to display html

2007-04-20 Thread Glenn Hutchings
On 20 Apr, 02:54, Stephen M. Gava [EMAIL PROTECTED] wrote: yeah. i feel like i'm being forced to use wxwidgets/wxpython just because i need pretty good html display though. You could always use a real web browser: import webbrowser webbrowser.open_new(index.html) Glenn --

Re: Python's handling of unicode surrogates

2007-04-20 Thread Rhamphoryncus
(Sorry for the dupe, Martin. Gmail made it look like your reply was in private.) On 4/19/07, Martin v. Löwis [EMAIL PROTECTED] wrote: Thoughts, from all you readers out there? For/against? See PEP 261. This things have all been discussed at that time, and an explicit decision against what

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.. I

Re: List of Objects

2007-04-20 Thread Hendrik van Rooyen
Steve Holden s,,[EMAIL PROTECTED] 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)

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 traceback. File LOP_PRT_10.pyc,

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:

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: [...] The learning curve is

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 PROTECTED] wrote:

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, should

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: snip type=various irrelevances to my comment below / The learning curve is rather steep IMO, but worth it. Just a

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 object. How is

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)

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 division,

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 a

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 (being C of

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): first, steep

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 pitch that

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 =

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 something that

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 =

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 integer, without boxing

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 incorrect on two

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 consider this: If

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 individual

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: snip type=various irrelevances to my comment below / The learning curve is rather steep IMO, but worth it. Just a throw in remark, that you may

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 discussion

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 know if one of the

Re: multiremberco

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() print

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 mathematical absurdity

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-list

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

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: I don't know how you come

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

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 PROTECTED] wrote: [...] The

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) (type 'float', type 'int') 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 module x =

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:

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 are not like

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 HTML

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 this adds

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

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 idiot

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 copy of 2.4

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. Here's

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 == 1 True type(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 the exception,

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 it I get the

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. Why not?

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 chance of a name

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 '127.0.0.1' and #

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 seems

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): .. .. .. def OnSubmit(self, event):

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 (most recent

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 thing. If

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. Well if you want

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 something

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

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 progress made in

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 between watching

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, but people

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 though

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 would

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 actually mean

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 advice.

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.write('Iteration %d\n' %

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 a

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't find a

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

Re: multiremberco

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 Pythonic

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

Re: multiremberco

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]:

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 is to

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.

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 Pythonic

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 result as the other two examples.

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 value

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' And for

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 LGPL.

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

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 Guido

  1   2   >