Re: Sorting strings containing special characters (german 'Umlaute')

2007-03-04 Thread Jussi Salmela
Robin Becker kirjoitti: Björn, in one of our projects we are sorting in javascript in several languages English, German, Scandinavian languages, Japanese; from somewhere (I cannot actually remember) we got this sort spelling function for scandic languages a .replace(/\u00C4/g,'A~')

Re: How to set docstrings for extensions supporting PyNumberMethods?

2007-03-04 Thread Ziga Seilnacht
Nick Alexander wrote: Hello, I am writing a python extension (compiled C code) that defines an extension type with PyNumberMethods. Everything works swimmingly, except I can't deduce a clean way to set the docstring for tp_* methods. That is, I always have type.__long__.__doc__ ==

Re: thread safe SMTP module

2007-03-04 Thread Gordon Messmer
Aahz wrote: That doesn't make any sense. Blocking I/O generally releases the GIL, which is the whole reason Python doesn't totally suck for threading. Nevertheless, among the caveats listed at http://docs.python.org/lib/module-thread.html is: Not all built-in functions that may block

Yet another string interpolation function...

2007-03-04 Thread MonkeeSage
There are several string interpolation functions, as well as string.Template. But here's yet another. This one emulates ruby's inline interpolation syntax (using #{}), which interpolates strings as well as expressions. NB. It uses eval(), so only use it in trusted contexts! import sys, re def

Re: pop method question

2007-03-04 Thread Hendrik van Rooyen
Alex Martelli [EMAIL PROTECTED] wrote: Raymond Hettinger [EMAIL PROTECTED] wrote: ... The notion that pop is only defined for stack operations is somewhat pedantic. Worse: it's totally wrong. It's also defined for eyes, as a musical genre, as a kind of soda, as an avant-garde

Re: portable Python ifconfig

2007-03-04 Thread Bart Van Loon
It was Sun, 4 Mar 2007 02:38:58 +0500, when Bart Van Loon wrote: Hi all, I'm looking for a portable (FreeBSD and Linux) way of getting typical ifconfig information into Python. After lots of trial and error (I'm proficient in C at all), I puzzled togehter the following. It works (at least on

Re: portable Python ifconfig

2007-03-04 Thread Bart Van Loon
It was Sun, 4 Mar 2007 14:09:20 +0500, when Bart Van Loon wrote: It was Sun, 4 Mar 2007 02:38:58 +0500, when Bart Van Loon wrote: Hi all, I'm looking for a portable (FreeBSD and Linux) way of getting typical ifconfig information into Python. After lots of trial and error (I'm proficient in

Re: Python FTP server down

2007-03-04 Thread Christian Joergensen
John Nagle [EMAIL PROTECTED] writes: ftp://ftp.python.org/pub/; is returning Connection Refused today. True. I need FTP access to download onto a colocated server. Is HTTP firewalled? If you have SSH-access, you could just do the HTTP download at your workstation and scp/sftp it to the

Re: pop method question

2007-03-04 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], Nicholas Parsons wrote: Just from my computer science background when I see pop(), I think of a stack data structure. Then question your presumptions. There are also many people thinking `list` must be something with nodes and pointers when they see the interface and

Where I could find older python releases ?

2007-03-04 Thread 13
Hello list, I have been searching the internet for python version 0.9.0 sources which had been posted to alt.sources list, but without any luck. Maybe someone has it available somewhere ? Thanks, Martins -- http://mail.python.org/mailman/listinfo/python-list

multiple content-types break cgi.py

2007-03-04 Thread Janto Dreijer
Hi! The Nokia Java SDK allows one to define multiple content-types in a single HTTP header field. I'm not sure if it's standard, but it's happening from some Java-enabled phones. This breaks the FieldStorage class in cgi.py by not causing self.read_urlencoded() to be called at object init.

Re: multiple content-types break cgi.py

2007-03-04 Thread Jon Ribbens
In article [EMAIL PROTECTED], Janto Dreijer wrote: The Nokia Java SDK allows one to define multiple content-types in a single HTTP header field. I'm not sure if it's standard, but it's happening from some Java-enabled phones. The only reference to this bug I can find dates back to 1999:

Re: *** CANADIAN ANTI-TERROR LAW HAS BEEN STRUCK DOWN BY ITS HONORABLE SUPREME COURT UNANIMOUSLY *** (REPOST)

2007-03-04 Thread Aviroce
On Feb 24, 11:22 am, [EMAIL PROTECTED] wrote: Canada anti-terror law is struck downFrom the Associated Press February 24, 2007 OTTAWA - Canada's Supreme Court on Friday unanimously declared it unconstitutional to detain foreign terrorism suspects indefinitely while the courts review their

Re: Python 2.5 incompatible with Fedora Core 6 - packaging problems again

2007-03-04 Thread Troy Melhase
[snip] So what's going on? We've run into a conflict between an assumption of Python and of the Plesk control panel. Plesk doesn't let the user create files in their own home directory. This installer assumes it can. Oops. (Plesk sets up a very locked down environment, which is a good

SAMBA-PYTHON ???

2007-03-04 Thread WEBER Sébastien
Hello, (I'm french and I speak english like a spanish cow : sorry.) Does someone know how to use the samba-python tdb.so module ? I've been looking for information about this on Google for 3 days and I've found not a word. The only functions I can use are 'open()' and 'first_key()' : not enough.

Re: multiple content-types break cgi.py

2007-03-04 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], Jon Ribbens wrote: It's not a bug - sending multiple content-types is just totally broken. What would such a header even be supposed to mean? It's like saying this is an apple orange. And the correct header for such a beast would be this is an iOrange of course. ;-)

Re: *** CANADIAN ANTI-TERROR LAW HAS BEEN STRUCK DOWN BY ITS HONORABLE SUPREME COURT UNANIMOUSLY *** (REPOST)

2007-03-04 Thread Aviroce
On Feb 24, 11:22 am, [EMAIL PROTECTED] wrote: Canada anti-terror law is struck downFrom the Associated Press February 24, 2007 OTTAWA - Canada's Supreme Court on Friday unanimously declared it unconstitutional to detain foreign terrorism suspects indefinitely while the courts review their

RSS feed creator

2007-03-04 Thread Florian Lindner
Hello, I'm looking for a python library that creates a RSS and/or Atom feed. E.g. I give a list like that: [ [title1, short desc1, author1], [title2, short desc2, author2], ] and the library creates a valid feed XML file. (return as a string) Thanks, Florian --

Re: class attrdict

2007-03-04 Thread goodwolf
On Mar 3, 4:25 am, [EMAIL PROTECTED] (Alex Martelli) wrote: Hallvard B Furuseth [EMAIL PROTECTED] wrote: Does this class need anything more? Is there any risk of a lookup loop? Seems to work... class attrdict(dict): Dict where d['foo'] also can be accessed as d.foo def

Re: Python 2.5 incompatible with Fedora Core 6 - packaging problems again

2007-03-04 Thread Patrick Useldinger
http://www.serpentine.com/blog/2006/12/22/how-to-build-safe-clean-python-25-rpms-for-fedora-core-6/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.5 incompatible with Fedora Core 6 - packaging problems again

2007-03-04 Thread Jorge Godoy
Troy Melhase [EMAIL PROTECTED] writes: You're trying to install a package without using the package management tools provided by your system, you haven't read the docs (or at least all of them), you show a general lack of understanding of the different responsibilities in the free/open source

Re: html sql client

2007-03-04 Thread gert
http://sourceforge.net/projects/dfo/ Added some firefox2 ajax technologies to it and made it xhtml 1.1 valid :) -- http://mail.python.org/mailman/listinfo/python-list

Re: SAMBA-PYTHON ???

2007-03-04 Thread Jorge Godoy
WEBER Sébastien [EMAIL PROTECTED] writes: (I'm french and I speak english like a spanish cow : sorry.) (Shouldn't it be French cow? Or you're more fluent in Spanish? ;-)) Does someone know how to use the samba-python tdb.so module ? I've been looking for information about this on Google for

Re: pop method question

2007-03-04 Thread Nicholas Parsons
Hi Jordan, That is true what you say about pop() behavior with stack-like objects. But the definition of pop() for a stack-like structure is stronger than that. A stack is a LIFO data structure. Therefore the pop() operation is defined to not only mutate the receiver and return the

Re: Python 3.0 unfit for serious work?

2007-03-04 Thread Jay Tee
Hey, Python 3.x. I believe your fear is just a knee jerk reaction to the notion that there will be some stated incompatibilities between 2.x and 3.x without having done any investigation of the transition process. Nobody is forcing you to do anything right now or completely abandon your

Re: pop method question

2007-03-04 Thread Nicholas Parsons
On Mar 4, 2007, at 4:38 AM, Marc 'BlackJack' Rintsch wrote: In [EMAIL PROTECTED], Nicholas Parsons wrote: Just from my computer science background when I see pop(), I think of a stack data structure. Then question your presumptions. There are also many people thinking `list` must be

transfer data from one machine to another

2007-03-04 Thread bahoo
Hi, I have ssh access to two linux machines (both WITHOUT root account), and I'd like to copy data from one to another. Since the directory structure is different, I want to specify in a script (ideally in python, because that's what I want to learn) what to copy over like this: source:

Re: transfer data from one machine to another

2007-03-04 Thread Bjoern Schliessmann
bahoo wrote: I have ssh access to two linux machines (both WITHOUT root account), and I'd like to copy data from one to another. Since the directory structure is different, I want to specify in a script (ideally in python, because that's what I want to learn) what to copy over like this:

Re: class attrdict

2007-03-04 Thread goodwolf
On Mar 4, 1:03 pm, goodwolf [EMAIL PROTECTED] wrote: On Mar 3, 4:25 am, [EMAIL PROTECTED] (Alex Martelli) wrote: Hallvard B Furuseth [EMAIL PROTECTED] wrote: Does this class need anything more? Is there any risk of a lookup loop? Seems to work... class attrdict(dict):

Re: Converting a c array to python list

2007-03-04 Thread zefciu
Dennis Lee Bieber wrote: Written properly, all it returns is the address of that array data -- there is no massive copying of data.. I know :) That's why I want to know how to write it properly. zefciu -- http://mail.python.org/mailman/listinfo/python-list

Re: Where I could find older python releases ?

2007-03-04 Thread Adam
On Mar 4, 9:52 am, 13 [EMAIL PROTECTED] wrote: Hello list, I have been searching the internet for python version 0.9.0 sources which had been posted to alt.sources list, but without any luck. Maybe someone has it available somewhere ? Thanks, Martins http://www.python.org/download/ --

Re: pop method question

2007-03-04 Thread Steven D'Aprano
On Sun, 04 Mar 2007 07:36:50 -0500, Nicholas Parsons wrote: Hi Jordan, That is true what you say about pop() behavior with stack-like objects. But the definition of pop() for a stack-like structure is stronger than that. That's okay, we're not talking about pop for stack-like

Re: Where I could find older python releases ?

2007-03-04 Thread Adam
Sorry jumped the gun a little there. Is this what you are looking for? http://codespeak.net/download/py/py-0.9.0.zip -- http://mail.python.org/mailman/listinfo/python-list

Hey! A VERY c00l feature of X and mplayer(could bind to PyQt4)

2007-03-04 Thread Marco
I found a Very c00l feature, that you can write your own MPlayer GUI. The core is Xembed (http://www.freedesktop.org/wiki/Standards/xembed-spec) And Of course MPlayer support it as its para: -wid I hope you like it! -- LinuX Power -- http://mail.python.org/mailman/listinfo/python-list

IDLE MySQLdb import error

2007-03-04 Thread Michael Boldin via alt email
I installed python 2.5 and used the win package for installing MySQLdb. (I am running Windows XP) Everything works as expected using python directly (Windows command shell) but using IDLE gives the import error below. Same error with PythonWin as my IDE and everything works using python 2.4--

Re: *** CANADIAN ANTI-TERROR LAW HAS BEEN STRUCK DOWN BY ITS HONORABLE SUPREME COURT UNANIMOUSLY *** (REPOST)

2007-03-04 Thread Aviroce
On Feb 24, 11:22 am, [EMAIL PROTECTED] wrote: Canada anti-terror law is struck downFrom the Associated Press February 24, 2007 OTTAWA - Canada's Supreme Court on Friday unanimously declared it unconstitutional to detain foreign terrorism suspects indefinitely while the courts review their

Re: Where I could find older python releases ?

2007-03-04 Thread Daniel Nogradi
Sorry jumped the gun a little there. Is this what you are looking for? http://codespeak.net/download/py/py-0.9.0.zip Probably not, the OP is looking for a python distribution, what you are posting is a third party package *for* python and is actually a part of the pypy project. --

Re: transfer data from one machine to another

2007-03-04 Thread Rikishi 42
On Sunday 04 March 2007 13:56, bahoo wrote: I have ssh access to two linux machines (both WITHOUT root account), and I'd like to copy data from one to another. Since the directory structure is different, I want to specify in a script (ideally in python, because that's what I want to learn)

Re: RSS feed creator

2007-03-04 Thread Jeff McNeil
What about this? http://www.dalkescientific.com/Python/PyRSS2Gen.html On 3/4/07, Florian Lindner [EMAIL PROTECTED] wrote: Hello, I'm looking for a python library that creates a RSS and/or Atom feed. E.g. I give a list like that: [ [title1, short desc1, author1], [title2, short desc2,

Re: class attrdict

2007-03-04 Thread Alex Martelli
goodwolf [EMAIL PROTECTED] wrote: ... Then you will prefer something like this: class Namespace(object): def __init__(self, __ns={}, **kwargs): if kwargs: __ns.update(kwargs) self.__dict__ = __ns I might, if it weren't for the redundant if and the horribly buggy

Re: *** CANADIAN ANTI-TERROR LAW HAS BEEN STRUCK DOWN BY ITS HONORABLE SUPREME COURT UNANIMOUSLY *** (REPOST)

2007-03-04 Thread Aviroce
On Feb 24, 11:22 am, [EMAIL PROTECTED] wrote: Canada anti-terror law is struck downFrom the Associated Press February 24, 2007 OTTAWA - Canada's Supreme Court on Friday unanimously declared it unconstitutional to detain foreign terrorism suspects indefinitely while the courts review their

Re: design question: no new attributes

2007-03-04 Thread Arnaud Delobelle
On Feb 26, 9:48 pm, Alan Isaac [EMAIL PROTECTED] wrote: I have a class whose instances should only receive attribute assignments for attributes that were created at inititialization. If slots are not appropriate, what is the Pythonic design for this? Hi ! Even though a lot of people have

Re: Python 2.5 incompatible with Fedora Core 6 - packaging problems again

2007-03-04 Thread John Nagle
Patrick Useldinger wrote: http://www.serpentine.com/blog/2006/12/22/how-to-build-safe-clean-python-25-rpms-for-fedora-core-6/ I've read that. It's very funny. Now you’ll need to go into the SOURCES directory and frob a single file... It does have something very useful in it - Python's

How use XML parsing tools on this one specific URL?

2007-03-04 Thread [EMAIL PROTECTED]
I understand that the web is full of ill-formed XHTML web pages but this is Microsoft: http://moneycentral.msn.com/companyreport?Symbol=BBBY I can't validate it and xml.minidom.dom.parseString won't work on it. If this was just some teenager's web site I'd move on. Is there any hope avoiding

Re: Python 2.5 incompatible with Fedora Core 6 - packaging problems again

2007-03-04 Thread skip
John If a Python build needs all that, something in ./configure should John be checking for each of those. After all, that's what ./configure John is supposed to be for. It looks like a Python install will plow John ahead without ncurses-devel, and install a dud version. As

Re: How use XML parsing tools on this one specific URL?

2007-03-04 Thread skip
Chris http://moneycentral.msn.com/companyreport?Symbol=BBBY Chris I can't validate it and xml.minidom.dom.parseString won't work on Chris it. Chris If this was just some teenager's web site I'd move on. Is there Chris any hope avoiding regular expression hacks to extract

Re: How use XML parsing tools on this one specific URL?

2007-03-04 Thread Jorge Godoy
[EMAIL PROTECTED] [EMAIL PROTECTED] writes: I understand that the web is full of ill-formed XHTML web pages but this is Microsoft: Yes... And Microsoft is responsible for a lot of the ill-formed pages on the web be it on their website or made by their applications.

Re: Randomizing in Python

2007-03-04 Thread [EMAIL PROTECTED]
On Mar 3, 1:56 pm, Mark Nenadov [EMAIL PROTECTED] wrote: On Sat, 03 Mar 2007 08:46:09 -0800, [EMAIL PROTECTED] wrote: I want to randomize a certain calculation in Python but haven't figured it out yet. To explain what i mean, I' m going to use an example: I

Re: Non Sequitur

2007-03-04 Thread Aahz
In article [EMAIL PROTECTED], Ben Finney [EMAIL PROTECTED] wrote: Dennis Lee Bieber [EMAIL PROTECTED] writes: I before E Except after C Or when sounded as A As in Neighbor and Weigh Yes, like the A sound in weird or ceiling.

Re: Python 2.5 incompatible with Fedora Core 6 - packaging problems again

2007-03-04 Thread John Nagle
[EMAIL PROTECTED] wrote: The distutils setup.py script checks for ncurses bits No, it just plows on after compiler errors. As another person pointed out, you're conflating Python proper with a specific Linux distribution's packaging techniques. Exactly. As I've pointed out before,

Re: class attrdict

2007-03-04 Thread goodwolf
class Namespace(object): def __init__(self, __ns=None, **kwargs): if __ns is None:#if no dictionary is given self.__dict__ = kwargs #then use kwargs without copying or creating new dict else: assert len(kwargs) == 0 self.__dict__

Re: Where I could find older python releases ?

2007-03-04 Thread skip
Martins I have been searching the internet for python version 0.9.0 Martins sources which had been posted to alt.sources list, but without Martins any luck. Maybe someone has it available somewhere ? If you *really* want Python 0.9.0 and not PyPy 0.9.0, I think you're going to have

doxygen

2007-03-04 Thread Jan Danielsson
Hello all, I guess I should really be asking in some doxygen mailing list, but since I believe that I found doxygen through this group, I assume that there are some people here who can answer. When I run doxygen on my python files, it does document classes, but not standalone functions.

Re: Python 2.5, problems reading large ( 4Gbyes) files on win2k

2007-03-04 Thread Paul Duffy
Bill Tydeman wrote: Just curious, but since the file size limitation on NTFS is 4 GB, have you confirmed that it isn't some other part of the interaction that is causing the problem? What FS is hosting the files? I don't think that is correct. Groovy version of app runs just fine. On 2

Re: thread safe SMTP module

2007-03-04 Thread Aahz
In article [EMAIL PROTECTED], Gordon Messmer [EMAIL PROTECTED] wrote: Aahz wrote: That doesn't make any sense. Blocking I/O generally releases the GIL, which is the whole reason Python doesn't totally suck for threading. Nevertheless, among the caveats listed at

Re: How use XML parsing tools on this one specific URL?

2007-03-04 Thread Nikita the Spider
In article [EMAIL PROTECTED], [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I understand that the web is full of ill-formed XHTML web pages but this is Microsoft: http://moneycentral.msn.com/companyreport?Symbol=BBBY I can't validate it and xml.minidom.dom.parseString won't work on it.

Re: How use XML parsing tools on this one specific URL?

2007-03-04 Thread Paul Boddie
[EMAIL PROTECTED] wrote: I understand that the web is full of ill-formed XHTML web pages but this is Microsoft: http://moneycentral.msn.com/companyreport?Symbol=BBBY Yes, thank you Microsoft! I can't validate it and xml.minidom.dom.parseString won't work on it. If this was just some

looking for Java final/Ruby freeze functionality in Python

2007-03-04 Thread Antoine De Groote
Hello, I've been googling for quite a while now but can't find anything about a function/keyword to make a list (or something else) immutable. Could anybody point me to docs about this matter or give me a reason why this (apparently) doesn't exist in Python? Kind regards, antoine --

When will 2.5.1 be released?

2007-03-04 Thread Nile
This is not a big deal but I would like to use Tix with 2.5. My understanding is this bug will be fixed in the 2.5.1 release. Does anyone know when this will be out ? What is the best guess? Thanks, Nile -- http://mail.python.org/mailman/listinfo/python-list

Re: looking for Java final/Ruby freeze functionality in Python

2007-03-04 Thread Bart Van Loon
It was Sun, 04 Mar 2007 20:38:16 +0100, when Antoine De Groote wrote: Hello, I've been googling for quite a while now but can't find anything about a function/keyword to make a list (or something else) immutable. Could anybody point me to docs about this matter or give me a reason why this

Re: Python 2.5 incompatible with Fedora Core 6 - packaging problems again

2007-03-04 Thread MonkeeSage
On Mar 4, 12:03 pm, John Nagle [EMAIL PROTECTED] wrote: Exactly. As I've pointed out before, Python doesn't play well with others. The Python developers pass the buck to the Linux packager, the Linux packager passes the buck to the Python developers, and thus the user experience sucks.

Re: looking for Java final/Ruby freeze functionality in Python

2007-03-04 Thread Arnaud Delobelle
On Mar 4, 7:38 pm, Antoine De Groote [EMAIL PROTECTED] wrote: Hello, I've been googling for quite a while now but can't find anything about a function/keyword to make a list (or something else) immutable. Could anybody point me to docs about this matter or give me a reason why this

Re: Python 2.5 incompatible with Fedora Core 6 - packaging problems again

2007-03-04 Thread Paul Boddie
John Nagle wrote: I've been installing Python and its supporting packages on a dedicated server with Fedora Core 6 for about a day now. This is a standard dedicated rackmount server in a colocation facility, controlled via Plesk control panel, and turned over to me with Fedora Core 6 in an

Re: thread safe SMTP module

2007-03-04 Thread Gordon Messmer
Aahz wrote: Assuming you have correctly tracked down the problem area, I would call that a thread bug in Python. But my experience is that you simply have run into a problem with the socket. I would suggest that using socket.setdefaulttimeout() would work just as well. I believe that

Re: multiple content-types break cgi.py

2007-03-04 Thread Janto Dreijer
On Mar 4, 12:29 pm, Jon Ribbens [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED], Janto Dreijer wrote: The Nokia Java SDK allows one to define multiple content-types in a single HTTP header field. I'm not sure if it's standard, but it's happening from some Java-enabled phones. The

Re: Perl and Python, a practical side-by-side example.

2007-03-04 Thread Bruno Desthuilliers
John Machin a écrit : On Mar 3, 12:36 pm, Bruno Desthuilliers [snip] DATE = 5 TARGET = 6 [snip] Now for the bad news: I'm afraid your algorithm is broken : here are my test data and results: input = [ #ID STATE ... ... ... TARG DATE

list-like behaviour of etree.Element

2007-03-04 Thread Daniel Nogradi
The etree.Element (or ElementTree.Element) supports a number of list-like methods: append, insert, remove. Any special reason why it doesn't support pop and extend (and maybe count)? -- http://mail.python.org/mailman/listinfo/python-list

Re: Perl and Python, a practical side-by-side example.

2007-03-04 Thread Bruno Desthuilliers
Bjoern Schliessmann a écrit : Bruno Desthuilliers wrote: Shawn Milo a écrit : if recs.has_key(piid) is False: 'is' is the identity operator - practically, in CPython, it compares memory addresses. You *dont* want to use it here. It's recommended to use is None; why not is False?

Re: looking for Java final/Ruby freeze functionality in Python

2007-03-04 Thread Antoine De Groote
yes thanks, that is quite what I was looking for. Arnaud Delobelle wrote: On Mar 4, 7:38 pm, Antoine De Groote [EMAIL PROTECTED] wrote: Hello, I've been googling for quite a while now but can't find anything about a function/keyword to make a list (or something else) immutable. Could

Alternatives for Extracting EXIF and JPEG Data from Images

2007-03-04 Thread Roger
Does anybody have a pointer to a Python library/utility that will extract the chrominance and luminance quantization tables from JPG images? I have been using the _getexif method from PIL, which works fine, but doesn't extract the quantization data. I am a bit fuzzy on the terminology, but

Re: doxygen

2007-03-04 Thread Mike Kent
On Mar 4, 1:15 pm, Jan Danielsson [EMAIL PROTECTED] wrote: When I run doxygen on my python files, it does document classes, but not standalone functions. Look in the doxygen config file for your python project, named 'Doxyfile', for the config setting 'EXTRACT_ALL', and read the comments

Re: Perl and Python, a practical side-by-side example.

2007-03-04 Thread Bruno Desthuilliers
Shawn Milo a écrit : (snip) The script reads a file from standard input and finds the best record for each unique ID (piid). The best is defined as follows: The newest expiration date (field 5) for the record with the state (field 1) which matches the desired state (field 6). If there is no

identifying modules to be built and not

2007-03-04 Thread skip
The thread John Nagle started about building Python 2.5 on Fedora Core 6 led me to implement a slight change to Python's setup.py. You clearly can't have the build stop if the bits needed to build a particular module aren't found or if compiling a module fails, but it's fairly straightforward to

Re: Perl and Python, a practical side-by-side example.

2007-03-04 Thread Peter Otten
Bruno Desthuilliers wrote: print output, sorted(decorated_lines, reverse=True)[0][1] Or just print output, max(decorated_lines)[1] Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Perl and Python, a practical side-by-side example.

2007-03-04 Thread Bruno Desthuilliers
Peter Otten a écrit : Bruno Desthuilliers wrote: print output, sorted(decorated_lines, reverse=True)[0][1] Or just print output, max(decorated_lines)[1] Good point. More explicit, and a bit faster too. Thanks Peter. --

Re: Python 2.5 incompatible with Fedora Core 6 - packaging problems again

2007-03-04 Thread Paul Boddie
MonkeeSage wrote: The configure script checks for libraries and headers that are required for a base build, and (according to the options passed to configure, or using the defaults) optional components. There is NO WAY for it to know which PACKAGES, on any of the 500 linux distributions,

Re: multiple content-types break cgi.py

2007-03-04 Thread Jon Ribbens
In article [EMAIL PROTECTED], Janto Dreijer wrote: It's not a bug - sending multiple content-types is just totally broken. What would such a header even be supposed to mean? It's like saying this is an apple orange. Hmmm. Thanks! I suspected as much. Rough inspection suggests that calling

MS SQL Database connection

2007-03-04 Thread Hitesh
Hi currently I am using DNS and ODBC to connect to MS SQL database. Is there any other non-dns way to connect? If I want to run my script from different server I first have to create the DNS in win2k3. Thank you, hj -- http://mail.python.org/mailman/listinfo/python-list

Snack -- Help

2007-03-04 Thread v.davis2
Is anyone out there knowledgeable about using the Snack tool under Windows? Once I try to get beyond the simple provided examples I run out of reference material. Thanks, Vic -- http://mail.python.org/mailman/listinfo/python-list

Re: Alternatives for Extracting EXIF and JPEG Data from Images

2007-03-04 Thread Max Erickson
Roger [EMAIL PROTECTED] wrote: Does anybody have a pointer to a Python library/utility that will extract the chrominance and luminance quantization tables from JPG images? I have been using the _getexif method from PIL, which works fine, but doesn't extract the quantization data. I am a

Project organization and import

2007-03-04 Thread Martin Unsal
I'm using Python for what is becoming a sizeable project and I'm already running into problems organizing code and importing packages. I feel like the Python package system, in particular the isomorphism between filesystem and namespace, doesn't seem very well suited for big projects. However, I

Re: How to set docstrings for extensions supporting PyNumberMethods?

2007-03-04 Thread Nick Alexander
On Mar 4, 12:14 am, Ziga Seilnacht [EMAIL PROTECTED] wrote: NickAlexanderwrote: Hello, I am writing a python extension (compiled C code) that defines an extension type with PyNumberMethods. Everything works swimmingly, except I can't deduce a clean way to set the docstring for tp_*

Re: Project organization and import

2007-03-04 Thread Nicholas Parsons
1a) Module/class collision. I like to use the primary class in a file as the name of the file. However this can lead to namespace collisions between the module name and the class name. Also it means that I'm going to be stuck with the odious and wasteful syntax foo.foo everywhere, or forced to

Re: Questions about app design - OOP with python classes

2007-03-04 Thread greg
Paul Rubin wrote: Maybe we can concoct a cross between Python and Haskell, and call it Paskell after the philosopher Blaise ;-). No, we name it after Pascall's confectionery: http://www.homesick-kiwi.com/productpage.php?id=51 Lots of syntactic sugar. :-) -- Greg --

wxPython import error...

2007-03-04 Thread king kikapu
Hi, i am just completed installing Python/Pydev/Eclipse/wxPython on an Ubuntu system and all are running fine except program that contains references to wx It gives me: ImportError: /usr/lib/python2.4/site-packages/wx-2.8-gtk2-unicode/wx/ _core_.so: undefined symbol:

Re: Questions about app design - OOP with python classes

2007-03-04 Thread greg
John Nagle wrote: The Pascal/Ada/Modula family of languages all had type systems with restrictions on conversion. Unlike C, types in Pascal are not simply abbreviations of the type; they're unique types. Ada is the only one of those that would let you define things like a new kind of

Re: Project organization and import

2007-03-04 Thread Jorge Godoy
Martin Unsal [EMAIL PROTECTED] writes: 1) Namespace. Python wants my namespace heirarchy to match my filesystem heirarchy. I find that a well organized filesystem heirarchy for a nontrivial project will be totally unwieldy as a namespace. I'm either forced to use long namespace prefixes, or

Re: Embedded and extending python 2.5: trouble with __main__ in PyRun_SimpleFileExFlags?

2007-03-04 Thread Carl Douglas
I am going to answer this question myself, but perhaps this will be useful for someone else. My original C++ code was fine, the PyRun_SimpleFile was failing due to errors in my python code. To get a console and display the python interpreter errors I allocated a console, and redirected stdout

Re: Alternatives for Extracting EXIF and JPEG Data from Images

2007-03-04 Thread Roger
Max Erickson wrote: Roger [EMAIL PROTECTED] wrote: Does anybody have a pointer to a Python library/utility that will extract the chrominance and luminance quantization tables from JPG images? I have been using the _getexif method from PIL, which works fine, but doesn't extract the

Re: How use XML parsing tools on this one specific URL?

2007-03-04 Thread Paul McGuire
On Mar 4, 11:42 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I understand that the web is full of ill-formed XHTML web pages but this is Microsoft: http://moneycentral.msn.com/companyreport?Symbol=BBBY I can't validate it and xml.minidom.dom.parseString won't work on it. If this was just

Re: How use XML parsing tools on this one specific URL?

2007-03-04 Thread Paul McGuire
P.S. Please send me 1% of all the money you make from your automated- stock speculation program. On the other hand, if you lose money with your program, don't bother sending me a bill. -- Paul -- http://mail.python.org/mailman/listinfo/python-list

Platform-specific compile flags in setup.py?

2007-03-04 Thread Nikita the Spider
Hi all, I'm a newbie when it comes to distributing C-based Python modules. I'm just now sharing my first with the rest of the world (it's actually V. Marangozov's shared memory module for IPC) and I've learned that the module needs a different set of compile flags for Linux than for my Mac. My

Re: Platform-specific compile flags in setup.py?

2007-03-04 Thread Alex Martelli
Nikita the Spider [EMAIL PROTECTED] wrote: Hi all, I'm a newbie when it comes to distributing C-based Python modules. I'm just now sharing my first with the rest of the world (it's actually V. Marangozov's shared memory module for IPC) and I've learned that the module needs a different set

Re: Alternatives for Extracting EXIF and JPEG Data from Images

2007-03-04 Thread Terry Reedy
Roger [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] | Max Erickson wrote: | I don't know what the format is, etc, but jpegs I open with PIL have a | quantization attribute, e.g: | | im.quantization | Thank you, I wasn't aware of the quantization method. I was unable to | find

Re: list-like behaviour of etree.Element

2007-03-04 Thread Terry Reedy
Daniel Nogradi [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] | The etree.Element (or ElementTree.Element) supports a number of | list-like methods: append, insert, remove. Any special reason why it | doesn't support pop and extend (and maybe count)? I think you should turn the

Python stock market analysis tools?

2007-03-04 Thread Mudcat
I have done a bit of searching and can't seem to find a stock market tool written in Python that is active. Anybody know of any? I'm trying not to re-create the wheel here. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python stock market analysis tools?

2007-03-04 Thread Raymond Hettinger
On Mar 4, 7:52 pm, Mudcat [EMAIL PROTECTED] wrote: I have done a bit of searching and can't seem to find a stock market tool written in Python that is active. Anybody know of any? I'm trying not to re-create the wheel here. What kind of tool do you want? Getting quotes is the easy part:

Squisher -- a lightweight, self-contained alternative to eggs?

2007-03-04 Thread Adam Atlas
I wrote this little program called Squisher that takes a ZIP file containing Python modules and generates a totally self-contained .pyc file that imports a specified module therein. (Conveniently, Python's bytecode parser ignores anything after an end marker, and the zipimport mechanism skips any

package_data question

2007-03-04 Thread bytecolor
I have a simple package. I'm trying to add an examples subdirectory with distutils. I'm using Python 2.4 on Linux. My file layout and setup.py can be found here: http://www.deadbeefbabe.org/paste/3870 I've tried using data_files as well, with the same result; examples/ fig2.3.apt is not added to

Descriptor/Decorator challenge

2007-03-04 Thread Raymond Hettinger
I had an idea but no time to think it through. Perhaps the under-under name mangling trick can be replaced (in Py3.0) with a suitably designed decorator. Your challenge is to write the decorator. Any trick in the book (metaclasses, descriptors, etc) is fair game. Raymond how we

  1   2   >