lockfile 0.1 - platform-independent advisory locks for Python

2007-11-04 Thread skip
Python's distribution supports a few different ways to lock files. None are platform-independent though. A number of implementations of file locks are out there, but as an exploration of the possibilities I wrote the lockfile module. It offers these features: * A platform-independent API

Roundup Issue Tracker release 1.4.0

2007-11-04 Thread Richard Jones
I'm proud to release version 1.4.0 of Roundup. The metakit backend has been removed due to lack of maintenance and presence of good alternatives (in particular sqlite built into Python 2.5) New Features in 1.4.0: - Roundup has a new xmlrpc frontend that gives access to a tracker using XMLRPC.

ANN: DocIndexer 0.9.1.0 released

2007-11-04 Thread Stuart Rackham
DocIndexer now handles unicode (the previous release was only really comfortable with ascii). A full list of changes is in the CHANGELOG. What is it? --- DocIndexer is a document indexer toolkit that uses the PyLucene search engine for indexing and searching document files. DocIndexer

[ANN] Scope_Plot, another plot library for real time signals.

2007-11-04 Thread Stef Mientki
hello, I justed finished, another plot library, called Scope_Plot, based on wxPython. Scope_Plot is special meant for displaying real time signals, and therefor has some new functionalities: - signal selection - each signal has it's own scale, - moving erase block - measurement cursor ans

Re: how to iterate through each set

2007-11-04 Thread Tom_chicollegeboy
I figured out problem. here is my code. now it works as it should! Thank you everyone! def speed(): infile = open('speed.in', 'r') line = infile.readline() read = int(line) while '-1' not in line: i = 0 t0 = 0 v = 0 if len(line.split())==1:

Re: bsddb in python 2.5.1

2007-11-04 Thread Martin v. Löwis
I know that when you upgrade Berkeley DB you're supposed to go through steps solving this problem,but I wasn't expecting an upgrade. I've tried to use different versions bsddb3, 4.4 and 4.5, (instead of bsddb that comes with python 2.5.1) with different versions of Berkeley DB installs (4.5

Re: how to iterate through each set

2007-11-04 Thread Cameron Walsh
Tom_chicollegeboy wrote: I figured out problem. here is my code. now it works as it should! Thank you everyone! I decided my 4th clue earlier was too much, so I removed it before posting. It looks like you got it anyway =) You've now solved it the way the course instructor intended you to

How to know more about an exception?

2007-11-04 Thread Timmy
Hi, I has a question about exception in python. I know that an exception can be re-raised. Is there any simple way provided by python itself that I can know the current exception is just firstly occurred or it is re-raised by previous exception? I need to know whether the exception is

Re: Is pyparsing really a recursive descent parser?

2007-11-04 Thread Kay Schluehr
On 4 Nov., 03:07, Neil Cerutti [EMAIL PROTECTED] wrote: On 2007-11-04, Just Another Victim of the Ambient Morality [EMAIL PROTECTED] wrote: Neil Cerutti [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On 2007-11-03, Paul McGuire [EMAIL PROTECTED] wrote: On Nov 3, 12:33 am,

Re: How to know more about an exception?

2007-11-04 Thread Diez B. Roggisch
Timmy schrieb: Hi, I has a question about exception in python. I know that an exception can be re-raised. Is there any simple way provided by python itself that I can know the current exception is just firstly occurred or it is re-raised by previous exception? I need to know

Re: Low-overhead GUI toolkit for Linux w/o X11?

2007-11-04 Thread Bjoern Schliessmann
Grant Edwards wrote: On 2007-11-04, Bjoern Schliessmann Erm, wxWidgets is implemented in C++ Are you saying C++ software can't be large and slow? No, but wxWidgets is quite mature and my experience is that it's faster than Qt (partly, I think, because it always uses the native widgets).

Re: (MAC) CoreGraphics module???

2007-11-04 Thread David C. Ullrich
On Fri, 02 Nov 2007 14:09:25 -0500, Robert Kern [EMAIL PROTECTED] wrote: David C. Ullrich wrote: [???] Okay, which version of OS X do you have? In 10.3 and 10.4 it used to be here: /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/plat-mac/CoreGraphics.py I notice that in

how does google search in phrase

2007-11-04 Thread [EMAIL PROTECTED]
hi my friends; google can searching in phrase but it is imposible. it have a lot of page in data base and quadrillions sentence it can't search in fulltxt all of them .it need a super algorithm. ı need the algorithm now. if you have a idea ,pls share to me thanks (sorry for my bad english :(

Re: Is pyparsing really a recursive descent parser?

2007-11-04 Thread Neil Cerutti
On 2007-11-04, Kay Schluehr [EMAIL PROTECTED] wrote: On 4 Nov., 03:07, Neil Cerutti [EMAIL PROTECTED] wrote: I wouldn't characterize it as pretending. How would you parse: hello end hello end WORD END WORD END and WORD WORD WORD END are both valid interpretations, according to the

Re: Python good for data mining?

2007-11-04 Thread Jens
What if I were to use my Python libraries with a web site written in PHP, Perl or Java - how do I integrate with Python? Possibly the simplest way would be python .cgi files. The cgi and cgitb modules allow form data to be read fairly easily. Cookies are also fairly simple. For a more

how to keep order key in a dictionary

2007-11-04 Thread azrael
I 'm currenty working on a project for which it would be great to use a dictionary. At the begining I have a list of strings that should represent the keys in the dictionary. When I try to create a dictionary it rearanges the keys. For this dictionary it is realy important to keep the right order.

Re: how to keep order key in a dictionary

2007-11-04 Thread Jeff McNeil
See http://www.python.org/doc/faq/general/#how-are-dictionaries-implemented . In short, keys() and items() return an arbitrary ordering. I think that http://pypi.python.org/pypi/Ordered%20Dictionary/ will do what you want if key ordering is a necessity. Jeff On Nov 4, 2007, at 8:19 AM,

Re: setting variables in outer functions

2007-11-04 Thread Bruno Desthuilliers
Hrvoje Niksic a écrit : Chris Mellon [EMAIL PROTECTED] writes: I have no idea why someone who already has a working, object system would want to implement their own on top of closures. This subthread is getting ridiculous -- closures are *not* useful only for implementing object

Re: python newbie

2007-11-04 Thread Bruno Desthuilliers
Bjoern Schliessmann a écrit : Bruno Desthuilliers wrote: Bjoern Schliessmann a écrit : You can't just declare in Python, you always define objects (and bind a name to them). def toto(): global p p = 42 Here I declared 'x' as global without defining it. Ah well, someone had to

Re: Python good for data mining?

2007-11-04 Thread Cameron Walsh
Jens wrote: Thanks a lot! I'm not sure I completely understand your description of how to integrate Python with, say PHP. Could you please give a small example? I have no experience with Python web development using CGI. How easy is it compared to web development in PHP? I still havent't

Re: Low-overhead GUI toolkit for Linux w/o X11?

2007-11-04 Thread Grant Edwards
On 2007-11-04, Paul Rubin http wrote: Grant Edwards [EMAIL PROTECTED] writes: There is no mouse. I'm not sure how many widgets are required. Probably not very many. Back in the old days there were some lightweight toolkits for doing text mode GUI's using ANSI graphic characters for

Re: how to keep order key in a dictionary

2007-11-04 Thread BartlebyScrivener
On Nov 4, 7:19 am, azrael [EMAIL PROTECTED] wrote: For this dictionary it is realy important to keep the right order. Is it possible to arange them in a specific order? Not sure what order you want, but how about sorting the keys? def printdict(dict): print sorted key:value pairs keys =

Re: Low-overhead GUI toolkit for Linux w/o X11?

2007-11-04 Thread Grant Edwards
On 2007-11-04, Bjoern Schliessmann [EMAIL PROTECTED] wrote: and wxPython is just a wrapper. Yes, I know. If we though Python was the problem, I wouldn't be asking about other toolkits that had Python bindings. Ah, you know more than you wrote? If you've done measurements, I'd find them

Re: Is pyparsing really a recursive descent parser?

2007-11-04 Thread Just Another Victim of the Ambient Morality
Neil Cerutti [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On 2007-11-04, Just Another Victim of the Ambient Morality [EMAIL PROTECTED] wrote: Neil Cerutti [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Is there not an ambiguity in the grammar? In EBNF: goal --

modify a file

2007-11-04 Thread tech user
Hello, I have a file which is large about 3.5G. I need to modify some lines in it,but I don't like to create another file for the result. How can i do it? thanks. National Bingo Night. Play along for the chance to win $10,000 every week. Download your gamecard now at Yahoo!7 TV.

pygresql

2007-11-04 Thread JD
Hi there. I'm trying to use python with postgresql. I decided to use psycopg to interact with the postgresql server. When installing psycopg it appeared that I needed mxDateTime. So I decided to install the mxbase package. I received the following error message (the interesting bit seems to be

Re: pygresql

2007-11-04 Thread JD
Btw apologies for naming the post 'pygresql'! That was the module I was attempting to use before. -- http://mail.python.org/mailman/listinfo/python-list

Re: modify a file

2007-11-04 Thread Marc 'BlackJack' Rintsch
On Mon, 05 Nov 2007 01:55:50 +1100, tech user wrote: I have a file which is large about 3.5G. I need to modify some lines in it,but I don't like to create another file for the result. How can i do it? thanks. In general not a good idea unless the modification does not change the length of

Re: python newbie

2007-11-04 Thread Bruno Desthuilliers
Hendrik van Rooyen a écrit : Bruno Desthuilliers wrote: functions are *not* methods of their module. Now I am confused - if I write: result = foo.bar(param) Then if foo is a class, we probably all agree that bar is a method of foo. We probably agree that it's an attribute of foo,

Re: python newbie

2007-11-04 Thread Bruno Desthuilliers
Paul Rubin a écrit : Paul Hankin [EMAIL PROTECTED] writes: I'm intrigued - when would you want a callable module? I think it would be nice to be able to say import StringIO buf = StringIO('hello') instead of import StringIO buf = StringIO.StringIO('hello') What's

Re: python newbie

2007-11-04 Thread Bruno Desthuilliers
Bjoern Schliessmann a écrit : Hendrik van Rooyen wrote: So what's the difference ? Why can't bar be called a method of foo, or is it merely a convention that classes have methods and modules have functions? In depends on which terminology you use. As Steven told, Python methods are

Re: how to keep order key in a dictionary

2007-11-04 Thread azrael
thanks, the links where successfull -- http://mail.python.org/mailman/listinfo/python-list

Re: problem with iteration

2007-11-04 Thread Bruno Desthuilliers
Panagiotis Atmatzidis a écrit : Hello, I managed to write some code in order to do what I wanted: Inject code in the right place, in some html files. I developed the program using small functions, one at the time in order to see how they work. When I tried to put these pieces of code

Re: how to keep order key in a dictionary

2007-11-04 Thread Bruno Desthuilliers
azrael a écrit : I 'm currenty working on a project for which it would be great to use a dictionary. At the begining I have a list of strings that should represent the keys in the dictionary. When I try to create a dictionary it rearanges the keys. For this dictionary it is realy important to

Re: how to do the mapping btw numpy arrayvalues and matrix columns

2007-11-04 Thread [EMAIL PROTECTED]
CW, thanx for the reply..but i was looking for a mapping BTW each item of a numpy.ndarray and the corresponding column of a numpy.matrix ,after some struggle :-) i came up with this #a function to return a column from a matrix def getcol(data, colindex): return data[:,colindex]#returns a

Re: python newbie

2007-11-04 Thread Paul Rubin
Bruno Desthuilliers [EMAIL PROTECTED] writes: What's wrong with: from StringIO import StringIO buf = StringIO('hello') The other functions in the module aren't available then. E.g. from random import random x = random() y = random.choice((1,2,3)) # oops --

Re: pygresql

2007-11-04 Thread JD
Apologies for essentially talking to myself out loud! I've switched back to pygresql. I think a lot of my problems were caused by not having installed postgresql-server-dev-8.2 which contains a lot of header files etc. I'm sure this was part of the problem with the psycopg modules aswell.

Re: pygresql

2007-11-04 Thread rustom
On Nov 4, 8:45 pm, JD [EMAIL PROTECTED] wrote: Hi there. I'm trying to use python with postgresql. I decided to use psycopg to interact with the postgresql server. When installing psycopg it appeared that I needed mxDateTime. So I decided to install the mxbase package. I received the

Re: Is pyparsing really a recursive descent parser?

2007-11-04 Thread Neil Cerutti
On 2007-11-04, Just Another Victim of the Ambient Morality [EMAIL PROTECTED] wrote: Consider writing a recursive decent parser by hand to parse the language '[ab]+b'. goal -- ab_list 'b' ab_list -- 'a' list_tail ab_list -- 'b' list_tail list_tail -- 'a' list_tail list_tail -- 'b'

Re: Python good for data mining?

2007-11-04 Thread paul
Jens schrieb: What about user interfaces? How easy is it to use Tkinter for developing a user interface without an IDE? And with an IDE? (which IDE?) Tkinter is easy but looks ugly (yeah folks, I know it doesn't matter in you mission critical flight control system). Apart from ActiveStates

Re: python newbie

2007-11-04 Thread Bruno Desthuilliers
Paul Rubin a écrit : Bruno Desthuilliers [EMAIL PROTECTED] writes: What's wrong with: from StringIO import StringIO buf = StringIO('hello') The other functions in the module aren't available then. E.g. from random import random x = random() y = random.choice((1,2,3)) # oops

Re: pygresql

2007-11-04 Thread Erik Jones
On Nov 4, 2007, at 9:45 AM, JD wrote: Hi there. I'm trying to use python with postgresql. I decided to use psycopg to interact with the postgresql server. When installing psycopg it appeared that I needed mxDateTime. So I decided to install the mxbase package. I received the following

Re: python newbie

2007-11-04 Thread Paul Rubin
Bruno Desthuilliers [EMAIL PROTECTED] writes: from random import random x = random() y = random.choice((1,2,3)) # oops from random import random, choice x = random() y = choice((1, 2, 3)) Really, a lot of these modules exist primarily to export a single class or function, but

Re: bsddb in python 2.5.1

2007-11-04 Thread BjornT
On Nov 4, 1:04 am, Martin v. Löwis [EMAIL PROTECTED] wrote: I know that when you upgrade Berkeley DB you're supposed to go through steps solving this problem,but I wasn't expecting an upgrade. I've tried to use different versions bsddb3, 4.4 and 4.5, (instead of bsddb that comes with

Re: Python good for data mining?

2007-11-04 Thread Bruno Desthuilliers
Jens a écrit : I'm starting a project in data mining, and I'm considering Python and Java as possible platforms. I'm conserned by performance. Most benchmarks report that Java is about 10-15 times faster than Python, Benchmarking is difficult, and most benchmarks are easily 'oriented'.

Re: Python IDE

2007-11-04 Thread Bruno Desthuilliers
Simon Pickles a écrit : Hi, I have recently moved from Windows XP to Ubuntu Gutsy. I need a Python IDE and debugger, but have yet to find one as good as Pyscripter for Windows. Can anyone recommend anything? What are you all using? I'm not sure we're all using the same solutions. As

Re: Is pyparsing really a recursive descent parser?

2007-11-04 Thread Just Another Victim of the Ambient Morality
Neil Cerutti [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On 2007-11-04, Just Another Victim of the Ambient Morality [EMAIL PROTECTED] wrote: Consider writing a recursive decent parser by hand to parse the language '[ab]+b'. goal -- ab_list 'b' ab_list -- 'a' list_tail

cgi undefined?

2007-11-04 Thread Tyler Smith
Hi, I'm trying to learn how to use python for cgi scripting. I've got apache set up on my laptop, and it appears to be working correctly. I can run a basic cgi script that just outputs a new html page, without reading in any form data, so I know that the basics are ok. But when I try and use

Re: Copy database with python..

2007-11-04 Thread Bruno Desthuilliers
Abandoned a écrit : Hi. I want to copy my database but python give me error when i use this command. cursor.execute(pg_dump mydata old.dump) What is the problem ? Could it have to do with the fact that cursor.execute expects a valid SQL query - not a bash command line ? And how can i

Re: (MAC) CoreGraphics module???

2007-11-04 Thread Robert Kern
David C. Ullrich wrote: On Fri, 02 Nov 2007 14:09:25 -0500, Robert Kern [EMAIL PROTECTED] wrote: David C. Ullrich wrote: [???] Okay, which version of OS X do you have? In 10.3 and 10.4 it used to be here:

Re: simple question on dictionary usage

2007-11-04 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : On Oct 27, 6:42 am, Karthik Gurusamy [EMAIL PROTECTED] wrote: On Oct 26, 9:29 pm, Frank Stutzman [EMAIL PROTECTED] wrote: My apologies in advance, I'm new to python Say, I have a dictionary that looks like this: record={'BAT': '14.4', 'USD': '24', 'DIF': '45',

Re: cgi undefined?

2007-11-04 Thread Bruno Desthuilliers
Tyler Smith a écrit : Hi, I'm trying to learn how to use python for cgi scripting. I've got apache set up on my laptop, and it appears to be working correctly. I can run a basic cgi script that just outputs a new html page, without reading in any form data, so I know that the basics are ok.

Re: python newbie

2007-11-04 Thread Steven D'Aprano
On Sun, 04 Nov 2007 12:05:35 -0800, Paul Rubin wrote: Bruno Desthuilliers [EMAIL PROTECTED] writes: from random import random x = random() y = random.choice((1,2,3)) # oops from random import random, choice x = random() y = choice((1, 2, 3)) Really, a lot of these modules

[ANN] Scope_Plot, another plot library for real time signals.

2007-11-04 Thread Stef Mientki
hello, I justed finished, another plot library, called Scope_Plot, based on wxPython. Scope_Plot is special meant for displaying real time signals, and therefor has some new functionalities: - signal selection - each signal has it's own scale, - moving erase block - measurement cursor ans

Re: cgi undefined?

2007-11-04 Thread Tyler Smith
On 2007-11-04, Dennis Lee Bieber [EMAIL PROTECTED] wrote: '/home/tyler/public_html/cgi-bin/cgi.py' ^^ Very simple -- you named YOUR handler cgi. So when it does import cgi it is importing itself... Of course. I knew it must be something dumb.

Re: Is pyparsing really a recursive descent parser?

2007-11-04 Thread Neil Cerutti
On 2007-11-04, Just Another Victim of the Ambient Morality [EMAIL PROTECTED] wrote: Neil Cerutti [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I believe there's no cure for the confusion you're having except for implementing a parser for your proposed grammar. Alternatively, try

Re: Low-overhead GUI toolkit for Linux w/o X11?

2007-11-04 Thread Nick Craig-Wood
Grant Edwards [EMAIL PROTECTED] wrote: I'm looking for GUI toolkits that work with directly with the Linux frambuffer (no X11). It's an embedded device with limited resources, and getting X out of the picture would be a big plus. The toolkit needs to be free and open-source. So

Re: Low-overhead GUI toolkit for Linux w/o X11?

2007-11-04 Thread Grant Edwards
On 2007-11-04, Nick Craig-Wood [EMAIL PROTECTED] wrote: So far, I've found two options that will work without X11: 1) QTopia (nee QT/Embedded). I assume that I can probably get PyQT to work with the embedded version of QT? 2) PySDL or PyGame. We did a similar project

Re: python at command prompt

2007-11-04 Thread [david]
Tim Roberts wrote: Ton van Vliet [EMAIL PROTECTED] wrote: There's could also be an issue with entering 'python' at the command line, and not 'python.exe'. Once the PATH is setup correctly, try to enter 'python.exe', and check whether that works. IMHO, to get any 'program-name' (without the

Re: __file__ vs __FILE__

2007-11-04 Thread Giampaolo Rodola'
On 3 Nov, 15:46, Gabriel Genellina [EMAIL PROTECTED] wrote: En Sat, 03 Nov 2007 10:07:10 -0300, Giampaolo Rodola' [EMAIL PROTECTED] escribió: On 3 Nov, 04:21, klenwell [EMAIL PROTECTED] wrote: In PHP you have the __FILE__ constant which gives you the value of the absolute path of the

Re: Is pyparsing really a recursive descent parser?

2007-11-04 Thread Just Another Victim of the Ambient Morality
Neil Cerutti [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On 2007-11-04, Just Another Victim of the Ambient Morality [EMAIL PROTECTED] wrote: Neil Cerutti [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I believe there's no cure for the confusion you're having except

Re: Is pyparsing really a recursive descent parser?

2007-11-04 Thread Kay Schluehr
On Nov 4, 10:44 pm, Just Another Victim of the Ambient Morality [EMAIL PROTECTED] I believe there is a cure and it's called recursive descent parsing. It's slow, obviously, but it's correct and, sometimes (arguably, often), that's more important the execution speed. Recursive decendent

Re: Is pyparsing really a recursive descent parser?

2007-11-04 Thread Just Another Victim of the Ambient Morality
Kay Schluehr [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Nov 4, 10:44 pm, Just Another Victim of the Ambient Morality [EMAIL PROTECTED] I believe there is a cure and it's called recursive descent parsing. It's slow, obviously, but it's correct and, sometimes (arguably,

Re: Is pyparsing really a recursive descent parser?

2007-11-04 Thread Neil Cerutti
On 2007-11-05, Just Another Victim of the Ambient Morality [EMAIL PROTECTED] wrote: Neil Cerutti [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On 2007-11-04, Just Another Victim of the Ambient Morality [EMAIL PROTECTED] wrote: Neil Cerutti [EMAIL PROTECTED] wrote in message

Re: IDLE

2007-11-04 Thread Russ P.
On Nov 3, 1:43 am, [EMAIL PROTECTED] wrote: Just curious: What makes you wish to move from emacs to idle? I don't necessarily want to move from xemacs to idle. I'm just getting tired of using print statements to debug, and I figure I'm well past the stage where I should still be doing that. If I

Re: Is pyparsing really a recursive descent parser?

2007-11-04 Thread Neil Cerutti
On 2007-11-05, Just Another Victim of the Ambient Morality [EMAIL PROTECTED] wrote: Kay Schluehr [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Nov 4, 10:44 pm, Just Another Victim of the Ambient Morality [EMAIL PROTECTED] I believe there is a cure and it's called recursive

Re: Is pyparsing really a recursive descent parser?

2007-11-04 Thread Neil Cerutti
On 2007-11-05, Neil Cerutti [EMAIL PROTECTED] wrote: def Ack(x, y): The Ackermann function. Creates a humongous mess even with quite tiny numbers. if x 0 or y 0: raise ValueError('non-negative integer') elif x == 0: return y + 1 elif y == 0:

Re: IDLE

2007-11-04 Thread Russ P.
Thanks for the information on IDLE. As for your question, I couldn't quite understand what you're trying to do. In general, you can have the script use os.chdir() to go to the relevant directory and then open() the file, or you can use open() directly with a relative/full path to it. (This

Re: Python good for data mining?

2007-11-04 Thread D.Hering
On Nov 3, 9:02 pm, Jens [EMAIL PROTECTED] wrote: I'm starting a project indatamining, and I'm considering Python and Java as possible platforms. I'm conserned by performance. Most benchmarks report that Java is about 10-15 times faster than Python, and my own experiments confirms this. I

Re: Is pyparsing really a recursive descent parser?

2007-11-04 Thread Just Another Victim of the Ambient Morality
Neil Cerutti [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On 2007-11-05, Just Another Victim of the Ambient Morality [EMAIL PROTECTED] wrote: Kay Schluehr [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Nov 4, 10:44 pm, Just Another Victim of the Ambient Morality

Funny quote

2007-11-04 Thread John Salerno
Hi all. Thought you might get a kick out of this if you haven't heard it before. I have to admit, not being either, I don't quite fully understand it, but intuitively I do. :) --- André Bensoussan once explained to me the difference between a programmer and a designer: If you make

Re: bsddb in python 2.5.1

2007-11-04 Thread Martin v. Löwis
I have two versions of bsddb3 installed (only one is active) this is from /usr/lib/python2.5/site-packages: drwxr-xr-x 3 root root 4096 2007-11-03 15:01 bsddb3 -rw-r--r-- 1 root root905 2007-11-03 15:39 bsddb3-4.4.2.egg-info -rw-r--r-- 1 root root905 2007-11-03 15:49

achieving performance using C/C++

2007-11-04 Thread sandipm
I did fair amount of programming in python but never used c/c++ as mentioned below. any good tutorials for using C/C++ to optimize python codebase for performance? how widely do they use such kind of mixed coding practices? sandip -- Forwarded message -- From: D.Hering . . . .

Re: opinion - file.readlines blemish

2007-11-04 Thread Gabriel Genellina
En Sat, 03 Nov 2007 15:00:46 -0300, Ken Seehart [EMAIL PROTECTED] escribi�: *newlines* If Python was built with the *---with-universal-newlines* option to *configure* (the default) this read-only attribute exists, and for files opened in universal newline read mode it keeps

PyObjC with Xcode 3.0 Leopard

2007-11-04 Thread flyfree
I got an error during making a python application with xcode 3.0 in OS X Leopard. (KeyError: 'NSUnknownKeyException - [NSObject 0xd52fe0 valueForUndefinedKey:]: this class is not key value coding-compliant for the key calculatedMean.') The application is a simple example of how to use the PyObjC

Descriptors and side effects

2007-11-04 Thread mrkafk
Hello everyone, I'm trying to do seemingly trivial thing with descriptors: have another attribute updated on dot access in object defined using descriptors. For example, let's take a simple example where you set an attribute s to a string and have another attribute l set automatically to its

Re: Is pyparsing really a recursive descent parser?

2007-11-04 Thread Kay Schluehr
On Nov 5, 3:05 am, Just Another Victim of the Ambient Morality [EMAIL PROTECTED] wrote: Kay Schluehr [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Nov 4, 10:44 pm, Just Another Victim of the Ambient Morality [EMAIL PROTECTED] I believe there is a cure and it's called

[issue1377] test_import breaks on Linux

2007-11-04 Thread Christian Heimes
Christian Heimes added the comment: I'm going to disable the test for now. -- keywords: +py3k resolution: - accepted superseder: - Crash on Windows if Python runs from a directory with umlauts __ Tracker [EMAIL PROTECTED]

[issue1342] Crash on Windows if Python runs from a directory with umlauts

2007-11-04 Thread Christian Heimes
Christian Heimes added the comment: I've checked in part of the patch in r58837. It doesn't solve the problem but at least it prevents Python from seg faulting on Windows. -- keywords: +py3k, rfe priority: - high resolution: - accepted __ Tracker

[issue1379] reloading imported modules sometimes fail with 'parent not in sys.modules' error

2007-11-04 Thread Paul Pogonyshev
Paul Pogonyshev added the comment: Thank you for the commit. I just had a problem with my package, and since I was not sure if it was a bug in Py3k or the package, I went to debugging the former and found this. I just didn't know how to work with Unicode strings properly.

[issue1772916] xmlrpclib crash when PyXML installed - sgmlop is available

2007-11-04 Thread Grzegorz Makarewicz
Grzegorz Makarewicz added the comment: Minimalistic test crash (python 2.5 cvs, sgmlop cvs(pyxml)) - compiled with msvc 2005, where after 10 loops ms-debugger is invoked: data='''\ ?xml version=1.0? methodCall methodNamemws.ScannerLogout/methodName params param value i47/i4

[issue1378] fromfd() and dup() for _socket on WIndows

2007-11-04 Thread roudkerk
Changes by roudkerk: -- versions: +Python 2.6 -Python 2.5 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1378 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue1210] imaplib does not run under Python 3

2007-11-04 Thread Christian Heimes
Changes by Christian Heimes: -- keywords: +py3k priority: - normal resolution: - accepted __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1210 __ ___ Python-bugs-list

[issue1381] cmath is numerically unsound

2007-11-04 Thread Mark Dickinson
Mark Dickinson added the comment: I took a look at this a while back, and got as far as writing a pure Python drop-in replacement for cmath, based on Kahan's branch cuts for elementary functions paper. This fixes a variety of problems in cmath, including the buggy branch cuts for asinh.

[issue1382] py3k-pep3137: patch for test_ctypes

2007-11-04 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc: This patch corrects test_ctypes in the py3k-pep3137 branch. Replacing PyBytes_* by PyString_* was 99% of the task. Also had to modify binascii, which used to return buffers instead of bytes strings. Tested on winXP. -- components: Tests files:

[issue1744580] cvs.get_dialect() return a class object

2007-11-04 Thread Skip Montanaro
Skip Montanaro added the comment: I changed the documentation for 2.5 and 2.6 to reflect the change in semantics. r58840 and r58841. Have a look and let me know if that looks reasonable. -- status: open - pending title: cvs.get_dialect() return a class object - cvs.get_dialect()

[issue1431091] CSV Sniffer fails to report mismatch of column counts

2007-11-04 Thread Skip Montanaro
Skip Montanaro added the comment: This appears to work better in 2.5 and 2.6 (it doesn't crash, though it gets the delimiter wrong) but does indeed fail in 2.4. -- nosy: +skip.montanaro _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1431091

[issue1382] py3k-pep3137: patch for test_ctypes

2007-11-04 Thread Christian Heimes
Christian Heimes added the comment: Applied in r58843. Thank you very much! -- keywords: +patch, py3k resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1382 __

[issue1378] fromfd() and dup() for _socket on WIndows

2007-11-04 Thread Guido van Rossum
Changes by Guido van Rossum: -- nosy: +gvanrossum __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1378 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue1381] cmath is numerically unsound

2007-11-04 Thread Martin v. Löwis
Martin v. Löwis added the comment: It would be ok if a test is only run on a system with IEEE floats, and skipped elsewhere. For all practical purposes, Python assumes that all systems have IEEE float. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1381

[issue1384] Windows fix for inspect tests

2007-11-04 Thread Christian Heimes
New submission from Christian Heimes: The patch lower()s the file names on Windows. The tests break on my system because C:\\... != c:\\... -- files: py3k_inspect.patch keywords: patch, py3k messages: 57105 nosy: tiran severity: normal status: open title: Windows fix for inspect tests

[issue1385] hmac module violates RFC for some hash functions, e.g. sha512

2007-11-04 Thread Joachim Wagner
New submission from Joachim Wagner: (First time submitting a patch to this system.) The hmac module uses a fixed blocksize of 64 bytes. This is fine for many hash functions like md5, sha1 and sha256, but not for sha512 or in the general case. The RFC referenced in the python documentation

[issue1383] Backport abcoll to 2.6

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

[issue1385] hmac module violates RFC for some hash functions, e.g. sha512

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

[issue1383] Backport abcoll to 2.6

2007-11-04 Thread Georg Brandl
Georg Brandl added the comment: Is this a successor or a companion to #1026? -- nosy: +georg.brandl __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1383 __ ___

[issue1383] Backport abcoll to 2.6

2007-11-04 Thread Benjamin Aranguren
Benjamin Aranguren added the comment: This is a companion to #1026. On 11/4/07, Georg Brandl [EMAIL PROTECTED] wrote: Georg Brandl added the comment: Is this a successor or a companion to #1026? -- nosy: +georg.brandl __ Tracker [EMAIL

[issue1386] py3k-pep3137: patch to ensure that all codecs return bytes

2007-11-04 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc: Most codecs return buffer objects, when the rule is now to return bytes. This patch adds a test, and corrects failing codecs. (more PyBytes_* - PyString_* replacements) -- components: Unicode files: codecs.diff messages: 57109 nosy:

[issue1387] py3k-pep3137: patch for hashlib on Windows

2007-11-04 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc: On Windows, openssl is not always available, in this case python uses its own implementation of md5, sha1 co. This patch correct the failing tests (test_hashlib and test_uuid), by returning bytes instead of buffers. -- components: Windows files:

[issue1386] py3k-pep3137: patch to ensure that all codecs return bytes

2007-11-04 Thread Christian Heimes
Christian Heimes added the comment: Applied in r58848. Thanks for removing the annoying warnings! A small request: Please use self.assert_() and its friends instead of assert() in unit tests. -- keywords: +patch, py3k resolution: - fixed status: open - closed

[issue1387] py3k-pep3137: patch for hashlib on Windows

2007-11-04 Thread Christian Heimes
Christian Heimes added the comment: Thanks! Applied in r58847. -- keywords: +patch, py3k resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1387 __

  1   2   >