The Cython project

2007-07-28 Thread Stefan Behnel
Hi all, I just wanted to announce the availability of the first official Cython release (0.9) by the SAGE maintainers William Stein and Robert Bradshaw (and a bit by myself). http://www.cython.org/ Cython is based on the well-known Pyrex translator by Greg Ewing, but supports more cutting edge

ANN: cssutils 0.9.2b2

2007-07-28 Thread Christof Hoeke
what is it -- A Python package to parse and build CSS Cascading Style Sheets. Partly implements the DOM Level 2 Style Stylesheets and CSS interfaces. An implementation of the WD CSS Module: Namespaces which has no official DOM yet is included from v0.9.1. changes since 0.9.2b1

Re: Relative-importing *

2007-07-28 Thread Steven D'Aprano
On Sat, 28 Jul 2007 09:05:51 +1000, Ben Finney wrote: [EMAIL PROTECTED] writes: from . import * from .sibiling import * from .. import * from ..parent_sibling import * ...and so on. The same error occurs: SyntaxError: 'import *' not allowed with 'from .'

slow emails

2007-07-28 Thread Gabriel Dragffy
Whenever I post to this list my email invariably takes ages to show up - perhaps two days or so. Often times not at all. Why is this? I am subscribed to Ubuntu mail list which is also high traffic, and my posts show up there within minutes. Thanks. Gabriel Dragffy [EMAIL PROTECTED]

Re: Reading data from an ISA port

2007-07-28 Thread Gabriel Dragffy
On 23 Jul 2007, at 23:09, Diez B. Roggisch wrote: Gabriel Dragffy schrieb: Dear list members I must admit I am a new user of Python, but it is a language that I enjoy using. For one of my university projects I need to write a program that can read several bytes from an ISA port. It has

Re: Relative-importing *

2007-07-28 Thread Paul Rubin
Steven D'Aprano [EMAIL PROTECTED] writes: I read from module import * as explicitly saying clobber the current namespace with whatever names module exports. That's what from does: it imports names into the current namespace. It isn't some sort of easy to miss side-effect. If a name already

Re: 128 or 96 bit integer types?

2007-07-28 Thread [EMAIL PROTECTED]
On Jul 28, 12:30 am, Tim Roberts [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Jul 27, 1:27 pm, Peter Otten [EMAIL PROTECTED] wrote: Robert Dailey wrote: Is there build-in or third party support for large integer types, such as 96 or 128 bits in size? I require

Re: 128 or 96 bit integer types?

2007-07-28 Thread Paul Rubin
[EMAIL PROTECTED] [EMAIL PROTECTED] writes: has 146 digits. And that's just the begining. The above actually represents a polynomial with 264 terms, the exponents of which range from 0 to 492. One of those polynomials can have over 5 decimal digits when solved. You should use gmpy rather

Re: removing items from a dictionary ?

2007-07-28 Thread Paddy
On Jul 28, 1:43 am, Steven D'Aprano [EMAIL PROTECTED] wrote: On Thu, 26 Jul 2007 21:38:31 +0200, martyw wrote: Remoing elements from a dict is done with del, try this; d = {'a' : 1,'b' : 2} del d['a'] print d {'b': 2} maybe you can post a working snippet to demonstrate your

Re: Comparing Dictionaries

2007-07-28 Thread Paddy
Hi Kenneth, being new to Python i wondered if you at least considered Doctests as part of your testing solution. Other languages don't have Doctest. - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: Compile python with Mingw

2007-07-28 Thread Brian Elmegaard
iwinux [EMAIL PROTECTED] writes: To build python with mingw, there is a common way. First you should install msys, which can be downloaded from mingw's website. Run msys and type 'cd /path/to/source'. Then type ./configure make make install. And you will get a python built with mingw. It

Re: 128 or 96 bit integer types?

2007-07-28 Thread David H Wild
In article [EMAIL PROTECTED], [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: For example, how many ways can you put 492 marbles into 264 ordered bins such that each bin has at least 1 marble? The answer 66189415264331559482776409694993032407028709677550

Re: Compiling python2.5.1 results in 3.5MB python lib?

2007-07-28 Thread Martin v. Löwis
I'm compiling 2.5.1 and end up with a 3.5MB libpython2.5.so file. I seem to remember it should be somewhere around the 1MB mark. What could be causing this? Try stripping it. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: a simple string question

2007-07-28 Thread vedrandekovic
On 28 srp, 07:05, Zentrader [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: NEW TEXT : Hello world;\nHello:\n\t\t\n\n\n\n\n\nHello2 If you are doing all of this to format the output into columns, Python's print() or write() will do this, and is easier as well. Some more info on what

Re: wxGlade: Who knows how to drive this application?

2007-07-28 Thread Roel Schroeven
Alberto Griggio schreef: Hello, I've been trying to use wxGlade recently and I am finding it something of a challenge. Is there any user who finds the user interface satisfactory and the operation of the program predictable? If so I would love to hear from you. Do you have some specific

Re: Wikicodia - The code snippets wiki

2007-07-28 Thread Tina I
Wikicodia Admin wrote: Dears, Wikicodia is a wiki based project for sharing code snippets. We're collecting large number of code snippets for all code-based programming languages, scripts, shells and consoles. We wish you could help us. We're still BETA. Your suggestions, ideas and

Re: slow emails

2007-07-28 Thread John J. Lee
Gabriel Dragffy [EMAIL PROTECTED] writes: Whenever I post to this list my email invariably takes ages to show up - perhaps two days or so. Often times not at all. Why is this? I am subscribed to Ubuntu mail list which is also high traffic, and my posts show up there within minutes. No

Re: Pythonic way for missing dict keys

2007-07-28 Thread John J. Lee
Alex Popescu [EMAIL PROTECTED] writes: Zentrader [EMAIL PROTECTED] wrote in news:1185041243.323915.161230 @x40g2000prg.googlegroups.com: On Jul 21, 7:48 am, Duncan Booth [EMAIL PROTECTED] wrote: [snip...] From the 2.6 PEP #361 (looks like dict.has_key is deprecated) Python 3.0

Re: Pythonic way for missing dict keys

2007-07-28 Thread Alex Popescu
[EMAIL PROTECTED] (John J. Lee) wrote in news:[EMAIL PROTECTED]: Alex Popescu [EMAIL PROTECTED] writes: Zentrader [EMAIL PROTECTED] wrote in news:1185041243.323915.161230 @x40g2000prg.googlegroups.com: On Jul 21, 7:48 am, Duncan Booth [EMAIL PROTECTED] wrote: [snip...] From the 2.6

Re: Where do they tech Python officialy ?

2007-07-28 Thread Omari Norman
On Mon, Jul 23, 2007 at 10:48:10PM -0700, Paul Rubin wrote: If you're having trouble with Python because you're new at programming, I can sympathize--I don't think it's the most beginner-friendly of languages despite the efforts in that direction by the designers. Just curious--what

Re: Relative-importing *

2007-07-28 Thread Ben Finney
Paul Rubin http://[EMAIL PROTECTED] writes: Steven D'Aprano [EMAIL PROTECTED] writes: I read from module import * as explicitly saying clobber the current namespace with whatever names module exports. That's what from does: it imports names into the current namespace. It isn't some sort

Re: Tkinter -- Show Data in an Excel like Read-Only Grid

2007-07-28 Thread beginner
On Jul 27, 11:08 pm, Zentrader [EMAIL PROTECTED] wrote: On Jul 27, 2:56 pm, beginner [EMAIL PROTECTED] wrote: Hi All, I am really new to Tk and Tkinter. I googled the web but it was not mentioned how to build a data grid with Tkinter. Basically, I want to show an excel like data grid

Re: Process Control Help

2007-07-28 Thread Hendrik van Rooyen
[EMAIL PROTECTED] wrote: I'm attempting to start some process control using Python. I've have quite a bit of literature on networking, and have made some tinkering servers and clients for different protocols HTTP, FTP, etc... But now it's time for the murky web of industrial protocol.

Re: a simple string question

2007-07-28 Thread Steve Holden
[EMAIL PROTECTED] wrote: On 28 srp, 07:05, Zentrader [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: NEW TEXT : Hello world;\nHello:\n\t\t\n\n\n\n\n\nHello2 If you are doing all of this to format the output into columns, Python's print() or write() will do this, and is easier as well.

interpreter in the background

2007-07-28 Thread Andrea Tomadin
Hi, I need to use the Python interpreter as if it were a Matlab or Mathematica kernel, i.e. running in the background while I use an interface program to send commands and get output. Ideally, I would pipe some text to the interpreter (through a fifo, a socket...?) and got all the output

Re: Tkinter program with a usable interpreter console

2007-07-28 Thread beginner
On Jul 27, 6:17 pm, Ivan Johansen [EMAIL PROTECTED] wrote: beginner wrote: The problem is that the Tkinter program ends with a .mainloop() call and it is not going to give back control to the command prompt. I feel it is almost like I need to implement the python shell myself. Is there

Re: Pythonic way for missing dict keys

2007-07-28 Thread Steve Holden
Alex Popescu wrote: [EMAIL PROTECTED] (John J. Lee) wrote in news:[EMAIL PROTECTED]: Alex Popescu [EMAIL PROTECTED] writes: Zentrader [EMAIL PROTECTED] wrote in news:1185041243.323915.161230 @x40g2000prg.googlegroups.com: On Jul 21, 7:48 am, Duncan Booth [EMAIL PROTECTED] wrote:

Re: How to programmatically insert pages into MDI.

2007-07-28 Thread fynali iladijas
On Jul 24, 4:36 pm, fynali iladijas [EMAIL PROTECTED] wrote: Hi, this query is regarding automating page insertions in Microsoft Document Imaging. I have two sets of MDIs generated fortnightly: Invoices and their corresponding Broadcast Certificates; about 150 of each. My billing

Re: Where do they tech Python officialy ?

2007-07-28 Thread Neil Cerutti
On 2007-07-28, Omari Norman [EMAIL PROTECTED] wrote: On Mon, Jul 23, 2007 at 10:48:10PM -0700, Paul Rubin wrote: If you're having trouble with Python because you're new at programming, I can sympathize--I don't think it's the most beginner-friendly of languages despite the efforts in that

Python 2.5.1 can't find win32file?

2007-07-28 Thread samwyse
I just upgraded from 2.4.something to 2.5.1. I get the stuff below. I tried easy-installing pywin32; same results. Anyone know what's going on? Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on win32 Type copyright, credits or license() for more information.

Re: Comparing Dictionaries

2007-07-28 Thread Martin P. Hellwig
Kenneth Love wrote: cut That should teach me not to change working code at the same time I am writing unit tests. Even so, I realize it won't be the last time I do something so silly. Yes, I know about TDD's write the test first, but I'm not comfortable with the philosophy of these new

Re: Tkinter -- Show Data in an Excel like Read-Only Grid

2007-07-28 Thread Benjamin
On Jul 27, 4:56 pm, beginner [EMAIL PROTECTED] wrote: Hi All, I am really new to Tk and Tkinter. I googled the web but it was not mentioned how to build a data grid with Tkinter. Basically, I want to show an excel like data grid with fixed column and row headers and sortable columns. But

Re: How to programmatically insert pages into MDI.

2007-07-28 Thread samwyse
On Jul 28, 7:46 am, fynali iladijas [EMAIL PROTECTED] wrote: On Jul 24, 4:36 pm, fynali iladijas [EMAIL PROTECTED] wrote: Hi, this query is regarding automating page insertions in Microsoft Document Imaging. [...] All help and advice will be most appreciated. Thank you. s|a

Re: 128 or 96 bit integer types?

2007-07-28 Thread [EMAIL PROTECTED]
On Jul 28, 2:28?am, Paul Rubin http://[EMAIL PROTECTED] wrote: [EMAIL PROTECTED] [EMAIL PROTECTED] writes: has 146 digits. And that's just the begining. The above actually represents a polynomial with 264 terms, the exponents of which range from 0 to 492. One of those polynomials can have

Re: Python 2.5.1 can't find win32file?

2007-07-28 Thread samwyse
On Jul 28, 8:16 am, samwyse [EMAIL PROTECTED] wrote: I just upgraded from 2.4.something to 2.5.1. I get the stuff below. I tried easy-installing pywin32; same results. Anyone know what's going on? Interestingly enough, this works:

replacement for execfile

2007-07-28 Thread Alex Popescu
Hi all! From another thread (and the pointed PEP) I have found that execfile will not be present in Py3k. So, I am wondering what will be its replacement? Considering that most probably Py3k will keep eval and exec, this will still be possible (indeed requiring manual loading of the file

Why no maintained wrapper to Win32?

2007-07-28 Thread Gilles Ganault
Hello It looks like the development of the PyWin32 wrapper to the Win32 API stopped years ago, which is too bad because it means that writing GUI apps in Python even just for Windows means adding megabytes when using eg. wxWidgets. How come no one too over this project, or offered

Re: 128 or 96 bit integer types?

2007-07-28 Thread John DeRosa
On Sat, 28 Jul 2007 00:19:02 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: For example, how many ways can you put 492 marbles into 264 ordered bins such that each bin has at least 1 marble? The answer 66189415264331559482776409694993032407028709677550

Re: Why no maintained wrapper to Win32?

2007-07-28 Thread Martin v. Löwis
It looks like the development of the PyWin32 wrapper to the Win32 API stopped years ago, which is too bad because it means that writing GUI apps in Python even just for Windows means adding megabytes when using eg. wxWidgets. Why does it mean that? The Win32 APIs for GUI are up-to-date;

Re: Any reason why cStringIO in 2.5 behaves different from 2.4?

2007-07-28 Thread Stefan Scholl
Chris Mellon [EMAIL PROTECTED] wrote: On 7/26/07, Stefan Scholl [EMAIL PROTECTED] wrote: Chris Mellon [EMAIL PROTECTED] wrote: XML is not a string. It's a specific type of bytestream. If you want to work with XML, then generate well-formed XML in the correct encoding. There's no reason you

Re: a simple string question

2007-07-28 Thread Zentrader
Short_Text=n=90; if n==90:print 'ok' compound_lines = Short_Text.split(;) for line in compound_lines: ... line = line.replace(:, :\n) ... print line ... n=90 if n==90: print 'ok' A variation of this will work if the input file isn't too complicated. I found this

Re: Python 2.5.1 can't find win32file?

2007-07-28 Thread Jay Loden
samwyse wrote: Interestingly enough, this works: C:\Python25path=%path%;C:\Python25\Lib\site-packages\pywin32-210- py2.5-win32.eg g\pywin32_system32 C:\Python25python Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on win32 Type help, copyright, credits or

How to write a warning to my log file?

2007-07-28 Thread MarkyMarc
Hi All, A small newbie Q. I have made a nice log function in me program. The program writes some data to me mysql database. When I write to the database I get som warnings back. Have do I write these to me log file? I know I have to use the the warnings api. But I can not figure out how to use

Re: Any reason why cStringIO in 2.5 behaves different from 2.4?

2007-07-28 Thread Stefan Behnel
Stefan Scholl wrote: Chris Mellon [EMAIL PROTECTED] wrote: On 7/26/07, Stefan Scholl [EMAIL PROTECTED] wrote: Chris Mellon [EMAIL PROTECTED] wrote: XML is not a string. It's a specific type of bytestream. If you want to work with XML, then generate well-formed XML in the correct encoding.

Re: Any reason why cStringIO in 2.5 behaves different from 2.4?

2007-07-28 Thread Stefan Scholl
Stefan Behnel [EMAIL PROTECTED] wrote: Stefan Scholl wrote: But the style of the answers makes me wonder if I should report the bug in xml.sax (or its documentation) or just ignore it. Note that PyXML is no longer actively maintained, so it's unlikely that Too bad it can still be found in

Re: How to write a warning to my log file?

2007-07-28 Thread Jay Loden
MarkyMarc wrote: Hi All, A small newbie Q. I have made a nice log function in me program. The program writes some data to me mysql database. When I write to the database I get som warnings back. Have do I write these to me log file? I know I have to use the the warnings api. But I can

Re: Any reason why cStringIO in 2.5 behaves different from 2.4?

2007-07-28 Thread Chris Mellon
On 7/28/07, Stefan Scholl [EMAIL PROTECTED] wrote: Stefan Behnel [EMAIL PROTECTED] wrote: Stefan Scholl wrote: But the style of the answers makes me wonder if I should report the bug in xml.sax (or its documentation) or just ignore it. Note that PyXML is no longer actively maintained,

Re: Where do they tech Python officialy ?

2007-07-28 Thread Paul Rubin
Omari Norman [EMAIL PROTECTED] writes: Just curious--what language would you recommend as most beginner-friendly? I'm not sure what to suggest, I don't pay much attention to this area. Maybe Logo? With some reasonable experience in Scheme or Mozart or Haskell, plus a Python manual, you'll

Re: a simple string question

2007-07-28 Thread vedrandekovic
On 28 srp, 14:15, Steve Holden [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: On 28 srp, 07:05, Zentrader [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: NEW TEXT : Hello world;\nHello:\n\t\t\n\n\n\n\n\nHello2 If you are doing all of this to format the output into columns,

Re: Tkinter -- Show Data in an Excel like Read-Only Grid

2007-07-28 Thread Zentrader
If you want to only display data in a table format, try MultiListBox.py. Just download and run for a demo. http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52266 -- http://mail.python.org/mailman/listinfo/python-list

Re: Any reason why cStringIO in 2.5 behaves different from 2.4?

2007-07-28 Thread Stefan Scholl
Chris Mellon [EMAIL PROTECTED] wrote: On 7/28/07, Stefan Scholl [EMAIL PROTECTED] wrote: Just checked on a system without PyXML: xml/sax/__init__.py defines parseString() and uses cStringIO (when available). Python 2.5.1 Yes, thats the fixed bug. After all this you still do not seem to be

great new site for IT GURUS - www.itkong.com

2007-07-28 Thread itkong
Check out this site - WWW.ITKONG.COM. Focused solely on the community of IT specialists, web developers, technological experts, companies and individuals alike. Currently we are up and running in our beta phase, taking care of final minor bugs tightening loose screws and slowly getting the

◘►FREE Satellite TV on your PC◄◘

2007-07-28 Thread Ana James
Watch all your favorite shows on your Computer from anywhere in the World! Save 1000's of $$$ over many years on cable and satellite bills. INSTANT DOWNLOAD For More Details: http://tvonpc.cq.bz -- http://mail.python.org/mailman/listinfo/python-list

this must be a stupid question ...

2007-07-28 Thread Stef Mientki
but I can;t find the answer ;-) As searching for the '$' sign doesn't work well in the help files, I can not find out, where is the '$' sign used for. If I try to use it in names, I get a compiler error, so it probably has some special meaning. thanks, Stef Mientki --

Re: Installing mod_python on mac os 10.4.7

2007-07-28 Thread 7stud
On Jul 14, 8:34 pm, Graham Dumpleton [EMAIL PROTECTED] wrote: On Jul 15, 10:06 am, Graham Dumpleton [EMAIL PROTECTED] wrote: On Jul 15, 2:47 am, 7stud [EMAIL PROTECTED] wrote: Themod_pythonmanual says this under section 2.1 Prerequisites: -- In order to compilemod_pythonyou

http://MoneyCertain.com

2007-07-28 Thread qyetime
http://MoneyCertain.com -- http://mail.python.org/mailman/listinfo/python-list

Re: this must be a stupid question ...

2007-07-28 Thread Neil Cerutti
On 2007-07-28, Stef Mientki [EMAIL PROTECTED] wrote: but I can;t find the answer ;-) As searching for the '$' sign doesn't work well in the help files, I can not find out, where is the '$' sign used for. If I try to use it in names, I get a compiler error, so it probably has some special

How to stop print printing spaces?

2007-07-28 Thread CC
Hi: I've conjured up the idea of building a hex line editor as a first real Python programming exercise. To begin figuring out how to display a line of data as two-digit hex bytes, I created a hunk of data then printed it: ln = '\x00\x01\xFF 456789abcdef' for i in range(0,15): print

Re: Installing mod_python on mac os 10.4.7

2007-07-28 Thread 7stud
I also get this: import mod_python.psp Traceback (most recent call last): File stdin, line 1, in ? ImportError: No module named mod_python.psp -- http://mail.python.org/mailman/listinfo/python-list

Re: Any reason why cStringIO in 2.5 behaves different from 2.4?

2007-07-28 Thread Stefan Behnel
Stefan Scholl wrote: Chris Mellon [EMAIL PROTECTED] wrote: On 7/28/07, Stefan Scholl [EMAIL PROTECTED] wrote: Just checked on a system without PyXML: xml/sax/__init__.py defines parseString() and uses cStringIO (when available). Python 2.5.1 Yes, thats the fixed bug. After all this you

Re: Installing mod_python on mac os 10.4.7

2007-07-28 Thread 7stud
I'm using Apache 2.2.4 whose root is /Library/Apache2. My installation of python 2.4 is here: /Library/Frameworks/Python.framework/Versions/2.4/ /Library/Frameworks/Python.framework/Versions/Current/ Current is a link to the 2.4 directory: $ ls -al

Re: Installing mod_python on mac os 10.4.7

2007-07-28 Thread 7stud
My PATH environment variable looks like this: PATH=/Library/Frameworks/Python.framework/Versions/Current/bin:/bin:/ sbin:/usr/bin:/usr/sbin:/usr/local/mysql/bin -- http://mail.python.org/mailman/listinfo/python-list

Re: this must be a stupid question ...

2007-07-28 Thread David Wilson
On 28/07/07, Stef Mientki [EMAIL PROTECTED] wrote: but I can;t find the answer ;-) As searching for the '$' sign doesn't work well in the help files, I can not find out, where is the '$' sign used for. If I try to use it in names, I get a compiler error, so it probably has some special

Re: How to stop print printing spaces?

2007-07-28 Thread Roel Schroeven
CC schreef: Hi: I've conjured up the idea of building a hex line editor as a first real Python programming exercise. To begin figuring out how to display a line of data as two-digit hex bytes, I created a hunk of data then printed it: ln = '\x00\x01\xFF 456789abcdef' for i in

Re: this must be a stupid question ...

2007-07-28 Thread Gary Herron
Stef Mientki wrote: but I can;t find the answer ;-) As searching for the '$' sign doesn't work well in the help files, I can not find out, where is the '$' sign used for. If I try to use it in names, I get a compiler error, so it probably has some special meaning. thanks, Stef Mientki

Events: The Python Way

2007-07-28 Thread Gianmaria
Hi, i'm a .net programmer and i'm learnig python, so this question can be very stupid or easy for python programmers. I've a doubt about events here is what: in c# for example i can write a delegate and an event in this way... public delegate SomethingChangedHandler(string message); public

Crunchy security advisory

2007-07-28 Thread André
A security hole has been uncovered in Crunchy (version 0.9.1.1 and earlier). Anyone using Crunchy to browse web tutorials should only visit sites that are trustworthy. We are working hard at fixing the hole; a new release addressing the problems that have been found should be forthcoming

Re: Why no maintained wrapper to Win32?

2007-07-28 Thread Gilles Ganault
On Sat, 28 Jul 2007 18:05:34 +0200, Martin v. Löwis [EMAIL PROTECTED] wrote: Why does it mean that? The Win32 APIs for GUI are up-to-date; they don't need further development. Win32 itself stopped years ago. You can write GUI applications with PyWin32 just fine. Besides the total lack of

Re: Events: The Python Way

2007-07-28 Thread David Wilson
Hi there, Python has no built-in way of doing this. You may consider writing your own class if you like this pattern (I personally do): class Event(object): def __init__(self): self.subscribers = set() def __iadd__(self, subscriber): self.subscribers.add(subscriber)

Re: Any reason why cStringIO in 2.5 behaves different from 2.4?

2007-07-28 Thread Michael L Torrie
Stefan Scholl wrote: Don't let the subject line fool you. I'm OK with cStringIO. The thread is now about xml.sax's parseString(). Giving you the benefit of the doubt here, despite the fact that Stefan Behnel has state this over and over again and you just haven't listened. xml.sax's use of

Test-driven design (was: Comparing Dictionaries)

2007-07-28 Thread Ben Finney
Martin P. Hellwig [EMAIL PROTECTED] writes: But the funny thing that I have seen in the development scene is that writing tests first and code later is a lot easier when you have a technical specification to base it on. A technical specification is of course based on a functional design. A

Re: Any reason why cStringIO in 2.5 behaves different from 2.4?

2007-07-28 Thread Stefan Scholl
Michael L Torrie [EMAIL PROTECTED] wrote: Stefan Scholl wrote: Don't let the subject line fool you. I'm OK with cStringIO. The thread is now about xml.sax's parseString(). Giving you the benefit of the doubt here, despite the fact that Stefan Behnel has state this over and over again and

Memory utilization (linux v. openbsd)

2007-07-28 Thread nazgul
Hi all, I have an app that runs on multiple boxes. On my slackware box, running Python 2.5.1, top shows this: Mem: 1002736k total, 453268k used, 549468k free,31392k buffers Swap: 2097136k total,0k used, 2097136k free, 136876k cached PID USER PR NI VIRT RES SHR

Compiling 2.5.1 on OpenBSD 4.1

2007-07-28 Thread nazgul
Hi all, In my prev post, I indicated I was using 2.5.1 on one box and 2.5p3 on the OpenBSD box. I'm trying to build 2.5.1 on OpenBSD and I get this: Modules/posixmodule.c:5701: error: `lstat' undeclared (first use in this function) I browsed the source and don't understand why I'm getting

Re: Memory utilization (linux v. openbsd)

2007-07-28 Thread Michael Torrie
[EMAIL PROTECTED] wrote: My problem is that the two process under OpenBSD are going to fail with a MemoryError becaause the size just keeps getting larger and larger. ulimit -d is 1G for each process. The problem is that you can't get accurate memory use readings from top. The reality is

Re: this must be a stupid question ...

2007-07-28 Thread Ben Finney
Stef Mientki [EMAIL PROTECTED] writes: but I can;t find the answer ;-) It's not a stupid question, but it is a stupid Subject field. That's easy to fix though: in future, please write a Subject field that actually tells us what the message is about. If I try to use [the $ symbol] in names, I

Re: How to stop print printing spaces?

2007-07-28 Thread CC
Roel Schroeven wrote: CC schreef: ln = '\x00\x01\xFF 456789abcdef' # This works: import sys for i in range(0,15): sys.stdout.write( '%.2X' % ord(ln[i]) ) print Is that the best way, to work directly on the stdout stream? It's not a bad idea: print is mostly designed to be used in

Re: OOP in Python book?

2007-07-28 Thread Dick Moores
At 01:27 PM 7/28/2007, Dennis Lee Bieber wrote: On Fri, 27 Jul 2007 16:27:57 -0700, Dick Moores [EMAIL PROTECTED] declaimed the following in comp.lang.python: Well, the publisher is Prentice Hall, The world's leading educational publisher. Textbooks are typically expensive.

Re: replacement for execfile

2007-07-28 Thread Steven D'Aprano
On Sat, 28 Jul 2007 15:17:56 +, Alex Popescu wrote: Hi all! From another thread (and the pointed PEP) I have found that execfile will not be present in Py3k. So, I am wondering what will be its replacement? Considering that most probably Py3k will keep eval and exec, this will still be

Re: Pythonic way for missing dict keys

2007-07-28 Thread Steven D'Aprano
On Sat, 28 Jul 2007 11:52:48 +, Alex Popescu wrote: [EMAIL PROTECTED] (John J. Lee) wrote in news:[EMAIL PROTECTED]: Alex Popescu [EMAIL PROTECTED] writes: Zentrader [EMAIL PROTECTED] wrote in news:1185041243.323915.161230 @x40g2000prg.googlegroups.com: On Jul 21, 7:48 am, Duncan

Split a string based on change of character

2007-07-28 Thread Andrew Savige
Python beginner here. For a string 'ABBBCC', I want to produce a list ['A', 'BBB', 'CC']. That is, break the string into pieces based on change of character. What's the best way to do this in Python? Using Python 2.5.1, I tried: import re s = re.split(r'(?=(.))(?!\1)', 'ABBBCC') for e in s:

Re: Compiling 2.5.1 on OpenBSD 4.1

2007-07-28 Thread Martin v. Löwis
I'm stumped. Any suggestions? You will have to find the true declaration of lstat - reading man pages or checking that everything looks right won't help. So where is lstat declared? Is it declared at all, and if so, is that declaration conditional perhaps? Produce a preprocessor output

Re: Why no maintained wrapper to Win32?

2007-07-28 Thread Martin v. Löwis
Why does it mean that? The Win32 APIs for GUI are up-to-date; they don't need further development. Win32 itself stopped years ago. You can write GUI applications with PyWin32 just fine. Besides the total lack of documentation, you mean that nothing was added to the Win32 API since PyWin32

Re: Split a string based on change of character

2007-07-28 Thread [EMAIL PROTECTED]
On Jul 28, 9:46 pm, Andrew Savige [EMAIL PROTECTED] wrote: Python beginner here. For a string 'ABBBCC', I want to produce a list ['A', 'BBB', 'CC']. That is, break the string into pieces based on change of character. What's the best way to do this in Python? Using Python 2.5.1, I tried:

Re: Events: The Python Way

2007-07-28 Thread Antti Rasinen
On 2007-07-29, at 02:34, David Wilson wrote: Hi there, Python has no built-in way of doing this. You may consider writing your own class if you like this pattern (I personally do): class Event(object): def __init__(self): self.subscribers = set() ... def __isub__(self,

[ python-Bugs-1704793 ] incorrect return value of unicodedata.lookup() - beoynd BMP

2007-07-28 Thread SourceForge.net
Bugs item #1704793, was opened at 2007-04-21 12:52 Message generated for change (Comment added) made by loewis You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1704793group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1167930 ] threading.Thread.join() cannot be interrupted by a Ctrl-C

2007-07-28 Thread SourceForge.net
Bugs item #1167930, was opened at 2005-03-21 17:19 Message generated for change (Comment added) made by gildea You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1167930group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1171023 ] Thread.join() fails to release Lock on KeyboardInterrupt

2007-07-28 Thread SourceForge.net
Bugs item #1171023, was opened at 2005-03-26 09:40 Message generated for change (Comment added) made by phansen You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1171023group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1762972 ] 'exec' does not accept what 'open' returns

2007-07-28 Thread SourceForge.net
Bugs item #1762972, was opened at 2007-07-28 20:24 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1762972group_id=5470 Please note that this message will contain a full copy of