[ANN] Release 0.65.0 of Task Coach

2007-09-09 Thread Frank Niessink
Hi, I'm pleased to announce release 0.65.0 of Task Coach. This release adds the ability to record notes, improves the flexibility of the different views, and fixes several bugs. Bugs fixed: * Made subject column resizable. * Enable export of data containing non-ASCII characters to CSV. * Don't

Re: Spell-checking Python source code

2007-09-09 Thread Miki
In an ideal world, my IDE would do this with a red wavy line. You didn't mention which IDE you use; however, if you use Emacs, there is flyspell-prog-mode which does that for you (checks your spelling on the fly, but only within comments and strings). Same in Vim (:set spell) HTH, -- Miki

Re: Python syntax wart

2007-09-09 Thread Marc 'BlackJack' Rintsch
On Sun, 09 Sep 2007 17:16:05 +1200, Lawrence D'Oliveiro wrote: The one thing I don't like about Python syntax is using backslashes to continue lines. Yes, you can avoid them if you can include parentheses somehow, but this isn't always possible. Possible: […] Not possible: for \

Re: Python syntax wart

2007-09-09 Thread Stefan Behnel
Marc 'BlackJack' Rintsch wrote: On Sun, 09 Sep 2007 17:16:05 +1200, Lawrence D'Oliveiro wrote: The one thing I don't like about Python syntax is using backslashes to continue lines. Yes, you can avoid them if you can include parentheses somehow, but this isn't always possible. Possible:

Re: debugging program that uses ctypes

2007-09-09 Thread Miki
Hello Marco, hi all, I have a python program that calls a dll through ctypes (py2.5). In some (reproducible) conditions the program crashes with an error in ctypes module. How can I trace down the problem? I have created a debug build of python but I also use pyodbc and dateutil libraries

Re: Using s.sort([cmp[, key[, reverse]]]) to sort a list of objects based on a attribute

2007-09-09 Thread Miki
steps.sort(key = lambda s: s.time) This is why attrgetter in the operator module was invented. from operator import attrgetter ... steps.sort(key=attrgettr(time)) HTH, -- Miki [EMAIL PROTECTED] http://pythonwise.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Does shuffle() produce uniform result ?

2007-09-09 Thread Bryan Olson
Paul Rubin wrote: Lawrence D'Oliveiro writes: Except that the NSA's reputation has taken a dent since they failed to anticipate the attacks on MD5 and SHA-1. NSA had nothing to do with MD5, and it's to NSA's credit that SHA-1 held up for as long as it did. I haven't kept up. Has anyone

Re: Python syntax wart

2007-09-09 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Stefan Behnel wrote: He means he has to use backslashes instead of parentheses here. Which is not true, you could easily rephrase this as: for link in GetEachRecord( links, ): out.write(

Re: Does shuffle() produce uniform result ?

2007-09-09 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Paul Rubin wrote: Lawrence D'Oliveiro [EMAIL PROTECTED] writes: Except that the NSA's reputation has taken a dent since they failed to anticipate the attacks on MD5 and SHA-1. NSA had nothing to do with MD5 ... Nevertheless, it was their job to anticipate

Re: pdb question - spew out steps until crash needed

2007-09-09 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Paul Rubin wrote: However, the malloc problem has probably already screwed things up long before the application actually freezes. Your best bet is to recompile Python with malloc debugging enabled and/or run Python itself under a debugger. A simple thing to

re: getting the current function

2007-09-09 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Gary Robinson wrote: I've just never liked the fact that you have to name the function when accessing those attributes from within the function. If it's any consolation, it's not actually the function name you need to refer to, merely any variable or Python object

Re: Python syntax wart

2007-09-09 Thread Carl Banks
On Sun, 09 Sep 2007 17:16:05 +1200, Lawrence D'Oliveiro wrote: The one thing I don't like about Python syntax is using backslashes to continue lines. Yes, you can avoid them if you can include parentheses somehow, but this isn't always possible. Possible: if ( quitting

Re: Python syntax wart

2007-09-09 Thread Steven D'Aprano
On Sun, 09 Sep 2007 17:16:05 +1200, Lawrence D'Oliveiro wrote: The one thing I don't like about Python syntax is using backslashes to continue lines. Then don't use them. Put everything in one long line. Or do something like this. Instead of for Link in GetEachRecord(lots, and, lots, of,

Re: Using s.sort([cmp[, key[, reverse]]]) to sort a list of objects based on a attribute

2007-09-09 Thread Stefan Arentz
Miki [EMAIL PROTECTED] writes: steps.sort(key = lambda s: s.time) This is why attrgetter in the operator module was invented. from operator import attrgetter ... steps.sort(key=attrgettr(time)) Personally I prefer the anonymous function over attrgettr :) S. --

Re: unexpected behavior: did i create a pointer?

2007-09-09 Thread Arnaud Delobelle
On Sep 8, 10:44 am, Steven D'Aprano [EMAIL PROTECTED] cybersource.com.au wrote: [...] Ways that Python objects are like pointers: (1) ... um... Oh yeah, if you bind the _same_ object to two different names, _and_ the object is mutable (but not if it is immutable), mutating the object via

Re: Python syntax wart

2007-09-09 Thread Bjoern Schliessmann
Lawrence D'Oliveiro wrote: Not possible: for \ Link \ in \ GetEachRecord \ ( links, (from_episode,), to_episode = %s, [EpisodeID], order by when_created ) \ :

Re: Python syntax wart

2007-09-09 Thread Duncan Booth
Steven D'Aprano [EMAIL PROTECTED] wrote: On Sun, 09 Sep 2007 17:16:05 +1200, Lawrence D'Oliveiro wrote: The one thing I don't like about Python syntax is using backslashes to continue lines. Then don't use them. Put everything in one long line. Or do something like this. Instead of

Re: Python syntax wart

2007-09-09 Thread Stefan Behnel
Lawrence D'Oliveiro wrote: In message [EMAIL PROTECTED], Stefan Behnel wrote: He means he has to use backslashes instead of parentheses here. Which is not true, you could easily rephrase this as: for link in GetEachRecord( links, ): out.write(

Re: Python syntax wart

2007-09-09 Thread Bjoern Schliessmann
Lawrence D'Oliveiro wrote: But then you can no longer use indentation to display the two-dimensional structure of the statement. How can a statement be two-dimensional? Like a two-dimensional Turing Machine? Regards, Björn -- BOFH excuse #156: Zombie processes haunting the computer --

[OT] Re: So what exactly is a complex number?

2007-09-09 Thread Grzegorz Słodkowicz
Interesting. It appears that we are ran into a mathematical cultural difference. Were I come from vectors *are* defined as having four properties that I enumerated. After some research I found that English sources (Wikipedia) indeed give the definition you supplied. Indeed,

Re: Python syntax wart

2007-09-09 Thread Wildemar Wildenburger
Steven D'Aprano wrote: That is quite possibly the ugliest piece of code I've ever seen in Python. I'm impressed. Did you format it yourself or did you use a professionally written code-uglifier? Boy did that make me laugh! The notion of a code uglifier just is a pearl. (I hate to call

Re: unexpected behavior: did i create a pointer?

2007-09-09 Thread Steven D'Aprano
On Sun, 09 Sep 2007 02:30:00 -0700, Arnaud Delobelle wrote: You know, maybe because I came to Python with no C experience, I never had trouble with the unexpected behaviour that so confused the original poster. It's just obvious. The funny thing is that if the OP had thought of both 'a' and

Re: Does shuffle() produce uniform result ?

2007-09-09 Thread Steven D'Aprano
On Sun, 09 Sep 2007 18:53:32 +1200, Lawrence D'Oliveiro wrote: In message [EMAIL PROTECTED], Paul Rubin wrote: Lawrence D'Oliveiro [EMAIL PROTECTED] writes: Except that the NSA's reputation has taken a dent since they failed to anticipate the attacks on MD5 and SHA-1. NSA had nothing to

Re: Organizing Code - Packages

2007-09-09 Thread GuillaumeC
On Sep 9, 1:04 am, xkenneth [EMAIL PROTECTED] wrote: On Sep 8, 3:35 pm, David [EMAIL PROTECTED] wrote: How do import statements that are declared at the top of a python module work? http://docs.python.org/tut/node8.html On Sat, 08 Sep 2007 12:42:19 -0700, xkenneth wrote: How do import

HDR and PIL

2007-09-09 Thread bpowah
I've put together a method (and a script) for rendering (tone mapping) an arbitrary number of exposures into an HDR-style image. I really like the results I'm getting and feel like others could benefit from it. I've put together a small write-up here (with the code):

Re: unexpected behavior: did i create a pointer?

2007-09-09 Thread Arnaud Delobelle
On Sep 9, 1:59 pm, Steven D'Aprano [EMAIL PROTECTED] cybersource.com.au wrote: On Sun, 09 Sep 2007 02:30:00 -0700, Arnaud Delobelle wrote: You know, maybe because I came to Python with no C experience, I never had trouble with the unexpected behaviour that so confused the original poster.

Re: Spell-checking Python source code

2007-09-09 Thread David
tokenize.tokenize( file.readline, processStrings ) How would you go about writing the output to a file? I mean, I would like to open the file at main level and pass a handle to the file to processStrings to write to it, finally close output file at main level. Probably a class

Re: Organizing Code - Packages

2007-09-09 Thread Bruno Desthuilliers
xkenneth a écrit : Ah, yes, a couple of things: - avoid the 'one-class-per-file' syndrom. It's perfectly ok to have tens Yes but i find it hard to edit classes easily when I have more than one class per file. Why so ? Could it be that your classes are growing too fat ? --

Re: Organizing Code - Packages

2007-09-09 Thread Bruno Desthuilliers
xkenneth a écrit : On Sep 7, 2:04 pm, Wildemar Wildenburger [EMAIL PROTECTED] wrote: Paul Rudin wrote: xkenneth [EMAIL PROTECTED] writes: Ah, yes, a couple of things: - avoid the 'one-class-per-file' syndrom. It's perfectly ok to have tens Yes but i find it hard to edit classes easily when

Re: How to insert in a string @ a index

2007-09-09 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : Hi; I'm trying to insert XYZ before a keyword in a string. Then forget about it. Python's strings are immutable. (snip) The python doesn't supports t1[keyword_index]=XYZhello (string object assignment is not supported). How do I get to this problem? Any

os.sep and os.path.sep

2007-09-09 Thread billiejoex
import os hasattr(os, 'sep') True hasattr(os.path, 'sep') True By chance I noticed it. Are there differences (I think not...)? IMHO, if there are no differences os.path.sep should be removed since it may be confusing. -- http://mail.python.org/mailman/listinfo/python-list

Re: unexpected behavior: did i create a pointer?

2007-09-09 Thread Alex Martelli
Arnaud Delobelle [EMAIL PROTECTED] wrote: ... def lower_list(L): ... for i, x in enumerate(L): ... L[i] = x.lower() ... s = ['STRING'] lower_list(s) print s == ['string'] True def lower_string(s): ... s = s.lower() ... s = STRING lower_string(s)

Re: Using s.sort([cmp[, key[, reverse]]]) to sort a list of objects based on a attribute

2007-09-09 Thread Alex Martelli
Stefan Arentz [EMAIL PROTECTED] wrote: Miki [EMAIL PROTECTED] writes: steps.sort(key = lambda s: s.time) This is why attrgetter in the operator module was invented. from operator import attrgetter ... steps.sort(key=attrgettr(time)) Personally I prefer the anonymous function

python 2.5 problems

2007-09-09 Thread Brian
Finally deleted 2.2 and loaded 2.5 (see below), using the msi, on my XP partition. Having intermittent system crashes. Assumed a corrupt download, so deleted and did another download/install. Same problems. The associated DLLs when XP says that it must shut down the idle shell are not

Re: Does shuffle() produce uniform result ?

2007-09-09 Thread Paul Rubin
Bryan Olson [EMAIL PROTECTED] writes: I haven't kept up. Has anyone exhibited a SHA-1 collision? I don't think anyone has shown an actual collision, but apparently there is now a known way to find them in around 2**63 operations. I don't know if it parallellizes as well as a brute force attack

Re: Does shuffle() produce uniform result ?

2007-09-09 Thread Paul Rubin
Lawrence D'Oliveiro [EMAIL PROTECTED] writes: ... and it's to NSA's credit that SHA-1 held up for as long as it did. But they have no convincing proposal for a successor. That means the gap between the classified and non-classified state of the art has shrunk down to insignificance. The

Re: python 2.5 problems

2007-09-09 Thread O.R.Senthil Kumaran
Finally deleted 2.2 and loaded 2.5 (see below), using Dont delete. Uninstall python 2.2 and additional modules if you have installed them. So is there something not stable about ver 2.5 on XP ? Nothing like that. Python 2.5 works perfectly fine on Windows XP. Download from www.python.org

Modul (%) in python not like in C?

2007-09-09 Thread Dotan Cohen
FIrst of all, how is the % symbol (as in 70%6=4) called in English? Second, in Turbo C -111%10=-1 however in python -111%10=9. Is one or the other in error? Is this a known gotcha? I tried to google the subject however one cannot google the symbol %. Thanks in advance. Dotan Cohen

Re��: ��Modul�� (%) ��in python not like in C��?

2007-09-09 Thread Roy Smith
In article‭ [EMAIL PROTECTED],‬ ‭ ‬Dotan Cohen‭ [EMAIL PROTECTED] ‬wrote‭:‬ ‭ ‬FIrst of all‭, ‬how is the‭ % ‬symbol‭ (‬as in 70%6‭=‬4‭) ‬called in English‭?‬ It's called‭ ‬modulo‭, ‬but most people pronounce it‭ ‬mod‭.‬ It's

Re: Class design (information hiding)

2007-09-09 Thread Gregor Horvath
Alex Martelli schrieb: Why, thanks for the pointer -- I'm particularly proud of having written The only really workable way to develop large software projects, just as the only really workable way to run a large business, is a state of controlled chaos. Yes, indeed a good saying. The

Re: Modul (%) in python not like in C?

2007-09-09 Thread J. Cliff Dyer
Dotan Cohen wrote: FIrst of all, how is the % symbol (as in 70%6=4) called in English? Second, in Turbo C -111%10=-1 however in python -111%10=9. Is one or the other in error? Is this a known gotcha? I tried to google the subject however one cannot google the symbol %. Thanks in advance.

Re: Python syntax wart

2007-09-09 Thread James Stroud
Lawrence D'Oliveiro wrote: The one thing I don't like about Python syntax is using backslashes to continue lines. Yes, you can avoid them if you can include parentheses somehow, but this isn't always possible. Possible: if ( quitting and

Re: Modul (%) in python not like in C?

2007-09-09 Thread Arnaud Delobelle
On Sep 9, 8:15 pm, J. Cliff Dyer [EMAIL PROTECTED] wrote: Dotan Cohen wrote: FIrst of all, how is the % symbol (as in 70%6=4) called in English? Second, in Turbo C -111%10=-1 however in python -111%10=9. Is one or the other in error? Is this a known gotcha? I tried to google the subject

Re: Modul (%) in python not like in C?

2007-09-09 Thread Arnau Sanchez
J. Cliff Dyer escribió: Dotan Cohen wrote: FIrst of all, how is the % symbol (as in 70%6=4) called in English? Second, in Turbo C -111%10=-1 however in python -111%10=9. Is one or the other in error? Is this a known gotcha? I tried to google the subject however one cannot google the symbol

Re: Modul (%) in python not like in C?

2007-09-09 Thread [EMAIL PROTECTED]
On Sep 9, 2:15�pm, J. Cliff Dyer [EMAIL PROTECTED] wrote: Dotan Cohen wrote: FIrst of all, how is the % symbol (as in 70%6=4) called in English? Second, in Turbo C -111%10=-1 however in python -111%10=9. Is one or the other in error? Is this a known gotcha? I tried to google the subject

Setting stdout encoding

2007-09-09 Thread Fabio Zadrozny
Hi, Does someone know if there's a way to explicitly set the stdout/stderr/stdin encoding that python should use? What I'm trying to do is make python recognize that the Eclipse output accepts a different encoding (such as utf-8, cp1252, etc). More details on the problem can be found at:

UnboundLocalError on global variable

2007-09-09 Thread Konstantinos Pachopoulos
Hi, i have a problem, the source of which is probably the fact, that i have not understood how to declare global variables - I use the Jython compiler, but i think this is a Python issue... First of all, i don not use any classes in this module. The problem is, that i declare and instantiate

Re: Python syntax wart

2007-09-09 Thread stef mientki
James Stroud wrote: Lawrence D'Oliveiro wrote: The one thing I don't like about Python syntax is using backslashes to continue lines. Yes, you can avoid them if you can include parentheses somehow, but this isn't always possible. Possible: if ( quitting and

Re: Modul (%) in python not like in C?

2007-09-09 Thread stef mientki
J. Cliff Dyer wrote: Dotan Cohen wrote: FIrst of all, how is the % symbol (as in 70%6=4) called in English? Second, in Turbo C -111%10=-1 however in python -111%10=9. Is one or the other in error? Is this a known gotcha? I tried to google the subject however one cannot google the symbol

Re: UnboundLocalError on global variable

2007-09-09 Thread GuillaumeC
def processLogEntry(entry): # ADD THIS TO YOUR CODE global cmterID_ revision = int(entry.getRevision()) commiter = str(entry.getAuthor()) datetime = getTimeStamp(entry.getDate()) message = str(entry.getMessage()) Commiter_[0] = cmterID_ //HERE's THE PROBLEM The reason

Re: UnboundLocalError on global variable

2007-09-09 Thread GuillaumeC
def processLogEntry(entry): # ADD THIS TO YOUR CODE global cmterID_ revision = int(entry.getRevision()) commiter = str(entry.getAuthor()) datetime = getTimeStamp(entry.getDate()) message = str(entry.getMessage()) Commiter_[0] = cmterID_ //HERE's THE PROBLEM The reason

Re: Modul (%) in python not like in C?

2007-09-09 Thread Lee Harr
Python will always yield a number x = m%n such that 0 = x n, but Turbo C will always yield a number such that if x = m%n -x = -m%n. That is, since 111 % 10 = 1, -111 % 10 = -1. The two values will always differ by n (as used above). Maybe it is an order-of-operations thing -111 %

Re: Modul (%) in python not like in C?

2007-09-09 Thread John Machin
On Sep 10, 8:05 am, Lee Harr [EMAIL PROTECTED] wrote: Python will always yield a number x = m%n such that 0 = x n, but Turbo C will always yield a number such that if x = m%n -x = -m%n. That is, since 111 % 10 = 1, -111 % 10 = -1. The two values will always differ by n (as used above).

Re: Modul (%) in python not like in C?

2007-09-09 Thread Ricardo Aráoz
John Machin wrote: On Sep 10, 8:05 am, Lee Harr [EMAIL PROTECTED] wrote: Python will always yield a number x = m%n such that 0 = x n, but Turbo C will always yield a number such that if x = m%n -x = -m%n. That is, since 111 % 10 = 1, -111 % 10 = -1. The two values will always differ by n

Re: Modul (%) in python not like in C?

2007-09-09 Thread Bryan Olson
Arnau Sanchez wrote: Dotan Cohen wrote: Second, in Turbo C -111%10=-1 however in python -111%10=9. Is one or the other in error? Is this a known gotcha? I tried to google the subject however one cannot google the symbol %. Thanks in advance. [...] In fact, what you get in C depends on the

Re: Modul (%) in python not like in C?

2007-09-09 Thread Dotan Cohen
On 10/09/2007, Bryan Olson [EMAIL PROTECTED] wrote: Not according to the C standard: When integers are divided, the result of the / operator is the algebraic quotient with any fractional part discarded.(87) If the quotient a/b is representable, the expression (a/b)*b +

Re: Reâ­: â¬M odulâ­ (%) â¬i n python not like in Câ­?â¬

2007-09-09 Thread Dotan Cohen
On 09/09/2007, Roy Smith [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED], Dotan Cohen [EMAIL PROTECTED] wrote: FIrst of all, how is the % symbol (as in 70%6=4) called in English? It's called modulo, but most people pronounce it mod. It's documented at

Re: os.sep and os.path.sep

2007-09-09 Thread O.R.Senthil Kumaran
* billiejoex [EMAIL PROTECTED] [2007-09-09 08:48:38]: import os hasattr(os, 'sep') True hasattr(os.path, 'sep') True By chance I noticed it. Are there differences (I think not...)? IMHO, if there are no differences os.path.sep should be removed since it may be confusing. If you

Re: Modul (%) in python not like in C?

2007-09-09 Thread Bryan Olson
Dotan Cohen wrote: On 10/09/2007, Bryan Olson [EMAIL PROTECTED] wrote: Not according to the C standard: When integers are divided, the result of the / operator is the algebraic quotient with any fractional part discarded.(87) If the quotient a/b is representable, the

Re: Modul (%) in python not like in C?

2007-09-09 Thread Bryan Olson
Dotan Cohen wrote: FIrst of all, how is the % symbol (as in 70%6=4) called in English? The operator is usually called mod. (The symbol is usually called percent.) I reserve modulo for its usage in mathematics. 70 modulo 6 is an equivalence class containing infinitely many integers. In math

Re: concise code (beginner)

2007-09-09 Thread bambam
Removing from a list while you iterate will had quadratic performance Anecdote: I was doing a route-finding program for a railway ticketing system. My replacement explained to my boss that it couldn't be done: the problem was one of that class of problems that has no good optimum solution.

Re: concise code (beginner)

2007-09-09 Thread bambam
I'm testing a series of scripts. The scripts are testing a series of hardware devices. The scripts are a sequence of device commands. The scripts have sequence numbers. I am adding exception handling to the to the 'inner platform' that executes sequences. I am doing this because testing of error

Re: Symbolic Link

2007-09-09 Thread samwyse
mosscliffe wrote: On 22 Aug, 00:05, Ian Clark [EMAIL PROTECTED] wrote: On Aug 19, 4:29 pm,mosscliffe[EMAIL PROTECTED] wrote: The source file is in an area which python can see, but not the browser. I am trying to make a link in a browser friendly area so I can use it to display an image file.

Re: MySQLdb: ValueError Something Stupid

2007-09-09 Thread Justin Ezequiel
On Sep 7, 10:39 pm, mcl [EMAIL PROTECTED] wrote: On 7 Sep, 14:11, Carsten Haese [EMAIL PROTECTED] wrote: On Fri, 2007-09-07 at 05:52 -0700, mcl wrote: ValueError: invalid literal for int(): 0- args = ('invalid literal for int(): 0-',)

Re: concise code (beginner)

2007-09-09 Thread bambam
I can try that, but I'm not sure that it will work. The problem is that devList is just a pointer to a list owned by someone else. Making devList point to a new list won't work: I need to make the parent list different. I could do this by adding an extra level of indirection, but I think at the

Re: How to insert in a string @ a index

2007-09-09 Thread a.m.
Thanks guys for you help. I ended up doing this way (for the records)... t1 = hello world hello. hello. \nwhy world hello while indext1.count(hello): if (your condition to determine keyword): t2=t1[:(index+offset)].replace(hello,XYZhello)+t1[((index +offset):] # offset is 5 (hello = 5

Re: Spell-checking Python source code

2007-09-09 Thread Benjamin
On Sep 8, 4:04 pm, John Zenger [EMAIL PROTECTED] wrote: To my horror, someone pointed out to me yesterday that a web app I wrote has been prominently displaying a misspelled word. The word was buried in my code. Is there a utility out there that will help spell-check literal strings entered

Re: Does shuffle() produce uniform result ?

2007-09-09 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Paul Rubin wrote: Lawrence D'Oliveiro [EMAIL PROTECTED] writes: ... and it's to NSA's credit that SHA-1 held up for as long as it did. But they have no convincing proposal for a successor. That means the gap between the classified and non-classified state of the

Re: Python syntax wart

2007-09-09 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Bjoern Schliessmann wrote: What's wrong with this: for Link in GetEachRecord( Then you're no longer showing the syntax structure in two dimensions. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python syntax wart

2007-09-09 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Bjoern Schliessmann wrote: Lawrence D'Oliveiro wrote: But then you can no longer use indentation to display the two-dimensional structure of the statement. How can a statement be two-dimensional? Like this (from C++ code, but the idea is the same): if

Re: concise code (beginner)

2007-09-09 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], bambam wrote: Thank you, Don't top-post. -- http://mail.python.org/mailman/listinfo/python-list

Re: Symbolic Link

2007-09-09 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], samwyse wrote: A hard-link, OTOH, allows direct access to the contents of a file, as long as it is on the same filesystem. No extra steps are required, so the process runs a few microseconds faster, and directory-level permissions can't get in the way. Hard

Re: Does shuffle() produce uniform result ?

2007-09-09 Thread Paul Rubin
Lawrence D'Oliveiro [EMAIL PROTECTED] writes: According to this http://en.wikipedia.org/wiki/SHA-1, the family of algorithms collectively described as SHA-2 is by no means a definitive successor to SHA-1. See http://csrc.nist.gov/hash_standards_comments.pdf: However, due to advances in

Re: concise code (beginner)

2007-09-09 Thread Alex Martelli
bambam [EMAIL PROTECTED] wrote: O(n) to find the element you wish to remove and move over everything after it, Is that how lists are stored in cPython? It seems unlikely? So-called lists in Python are stored contiguously in memory (more like vectors in some other languages), so e.g. L[n]

Re: help - error when trying to call super class method

2007-09-09 Thread Matt McCredie
I am trying to extend list class to build a stack class -- see code below--- but I got an error when I try to call len method from list class here.. why? Thanks in advance! Jeff did a good job of answering your questions. I just wanted to note that your pop is broken, but that doesn't matter

[issue1133] python3.0-config raises SyntaxError

2007-09-09 Thread Martin v. Löwis
Martin v. Löwis added the comment: Duplicate of #1074 -- nosy: +loewis superseder: - python3.0-config script does not run on py3k __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1133 __

[issue1133] python3.0-config raises SyntaxError

2007-09-09 Thread Martin v. Löwis
Changes by Martin v. Löwis: -- resolution: - duplicate status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1133 __ ___ Python-bugs-list mailing list

[issue1132] compile error in poplib.py

2007-09-09 Thread Georg Brandl
Georg Brandl added the comment: Bill Janssen schrieb: Isn't this 1094? It is. -- nosy: +georg.brandl resolution: - duplicate status: open - closed superseder: - TypeError in poplib.py __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1132

[issue1136] Bdb documentation

2007-09-09 Thread Cristina Yenyxe González García
New submission from Cristina Yenyxe González García: Hello, I thought it could be interesting to write some documentation for the bdb module, since it keeps undocumented on Python 2.6 and 3.0. The document I attach is written in reStructuredText, and for using it with 2.5 it only needs to

[issue1137] pyexpat patch for changing buffer_size

2007-09-09 Thread Achim Gaedke
New submission from Achim Gaedke: Hello! Sometimes people have big amounts of text/data in xml files. To make processing more effective, they should be able to change the buffer size for collecting character data in one string. Here comes a patch that applies necessary changes in setattr

[issue1137] pyexpat patch for changing buffer_size

2007-09-09 Thread Achim Gaedke
Changes by Achim Gaedke: __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1137 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue1137] pyexpat patch for changing buffer_size

2007-09-09 Thread Achim Gaedke
Changes by Achim Gaedke: __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1137 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue1137] pyexpat patch for changing buffer_size

2007-09-09 Thread Martin v. Löwis
Changes by Martin v. Löwis: -- keywords: +patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1137 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue1136] Bdb documentation

2007-09-09 Thread Martin v. Löwis
Changes by Martin v. Löwis: -- keywords: +patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1136 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue1122] PyTuple_Size and PyTuple_GET_SIZE return type documentation incorrect

2007-09-09 Thread Martin v. Löwis
Changes by Martin v. Löwis: -- keywords: +patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1122 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue1114] _curses issues on 64-bit big-endian (e.g, AIX)

2007-09-09 Thread Martin v. Löwis
Changes by Martin v. Löwis: -- keywords: +patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1114 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue1134] Parsing a simple script eats all of your memory

2007-09-09 Thread Alan McIntyre
Alan McIntyre added the comment: Confirmed that this happens on Mac OS X with a fresh build of py3k from svn. -- nosy: +alanmcintyre __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1134 __

[issue1138] Fixer needed for __future__ imports

2007-09-09 Thread Collin Winter
New submission from Collin Winter: Per http://mail.python.org/pipermail/python-3000/2007-September/010337.html, 2to3 should strip out __future__ imports. This should probably be added to the existing import fixer. -- assignee: collinwinter components: 2to3 (2.x to 3.0 conversion tool)

[issue1706815] socket.error exceptions not subclass of StandardError

2007-09-09 Thread Gregory P. Smith
Gregory P. Smith added the comment: socket.error now inherits from IOError as of trunk r58067: Change socket.error to inherit from IOError rather than being a stand alone class. This addresses the primary concern in http://bugs.python.org/issue1706815 python-dev discussion here:

[issue1094] TypeError in poplib.py

2007-09-09 Thread Guido van Rossum
Changes by Guido van Rossum: __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1094 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue1094] TypeError in poplib.py

2007-09-09 Thread Guido van Rossum
Guido van Rossum added the comment: Oops, I accidentally deleted the patch. Here is is again. Thanks for the patch! I've applied it. Committed revision 58072. -- assignee: - gvanrossum nosy: +gvanrossum resolution: - fixed status: open - closed __

[issue1765140] logging: delay_fh option and configuration kwargs

2007-09-09 Thread Chris Leary
Chris Leary added the comment: Hi Vinay, I was actually trying to address a use case where the delay_fh option in the fileConfig() would be necessary. Let's say I'm running a simulator that I run many instances of at once. The logging configuration is extensive, so I want to use a

[issue1134] Parsing a simple script eats all of your memory

2007-09-09 Thread Stefan Sonnenberg-Carstens
Stefan Sonnenberg-Carstens added the comment: Same under Linux with Python 3.0a1. Eats all cpu + memory -- nosy: +pythonmeister __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1134 __

[issue1139] PyFile_Encoding should be PyFile_SetEncoding

2007-09-09 Thread Gabriel Genellina
New submission from Gabriel Genellina: Describing the PyFile C API, there is a typo: PyFile_Encoding function does not exist, should say PyFile_SetEncoding instead. (This goes down to version 2.3 when the function was initially added). http://docs.python.org/dev/c-api/