Released: Docutils 0.4

2006-01-09 Thread Felix Wiemann
=== Docutils 0.4 Released === Docutils 0.4 has been released. You can download it from http://prdownloads.sf.net/docutils/docutils-0.4.tar.gz?download. What Is Docutils? = Docutils is a system for processing plaintext documentation into

Re: Renaming files in ftplib

2006-01-09 Thread [EMAIL PROTECTED]
Do for instance: Step 1. Move the file to another directory from the remote computer - see http://docs.python.org/lib/ftp-objects.html Step 2. Rename the file here. See http://docs.python.org/lib/os-file-dir.html, function rename Step 3. Move the file to the desired directory, use the same

Re: Real-world use cases for map's None fill-in feature?

2006-01-09 Thread Anders Hammarquist
In article [EMAIL PROTECTED], Raymond Hettinger [EMAIL PROTECTED] wrote: Request for more information My request for readers of comp.lang.python is to search your own code to see if map's None fill-in feature was ever used in real-world code (not toy examples). I had

Re: config errors on Freebsd and python 2.3

2006-01-09 Thread [EMAIL PROTECTED]
Safeer Tabassum wrote: why you are not installing it from ports? The port distribution doesn't build to support Tkinter. That's why I started building python from source. And since I'm building from source I can be more up-to-date then the ports distribution, and include pil, pmw, etc in the

Re: itertools.izip brokeness

2006-01-09 Thread Antoon Pardon
Op 2006-01-05, Bengt Richter schreef [EMAIL PROTECTED]: On 5 Jan 2006 15:48:26 GMT, Antoon Pardon [EMAIL PROTECTED] wrote: On 2006-01-04, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: But here is my real question... Why isn't something like this in itertools, or why

email.Utils.parseaddr() gives arcane result

2006-01-09 Thread Mark Sapiro
email.Utils.parseaddr('Real Name ((comment)) [EMAIL PROTECTED]') returns ('comment [EMAIL PROTECTED]', 'Real') Granted the string above is invalid as RFC 2822 does not allow parentheses within comments, but most mail agents seem to at least take the contents of the angle brackets as the

Re: Renaming files in ftplib

2006-01-09 Thread [EMAIL PROTECTED]
how to get files: http://docs.python.org/lib/ftp-objects.html, see function retrlines for a textfile how to rename files: mhttp://docs.python.org/lib/os-file-dir.htmlv, function rename -- http://mail.python.org/mailman/listinfo/python-list

Re: PyQt Access Violations

2006-01-09 Thread gregarican
Phil Thompson wrote: What version of Qt? Phil It's version 2.3.0 non-commerical for Windows. My OS is Windows 2000 Professional SP4. Using this same version of Qt for a Ruby-based implementation of a similar app I didn't experience the access violation crashes when invoking the

string to datetime parser?

2006-01-09 Thread beza1e1
Is there a library which can parse strings and output a datetime object? It should be as magical as possible and allow things like: 12:30 tomorrow 10.10.2005 02-28-00 28/03/95 1995-03-28 1996.Feb.29 (Thu) 16:45:23.7 Is there anything like that out there? My Google can't find anything useful ...

Re: MVC programming with python (newbie) - please help

2006-01-09 Thread has
bwaha wrote: The author refers to mvctree.py in wxPython as an example of MVC design. However I'm still too green so I find that particular example too complex and I'm not understanding the separation the author is recommending. MVC is all about separation of concerns. The Model is

Re: PIL implementation

2006-01-09 Thread arkestra
The error message is -- Syntax error and it highlights the last else statement. -- http://mail.python.org/mailman/listinfo/python-list

Do you have real-world use cases for map's None fill-in feature?

2006-01-09 Thread Raymond Hettinger
I am evaluating a request for an alternate version of itertools.izip() that has a None fill-in feature like the built-in map function: map(None, 'abc', '12345') # demonstrate map's None fill-in feature [('a', '1'), ('b', '2'), ('c', '3'), (None, '4'), (None, '5')] The movitation is to provide

Re: Newline at EOF Removal

2006-01-09 Thread Dylan Wilson
Do you mean somthing like this? f = open(file.txt) w = open('outfile.txt', 'w') for line in f.split('\n'): ...w.write(line) ... w.close() '\n' in open('/home/wandleg/outfile.txt').read() False -- http://mail.python.org/mailman/listinfo/python-list

Re: Real-world use cases for map's None fill-in feature?

2006-01-09 Thread Raymond Hettinger
[Alex Martelli] I had (years ago, version was 1.5.2) one real-world case of map(max, seq1, seq2). The sequences represented alternate scores for various features, using None to mean the score for this feature cannot be computed by the algorithm used to produce this sequence, and it was

Re: Copying files between different linux machines

2006-01-09 Thread malv
Sorry, the above link should read: http://shfs.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Real-world use cases for map's None fill-in feature?

2006-01-09 Thread rurpy
Raymond Hettinger [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Proposal I am gathering data to evaluate a request for an alternate version of itertools.izip() with a None fill-in feature like that for the built-in map() function: map(None, 'abc', '12345') #

Re: Optional typecheck

2006-01-09 Thread Gregory Petrosyan
Btw, why not in 2.x? Thanks for link, nice module. But I prefer built-in solution, that I can use in any piece of python code. So, I'll wait for version of Python that supports it. -- http://mail.python.org/mailman/listinfo/python-list

Re: config errors on Freebsd and python 2.3

2006-01-09 Thread [EMAIL PROTECTED]
Safeer Tabassum wrote: why you are not installing it from ports? The port distribution doesn't build to support Tkinter. That's why I started building python from source. And since I'm building from source I can be more up-to-date then the ports distribution, and include pil, pmw, etc in the

Re: PIL implementation

2006-01-09 Thread arkestra
The error message is -- Syntax error and it highlights the last else statement. thanks for the reply. -- http://mail.python.org/mailman/listinfo/python-list

Re: MVC programming with python (newbie) - please help

2006-01-09 Thread has
bwaha wrote: The author refers to mvctree.py in wxPython as an example of MVC design. However I'm still too green so I find that particular example too complex and I'm not understanding the separation the author is recommending. MVC is all about separation of concerns. The Model is

Re: Apology Re: Is 'everything' a refrence or isn't it?

2006-01-09 Thread Patrick Maupin
Mike Meyer wrote: This is where we disagree. I think their understanding of references is dead on. What's broken is their understanding of what variables are and what assignments mean. Once you fix that, the rest falls into place. (Steven D'Aprano wrote:) The fact that call by object is

Re: Apology Re: Is 'everything' a refrence or isn't it?

2006-01-09 Thread Patrick Maupin
Mike Meyer wrote: This is where we disagree. I think their understanding of references is dead on. What's broken is their understanding of what variables are and what assignments mean. Once you fix that, the rest falls into place. (Steven D'Aprano wrote:) The fact that call by object is

Re: Why it doesn't work?

2006-01-09 Thread Martin P. Hellwig
Lad wrote: I have a list L={} Now I can assign the value L['a']=1 and I have L={'a': 1} but I would like to have a dictionary like this L={'a': {'b':2}} so I would expect I can do L['a']['b']=2 but it does not work. Why? Thank you for reply Rg, L. Hi, Perhaps what you try

Re: PyQt Access Violations

2006-01-09 Thread gregarican
Phil Thompson wrote: What version of Qt? Phil It's version 2.3.0 non-commerical for Windows. My OS is Windows 2000 Professional SP4. Using this same version of Qt for a Ruby-based implementation of a similar app I didn't experience the access violation crashes when invoking the

Re: Do you have real-world use cases for map's None fill-in feature?

2006-01-09 Thread Paul Rubin
Raymond Hettinger [EMAIL PROTECTED] writes: I am evaluating a request for an alternate version of itertools.izip() that has a None fill-in feature like the built-in map function: map(None, 'abc', '12345') # demonstrate map's None fill-in feature I think finding different ways to write it

Why it doesn't work?

2006-01-09 Thread Lad
I have a list L={} Now I can assign the value L['a']=1 and I have L={'a': 1} but I would like to have a dictionary like this L={'a': {'b':2}} so I would expect I can do L['a']['b']=2 but it does not work. Why? Thank you for reply Rg, L. -- http://mail.python.org/mailman/listinfo/python-list

Re: string to datetime parser?

2006-01-09 Thread Fuzzyman
On 7 Jan 2006 21:00:34 -0800, beza1e1 [EMAIL PROTECTED] wrote: Is there a library which can parse strings and output a datetime object? It should be as magical as possible and allow things like: 12:30 tomorrow 10.10.2005 02-28-00 28/03/95 1995-03-28 1996.Feb.29 (Thu) 16:45:23.7 Is there anything

Determination of disk types

2006-01-09 Thread Mondal
Hello, Is there a way to determine which drive letter is a FDD, a local disk, a CD-ROM/COMBO Drive, or a mapped network drive? I wrote a script to identify all the drive letters on my Windows XP system. Now I want to determine their type, too. Thanks for your help, in advance. Regards Mondal

Re: Help wanted with md2 hash algorithm

2006-01-09 Thread wjb131
Paul Rubin wrote: [EMAIL PROTECTED] writes: below you find my simple python version of MD2 algorithm as described in RFC1319 (http://rfc1319.x42.com/MD2). It produces correct results for strings shorter than 16 Bytes and wrong results for longer strings. Why do you want to use MD2?

Re: Multiway Branching

2006-01-09 Thread bearophileHUGS
A dict can be useful: byte1, byte2 = 32, 1 conv1 = {(32, 32):0, (36,32):natural, (32,1):5, (66,32):0.167} print conv1[byte1, byte2] If you use Psyco maybe something like this can be faster: conv2 = dict((k1*256+k2,v) for (k1,k2),v in conv1.items()) print conv2[(byte18) + byte2] conv1/conv2

Re: Newline at EOF Removal

2006-01-09 Thread Alex N
Thank you guys for all your help. Was able to nail it down. uh I dunno where i saw the 'wt' at. somewhere online though. I have to do it in 2 stages though and run through a coula files but it works. import re f = open(oldfile.txt) w = open(newfile.txt, w) for line in f: if line.strip():

Re: Multiway Branching

2006-01-09 Thread Justin Azoff
[EMAIL PROTECTED] wrote: I need to look at two-byte pairs coming from a machine, and interpret the meaning based on the relative values of the two bytes. In C I'd use a switch statement. Python doesn't have such a branching statement. I have 21 comparisons to make, and that many if/elif/else

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-09 Thread rurpy
Anton Vredegoor [EMAIL PROTECTED] wrote: ... I already sent some reply via google, got a server error, resent, got a confirmation that my message was posted, but it doesn't show up and also there's no way to retrieve my message except fishing in the cache? Yesterday I had a post not showing

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-09 Thread Anton Vredegoor
Alex Martelli wrote: Anton Vredegoor [EMAIL PROTECTED] wrote: However I still maintain that I was never able to meet these fine people you speak about and which you seem to know because the cost involved (a few hundred euro to visit pycon for example) was too high compared to my food

Re: Help wanted with md2 hash algorithm

2006-01-09 Thread Paul Rubin
[EMAIL PROTECTED] writes: I want to understand it, and -- therefor ;-) -- I want to implement it in pure Pyhton. OK. It should be pretty easy to implement. You should find the official rfc at ietf.org. I remember there was some minor erratum in the original version that may or may not have

livewires to py2exe problem :(

2006-01-09 Thread Blaze Bresko
hey, I am using python 2.4 and py2exe v 0.6. I have made a program using pygame/livewires. I have the newest version of both but i dont know what version they are (im on a different computer right now). When I use py2exe to make the exe file, it works and there are no errors in the whole thing.

Re: Apology Re: Is 'everything' a refrence or isn't it?

2006-01-09 Thread Patrick Maupin
Mike Meyer wrote: This is where we disagree. I think their understanding of references is dead on. What's broken is their understanding of what variables are and what assignments mean. Once you fix that, the rest falls into place. (Steven D'Aprano wrote:) The fact that call by object is

CGI errror in (only in) IIS 6.0 server 2003

2006-01-09 Thread [EMAIL PROTECTED]
Hi, I've been using ActivePython 2.3 (cgi) on IIS on win xp, 2000 and they work fine. Until I upgrade the system the server 2003. The ASP script engine is ok but not the CGIs. I got these errors: HTTP Error 403.1 - Forbidden: Execute access is denied. I already have execute access on the

Re: PyHtmlGUI Project is looking for developers

2006-01-09 Thread Paul Boddie
John J. Lee wrote: Paul Boddie [EMAIL PROTECTED] writes: [...] many would advocate using AJAX techniques and dropping support for conventional Web interactions, but I think that such advocacy and the resulting applications threaten the usability of the Web for fairly large groups of

Pliant language

2006-01-09 Thread bearophileHUGS
This post is about a programming language that I've never used, called Pliant. Sometimes knowing something about other languages can be useful for our language, so I think this is not a fully off topic post. Time ago I have found Python (that now I am using a lot) because I like to explore less

CGI errror in (only in) IIS 6.0 server 2003

2006-01-09 Thread [EMAIL PROTECTED]
Hi, I've been using ActivePython 2.3 (cgi) on IIS on win xp, 2000 and they work fine. Until I upgrade the system the server 2003. The ASP script engine is ok but not the CGIs. I got these errors: HTTP Error 403.1 - Forbidden: Execute access is denied. I already have execute access on the

py vs pyc

2006-01-09 Thread Sakcee
Hi I want to know that is .pyc files execute faster than .py files,? since both are interpreted by python , is there any speedup in using one or other.? e.g. what is the difference between runing from cmd python test.py and python test.pyc thanks --

Re: config errors on Freebsd and python 2.3

2006-01-09 Thread [EMAIL PROTECTED]
Safeer Tabassum wrote: why you are not installing it from ports? Python as installed from ports doesn't support Tkinter. Curtis -- http://mail.python.org/mailman/listinfo/python-list

Re: is there any lib can split string in this way?

2006-01-09 Thread bonono
This has been asked not long ago. the shlex module as well as csv module both should be able to handle it. for this simple case shlex.split() seems to be the easiest. Leo Jay wrote: I want to split a string like this: 'abc def this is a test ok' into: ['abc', 'def', 'this is a test', 'ok']

Re: decorator question

2006-01-09 Thread Duncan Booth
Bengt Richter wrote: is it possible to pass parameters to a decorator function? Yes, but then the function must return the same kind of thing a bare decorator-function name would have, which is a function able to take a single argument of a function and return a function. So your decorator

Re: Sockets on Windows and Mac

2006-01-09 Thread rodmc
I am on 10.3, I keep getting exceptions when it hits lines like mySocket.bind (SERVER_IP, 2727 ) or mySocket = socket.socket(socket.AF_NET,socket.SOCK_STREAM) The code I am using is copied from a tutorial on a website somewhere. Cheers, rod --

Re: Newline at EOF Removal

2006-01-09 Thread Alex N
Actually Im doing a process with PHP, Unicode, Ansi. I am trying to format these text files to be acceptable to PHP. The first process is to strip the unicode and convert to ansi. But there are blank lines in the file and at the end of the file. I was just having trouble with the lines at the end.

using livewires in py2exe?

2006-01-09 Thread Blaze Bresko
hey, I am using python 2.4 and py2exe v 0.6. I have made a program using pygame/livewires. I have the newest version of both but i dont know what version they are (im on a different computer right now). When I use py2exe to make the exe file, it works and there are no errors in the whole thing.

Re: Spelling mistakes!

2006-01-09 Thread Sybren Stuvel
[EMAIL PROTECTED] enlightened us with: Terry But not faster than use a dict server! Why not just use (e.g.) Terry kdict? Maybe because not everybody has it? Lame excuse. If you don't have something but you do want to use it, you get it. If everybody just used what they had at one point in

Re: Apology Re: Is 'everything' a refrence or isn't it?

2006-01-09 Thread Patrick Maupin
Mike Meyer wrote: This is where we disagree. I think their understanding of references is dead on. What's broken is their understanding of what variables are and what assignments mean. Once you fix that, the rest falls into place. (Steven D'Aprano wrote:) The fact that call by object is

Re: Why it doesn't work?

2006-01-09 Thread Tomasz Lisowski
Lad wrote: I have a list L={} This IS a dictionary, not a list. Now I can assign the value L['a']=1 and I have L={'a': 1} but I would like to have a dictionary like this L={'a': {'b':2}} You need to initialise L['a'] first, before referencing L['a']['b'] So, you need to call first:

Re: Spelling mistakes!

2006-01-09 Thread Sybren Stuvel
Walter S. Leipold enlightened us with: [Gee, I hope their were no spelling misteaks inn that paragraph...] It should be where Sybren -- The problem with the world is stupidity. Not saying there should be a capital punishment for stupidity, but why

Re: string to datetime parser?

2006-01-09 Thread Sybren Stuvel
beza1e1 enlightened us with: Is there a library which can parse strings and output a datetime object? If you're happy with a mx.DateTime object, take a look at its parser. Sybren -- The problem with the world is stupidity. Not saying there should be a capital punishment for stupidity, but why

Re: .py vs .pyc

2006-01-09 Thread Duncan Booth
Sakcee wrote: is execution of pyc files faster than py files? since both files are interpreted by python , is there any speedup in using one or other? what is difference if i type from cmd line, python test.py vs. python test.pyc There was no need to post your question twice. Python

Re: Is 'everything' a refrence or isn't it?

2006-01-09 Thread rurpy
Fredrik Lundh [EMAIL PROTECTED] wrote: ...snip... afaik, the Python Language Reference never defines the word reference. It carefully defines words like object and value, though, and terms like call by object or call by object reference are perfectly understandable if you use the words as

Re: py vs pyc

2006-01-09 Thread Tomasz Lisowski
Sakcee wrote: Hi I want to know that is .pyc files execute faster than .py files,? since both are interpreted by python , is there any speedup in using one or other.? e.g. what is the difference between runing from cmd python test.py and python test.pyc thanks When running

Re: Multiway Branching

2006-01-09 Thread Justin Azoff
[EMAIL PROTECTED] wrote: I need to look at two-byte pairs coming from a machine, and interpret the meaning based on the relative values of the two bytes. In C I'd use a switch statement. Python doesn't have such a branching statement. I have 21 comparisons to make, and that many if/elif/else

Re: PyHtmlGUI Project is looking for developers

2006-01-09 Thread Paul Boddie
John J. Lee wrote: Paul Boddie [EMAIL PROTECTED] writes: [...] many would advocate using AJAX techniques and dropping support for conventional Web interactions, but I think that such advocacy and the resulting applications threaten the usability of the Web for fairly large groups of

Re: Sockets on Windows and Mac

2006-01-09 Thread rodmc
Hi Peter, I am currently importing the socket library when I write the programs, I have had no problems with it on my PC at work, but the Mac at home steadfastly refuses to work. As for existing libraries, I am new to Python so am kean to avoid re-inventing the wheel :-) Cheers, rod --

Re: config errors on Freebsd and python 2.3

2006-01-09 Thread [EMAIL PROTECTED]
Safeer Tabassum wrote: why you are not installing it from ports? Python as installed from ports doesn't support Tkinter. Curtis -- http://mail.python.org/mailman/listinfo/python-list

Re: Real-world use cases for map's None fill-in feature?

2006-01-09 Thread Raymond Hettinger
[Anders Hammarquist]: I had a quick look through our (Strakt's) codebase and found one example. Thanks for the research :-) The code is used to process user-designed macros, where the user wants to append data to strings stored in the system. Note that all data is stored as lists of

Re: Why it doesn't work?

2006-01-09 Thread Peter Otten
Lad wrote: I have a list A dictionary. L={} Now I can assign the value L['a']=1 and I have L={'a': 1} but I would like to have a dictionary like this L={'a': {'b':2}} so I would expect I can do L['a']['b']=2 but it does not work. Why? D[a][b] = 2 translates to

Get path of a class

2006-01-09 Thread Florian Lindner
Hello, how can I get the path of a class. I managed to do it with c.__module__ + . + c.__name__ but I'm sure there is a better way. Thanks, Florian -- http://mail.python.org/mailman/listinfo/python-list

CGI errror in (only in) IIS 6.0 server 2003

2006-01-09 Thread [EMAIL PROTECTED]
Hi, I've been using ActivePython 2.3 (cgi) on IIS on win xp, 2000 and they work fine. Until I upgrade the system the server 2003. The ASP script engine is ok but not the CGIs. I got these errors: HTTP Error 403.1 - Forbidden: Execute access is denied. I already have execute access on the

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-09 Thread Anton Vredegoor
Alex Martelli wrote: Anton Vredegoor [EMAIL PROTECTED] wrote: However I still maintain that I was never able to meet these fine people you speak about and which you seem to know because the cost involved (a few hundred euro to visit pycon for example) was too high compared to my food

Re: HELP! on wxPython Error

2006-01-09 Thread Franz Steinhaeusler
On Mon, 2 Jan 2006 21:44:11 +0600, Suranga Sarukkali [EMAIL PROTECTED] wrote: Hello, I'm Sam and I've been under som trouble with using wxPython that when I try to execute code containing wxPython gui programs provided with wxPython geting started sample progams it's giving a error but when I

RE: Determination of disk types

2006-01-09 Thread Tim Golden
[Mondal] | Is there a way to determine which drive letter is a FDD, a local disk, | a CD-ROM/COMBO Drive, or a mapped network drive? | | I wrote a script to identify all the drive letters on my Windows XP | system. Now I want to determine their type, too. Initial quick reposnse: look at WMI.

Re: decorator question

2006-01-09 Thread Michele Simionato
Schüle Daniel wrote: Can someone give me some pointers to the metaprogramming in Python? links etc Check the Python Wiki. For the decorators in particular I wrote a module that you may find useful. See http://www.phyast.pitt.edu/~micheles/python/decorator.zip

Re: Detecting Python Installs from the Windows Registry

2006-01-09 Thread Ziga Seilnacht
Fuzzyman wrote: Does anyone know how to use _winreg to get path information (location of install) for all versions of Python installed (and also which is the most recent) ? This should probably work: import _winreg def get_subkey_names(reg_key): index = 0 L = [] while True:

.py vs .pyc

2006-01-09 Thread Sakcee
Hi all is execution of pyc files faster than py files? since both files are interpreted by python , is there any speedup in using one or other? what is difference if i type from cmd line, python test.py vs. python test.pyc thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Spelling mistakes!

2006-01-09 Thread Michele Simionato
[EMAIL PROTECTED] wrote: The OP sort of seemed like he was pining for attribute declarations. __slots__ is the closest thing Python has to them. I don't use them myself (since I've basically avoided new-style classes so far). Skip No, slots are a memory optimization trick and should NOT

Re: Spelling mistakes!

2006-01-09 Thread Michele Simionato
I like to play devil's advocate here, so I will say that in this case using automatic testing will increase your probability of spelling mistakes: I do most of my spelling mistakes in the test cases! 0.5 wink Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: Real-world use cases for map's None fill-in feature?

2006-01-09 Thread Paul Rubin
Raymond Hettinger [EMAIL PROTECTED] writes: The generator version is plain, simple, boring, and uninspirational. But it took only seconds to write and did not require a knowledge of advanced itertool combinations. It more easily explained than the versions with zip tricks. I had this cute

Re: Real-world use cases for map's None fill-in feature?

2006-01-09 Thread Raymond Hettinger
Duncan Booth wrote: One example of padding out iterators (although I didn't use map's fill-in to implement it) is turning a single column of items into a multi-column table with the items laid out across the rows first. The last row may have to be padded with some empty cells. ANALYSIS

Re: Is 'everything' a refrence or isn't it?

2006-01-09 Thread Antoon Pardon
Op 2006-01-06, Steven D'Aprano schreef [EMAIL PROTECTED]: If we say Python is call be reference (or call by value, as many people also say) we *know* the consequence will be newbies writing in saying I was told Python is call by reference, so I did this, and it didn't work, is that a bug in

Re: Real-world use cases for map's None fill-in feature?

2006-01-09 Thread Duncan Booth
Raymond Hettinger wrote: The generator version is plain, simple, boring, and uninspirational. But it took only seconds to write and did not require a knowledge of advanced itertool combinations. It more easily explained than the versions with zip tricks. I can't argue with that. --

Re: Spelling mistakes!

2006-01-09 Thread Antoon Pardon
Op 2006-01-06, Terry Hancock schreef [EMAIL PROTECTED]: On 6 Jan 2006 07:30:41 -0800 KraftDiner [EMAIL PROTECTED] wrote: I've spent hours trying to find a bug that was a simple spelling mistake. You're not the first. ;-) in an init method I declare a variable self.someLongName later in

Re: building Python 2.4.2 on Mac OS X

2006-01-09 Thread Walter Overby
Not sure if this will meet your needs, but I have had good luck using the Fink package manager, which has 2.4.2 in unstable. It takes a while to update the package list and build, but it worked for me without errors. Regards, Walter. -- http://mail.python.org/mailman/listinfo/python-list

testing units in a specific order?

2006-01-09 Thread Antoon Pardon
I have used unit tests now for a number of project. One thing that I dislike is it that the order in which the tests are done bears no relationship to the order they appear in the source. This makes using unit tests somewhat cumbersome. Is there some way to force the tests being done in

Re: build curiosities of svn head (on WinXP)

2006-01-09 Thread David Murmann
Paul Moore schrieb: btw, if anyone is interested in the (rather small) build-script for nant, just ask, I haven't seen anyone ask, so can I? I'd love to see the build script. sorry it took me so long, i have been busy the last couple of days, but here it is: PCBuild/nant-sln.build:

Re: Real-world use cases for map's None fill-in feature?

2006-01-09 Thread Raymond Hettinger
[EMAIL PROTECTED] wrote: The other use case I had was a simple file diff. All I cared about was if the files were the same or not, and if not, what were the first differing lines. This was to compare output from a process that was supposed to match some saved reference data. Because of

Re: testing units in a specific order?

2006-01-09 Thread Michele Simionato
You could use py.test -- http://mail.python.org/mailman/listinfo/python-list

Re: Calling foreign functions from Python? ctypes?

2006-01-09 Thread Neil Hodgson
Paul Watson: I cannot find any way to get to GetVersionInfo in VBScript (cscript). Set objFSO = CreateObject(Scripting.FileSystemObject) Wscript.Echo objFSO.GetFileVersion(c:\bin\SciLexer.dll) Neil -- http://mail.python.org/mailman/listinfo/python-list

Re: CGI errror in (only in) IIS 6.0 server 2003

2006-01-09 Thread David Wahler
[EMAIL PROTECTED] wrote: Hi, I've been using ActivePython 2.3 (cgi) on IIS on win xp, 2000 and they work fine. Until I upgrade the system the server 2003. The ASP script engine is ok but not the CGIs. I got these errors: HTTP Error 403.1 - Forbidden: Execute access is denied. I already

Re: Newbie with some doubts.

2006-01-09 Thread Bruno Desthuilliers
Edgar A. Rodriguez a écrit : Hi everybody, Im newbie to Python (I found it three weeks ago) , in fact Im newbie to programming. I'm being reading and training with the language, but I still wondering about what Classes are used to. A class is the definition of a type of object, and let you

URL 'special character' replacements

2006-01-09 Thread Claude Henchoz
Hi guys I have a huge list of URLs. These URLs all have ASCII codes for special characters, like %20 for a space or %21 for an exclamation mark. I've already googled quite some time, but I have not been able to find any elegant way on how to replace these with their 'real' counterparts ( and

py2exe and Amara

2006-01-09 Thread Doru-Catalin Togea
Hi! I am using Amara 1.1.6 in a project. I made an executable with py2exe but when I try to run it I am referred to the log file, which states: Traceback (most recent call last): File makeTestSpec.py, line 281, in ? File makeTestSpec.py, line 114, in __init__ File makeTestSpec.py, line

Re: URL 'special character' replacements

2006-01-09 Thread Duncan Booth
Claude Henchoz wrote: I have a huge list of URLs. These URLs all have ASCII codes for special characters, like %20 for a space or %21 for an exclamation mark. I've already googled quite some time, but I have not been able to find any elegant way on how to replace these with their 'real'

Re: URL 'special character' replacements

2006-01-09 Thread Fredrik Lundh
Claude Henchoz wrote: I have a huge list of URLs. These URLs all have ASCII codes for special characters, like %20 for a space or %21 for an exclamation mark. I've already googled quite some time, but I have not been able to find any elegant way on how to replace these with their 'real'

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-09 Thread Anton Vredegoor
Alex Martelli wrote: I just don't understand, always assuming you're in the Netherlands, how attending Europython in Belgium (as opposed to Pycon in the US) could have cost hundreds of euros. Conference registration is free to speakers, bicycling NL-BE not costly (many were driving from NL,

Re: CGI errror in (only in) IIS 6.0 server 2003

2006-01-09 Thread Fredrik Lundh
David Wahler wrote: I got these errors: HTTP Error 403.1 - Forbidden: Execute access is denied. I already have execute access on the directory. Can anyone help me? This is an IIS configuration issue, and has nothing to do with Python. You will probably get much better responses if you

Re: 2D canvas for GTK

2006-01-09 Thread Sandro Dentella
Il 2006-01-09, John Bauman [EMAIL PROTECTED] ha scritto: Sandro Dentella [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I need a (decent) canvas for PyGTK. I used tkinter.canvas with real pleasure in the past but now I need to use the canvas in a Gtk application. Does anybody

Re: URL 'special character' replacements

2006-01-09 Thread Tim N. van der Leeuw
My outline for a solution would be: - Use StringIO or cStringIO for reading the original URLs character for character, and to build the result URLs character for character - When you read a '%' then read the next 2 character (should be digits!!!) and create a new string with them - The numbers

Re: testing units in a specific order?

2006-01-09 Thread Michele Simionato
Carl Friedrich Bolz wrote: If you like it so much (and I am being optimistic here :-) that you want to switch tests that use the stdlib unittest module over to py.test you can use a script called utestconvert.py which converts the unittest syntax over to py.test syntax. It can be found in the

Re: URL 'special character' replacements

2006-01-09 Thread Claude Henchoz
Thanks guys, I like the urllib solution. Stupid me, looked at urllib reference, but thought that quote and unquote deal with __n_b_s_p_;_ style entities. -- http://mail.python.org/mailman/listinfo/python-list

Re: URL 'special character' replacements

2006-01-09 Thread Brett g Porter
Claude Henchoz wrote: Hi guys I have a huge list of URLs. These URLs all have ASCII codes for special characters, like %20 for a space or %21 for an exclamation mark. I've already googled quite some time, but I have not been able to find any elegant way on how to replace these with their

Re: testing units in a specific order?

2006-01-09 Thread Carl Friedrich Bolz
Disclaimer: I am a contributor to the py-lib, of which py.test is part of (but have not worked on py.test until now). Michele Simionato wrote: You could use py.test Indeed. It has exactly this feature (together with many nifty others): all tests are run in the order they appear in the

Re: MVC programming with python (newbie) - please help

2006-01-09 Thread bwaha
has [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] bwaha wrote: The author refers to mvctree.py in wxPython as an example of MVC design. However I'm still too green so I find that particular example too complex and I'm not understanding the separation the author is recommending.

Re: py vs pyc

2006-01-09 Thread mrmakent
Sakcee wrote: what is the difference between runing from cmd python test.py and python test.pyc When you run 'python test.py', the python interpreter first looks to see if 'test.pyc' (which is the byte-code compiled version of 'test.py') exists, and if it is more recent than 'test.py'. If

Help with dynamic attributes.

2006-01-09 Thread Mr.Rech
Hi all, I was writing a simple class when I get a strange error message that I can't understand. Hopefully someone could help me here. My class's init method takes a list of lists as input argument and I'd like to create several attributes each one referencing one item of the passed list.

  1   2   3   >