Re: newbie question - exception processing

2005-02-20 Thread M.E.Farmer
[EMAIL PROTECTED] wrote: O/S: Windows XP Service Pack 2 Python version: 2.4 Unable to understand how to build a class to handle an exception. Contents of sample01.py: import exceptions class SampleMain: try: def __init__(self): print 'in SampleMain constructor'

Re: newbie question - exception processing

2005-02-20 Thread John Machin
[EMAIL PROTECTED] wrote: O/S: Windows XP Service Pack 2 Python version: 2.4 Unable to understand how to build a class to handle an exception. Contents of sample01.py: import exceptions class SampleMain: try: def __init__(self): print 'in SampleMain constructor'

recommended way of generating HTML from Python

2005-02-20 Thread Michele Simionato
What is the recommended way of generating HTML from Python? I know of HTMLGen and of few recipes in the Cookbook, but is there something which is more or less standard? Also, are there plans to include a module for HTML generation in the standard library? I really would like to see some

PyQt Python Bindings for Qt v3.14 Released

2005-02-20 Thread Phil Thompson
Riverbank Computing is pleased to announce the release of PyQt v3.14 available from http://www.riverbankcomputing.co.uk/. Changes since the last release include support for QScintilla v1.5. PyQt is a comprehensive set of Qt bindings for the Python programming language and supports the same

Re: recommended way of generating HTML from Python

2005-02-20 Thread Michele Simionato
Just to clarify, before people start pointing out their preferred templating language: I am NOT asking for a template system. I am asking for something on the lines of HTMLGen, where you just use pure Python. -- http://mail.python.org/mailman/listinfo/python-list

Re: [Fwd: Re: [Uuu-devel] languages] -- Why Python

2005-02-20 Thread Paul Boddie
Mike Meyer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... Arich Chanachai [EMAIL PROTECTED] writes: When the CLR is integrated, it will allow a wide array of problem solving choices for uuu users. You've missed the point. Allowing a wide array of problem solving choices is

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-20 Thread Martin v. Löwis
Ilias Lazaridis wrote: Should a professional developer take python serious? Yes. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: unicode encoding usablilty problem

2005-02-20 Thread Martin v. Löwis
Thomas Heller wrote: Is it possible to specify a byte string literal when running with the -U option? Not literally. However, you can specify things like bytes = [0x47, 0x49, 0x4f, 0x50, 0x01, 0x00] bytes = ''.join((chr(x) for x in bytes)) Alternatively, you could rely on the 1:1 feature of

Re: unicode encoding usablilty problem

2005-02-20 Thread Martin v. Lwis
aurora wrote: Lots of errors. Amount them are gzip (binary?!) and strftime?? For gzip, this is not surprising. It contains things like self.fileobj.write('\037\213') which is not intended to denote characters. How about b'' - 8bit string; '' unicode string and no automatic conversion. This

Re: exercise: partition a list by equivalence

2005-02-20 Thread John Machin
Xah Lee wrote: when i try to run the following program, Python complains about some global name frozenset is not defined. Is set some new facility in Python 2.4? http://www.python.org/doc/2.3/whatsnew/ http://www.python.org/doc/2.4/whatsnew/whatsnew24.html You must be running 2.3. If you

Real-Time Fluid Dynamics for Games...

2005-02-20 Thread Alberto Santini
I ported a Jos Stam's demo about Fluid mech to check the difference of speed between C implementation and Python. I think I achieved good results with Python and there is space to improve, without to extend the program with C routine, I mean. -- Good hack, Alberto Santini

Re: - E02 - Support for MinGW Open Source Compiler

2005-02-20 Thread Ilias Lazaridis
A.B., Khalid wrote: [...] - (comments) I've just overflown your comments for a few seconds. And I got my confirmations. Thank you for your time. -- pyMinGW: http://jove.prohosting.com/iwave/ipython/pyMinGW.html . -- http://lazaridis.com -- http://mail.python.org/mailman/listinfo/python-list

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-20 Thread Ilias Lazaridis
Fredrik Lundh wrote: Ilias Lazaridis wrote: Should a professional developer take python serious? yes. Should I take answers serious? Answer from people which do not respect coherence of writings? Should a professional developer take python serious? I mean, if the team does not manage at least the

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-20 Thread Ilias Lazaridis
Martin v. Löwis wrote: Ilias Lazaridis wrote: Should a professional developer take python serious? Yes. Should I take answers serious? Answer from people which do not respect coherence of writings? Should a professional developer take python serious? I mean, if the team does not manage at least

Re: exercise: partition a list by equivalence

2005-02-20 Thread bearophileHUGS
John Machin: Perhaps I'm missing a posting of yours -- what are merge2 and merge4? What is this random pairs test? What is xMax (nPairs isn't hard to guess), and how are you generating your input data? merge2 and this random pairs test comes from the post by Brian Beck. merge4 is the first in my

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-20 Thread Fredrik Lundh
Ilias Lazaridis wrote: Should a professional developer take python serious? yes. /F -- http://mail.python.org/mailman/listinfo/python-list

Re: exercise: partition a list by equivalence

2005-02-20 Thread Eric Pederson
From: Xah Lee [EMAIL PROTECTED] The GOTO statement from Perl has been messed up. hey, I didn't do it! This block: for group in interm: what do the funny little s stand for? Eric Pederson http://www.songzilla.blogspot.com :::

Re: unicode encoding usablilty problem

2005-02-20 Thread Nick Coghlan
Martin v. Löwis wrote: How about b'' - 8bit string; '' unicode string and no automatic conversion. This has been proposed before, see PEP 332. The problem is that people often want byte strings to be mutable as well, so it is still unclear whether it is better to make the b prefix denote the

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-20 Thread Fredrik Lundh
Ilias Lazaridis wrote: Should a professional developer take python serious? yes. Should I take answers serious? yes. Answer from people which do not respect coherence of writings? coherence of writings? /F -- http://mail.python.org/mailman/listinfo/python-list

Re: exercise: partition a list by equivalence

2005-02-20 Thread John Machin
On 20 Feb 2005 03:31:33 -0800, [EMAIL PROTECTED] wrote: John Machin: FWIW, my offering is attached. I'm sorry, I don't see the attach... (just the different title). Here it is. I'll reply to the rest tomorrow. It's way past sleep-time here. ! !class _Stopper: !pass ! !def

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-20 Thread Robert Kern
Fredrik Lundh wrote: Ilias Lazaridis wrote: Should a professional developer take python serious? yes. Should I take answers serious? yes. Answer from people which do not respect coherence of writings? coherence of writings? Ironic, is it not? I think he's referring to the fact that you snipped

Re: lambda closure question

2005-02-20 Thread Carl Banks
jfj wrote: Yes, but according to the python philosophy one could pass locals() to the nested function and grab the values from there. Seems practical for the rareness of this... First of all, I really don't agree that it's a rare need. I use it pretty often. Second of all, the whole point

Re: [ANN] Python 2.4 Quick Reference available

2005-02-20 Thread Michael Hoffman
David M. Cooke wrote: The file() constructor is new in Python 2.2 and is an alias for open(). Both spellings are equivalent. The intent is for open() to continue to be preferred for use as a factory function which returns a new file object. The spelling, file is more suited to type testing (for

ANN: eric3 3.6.2 released

2005-02-20 Thread Detlev Offenbach
Hi, this is to inform all of you about the release of eric3 3.6.2. It is a bug fix release and will work with the latest QScintilla/sip/PyQt. It is available via http://www.die-offenbachs.de/detlev/eric3.html What is eric3? -- Eric3 is a Python IDE written using PyQt and QScintilla.

Re: How to wrap a class's methods?

2005-02-20 Thread rbt
Jeff Shannon wrote: You could probably also do this as a factory function, rather than as a class (also untested!): def Wrapper(func): def wrapped(self, *args, **kwargs): s, r = func(self, *args, **kwargs) if s != 'OK': raise NotOK((s,r)) return r

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-20 Thread Martin v. Löwis
Ilias Lazaridis wrote: Should I take answers serious? If not, why are you asking questions in the first place? Answer from people which do not respect coherence of writings? Coherence of writings? Should a professional developer take python serious? Yes. I mean, if the team does not manage at

Re: - E02 - Support for MinGW Open Source Compiler

2005-02-20 Thread Nick Coghlan
Pat wrote: On Windows, most users are used to installing precompiled binary packages, rather than compiling from source. When you do have to compile from source, it often requires you to fiddle with nitty gritty details about which you'd rather remain ignorant. The less fiddling required, the

Re: [ANN] Python 2.4 Quick Reference available

2005-02-20 Thread Nick Coghlan
George Sakkis wrote: Still the word open sounds too general if the meaning is open a file-like object; OTOH this could be a good thing if in some future version open('http://www.python.org') was e.g. an alias to urllib2.urlopen. Exactly the reason the BDFL gave for preferring 'open' - it may be

Re: unicode encoding usablilty problem

2005-02-20 Thread Nick Coghlan
Martin v. Löwis wrote: People also argue that with such an approach, we could as well tell users to use array.array for the mutable type. But then, people complain that it doesn't have all the library support that strings have. Indeed - I've got a data manipulating program that I figured I could

Re: pyWrath project

2005-02-20 Thread [EMAIL PROTECTED]
As Felix pointed out, of course link should read http://sourceforge.net/projects/pywrath Sorry to everyone who tried to follow crappy link :) -- http://mail.python.org/mailman/listinfo/python-list

Re: - E02 - Support for MinGW Open Source Compiler

2005-02-20 Thread Diez B. Roggisch
If you put yourself into the shoes of someone who decides to use a Python product that requires compiling, and that product contains C extensions that also need compiling, you'll see that it doesn't matter whether or not that individual has actually written a single line of Python themselves.

introspection inquiry

2005-02-20 Thread mirandacascade
Where in the language would one find the intropsection capability to answer the question: what class am I in? Example: class ExistentialCrisis: def __init__(self, text): self.spam = text print 'In the constructor of the %s class' % whatever When the constructor method is

BaseHTTPServer threading using SocketServer.ThreadingMixIn

2005-02-20 Thread Tortelini
I am making custom web server using HTTPServer and want to be able to access it simultaneously from different computers. To achieve multithreading, I have been experimenting with ThreadingMixIn from SocketServer, but it doesn't seem to work, when I freeze code in one instance it seems to be frozen

Re: introspection inquiry

2005-02-20 Thread Robin Becker
[EMAIL PROTECTED] wrote: ... My question is this: what can be substituted for whatever that will make the example above work? self.__class__.__name__ -- Robin Becker -- http://mail.python.org/mailman/listinfo/python-list

Re: [ANN] Python 2.4 Quick Reference available

2005-02-20 Thread Michael Hoffman
François Pinard wrote: [Nick Coghlan] George Sakkis wrote: Still the word open sounds too general if the meaning is open a file-like object; OTOH this could be a good thing if in some future version open('http://www.python.org') was e.g. an alias to urllib2.urlopen. Exactly the reason the BDFL

Re: segfault when calling Python from C thread

2005-02-20 Thread Greg Chapman
Travis Berg wrote: I'm running into a problem when trying to perform a callback to a Python function from a C extension. Specifically, the callback is being made by a pthread that seems to cause the problem. If I call the callback from the parent process, it works fine. The PyObject is

Re: BaseHTTPServer threading using SocketServer.ThreadingMixIn

2005-02-20 Thread Paul Rubin
Tortelini [EMAIL PROTECTED] writes: I am making custom web server using HTTPServer and want to be able to access it simultaneously from different computers. To achieve multithreading, I have been experimenting with ThreadingMixIn from SocketServer, but it doesn't seem to work, One common

Re: introspection inquiry

2005-02-20 Thread Michael Hoffman
Robin Becker wrote: self.__class__.__name__ Unless I misunderstood the question, that won't work. That will give you the name of the class the object is an instance is of. I think he wants the name of the class the method was defined in. Here's a way to do that using metaclasses and Python's magic

Re: introspection inquiry

2005-02-20 Thread Diez B. Roggisch
Unless I misunderstood the question, that won't work. That will give you the name of the class the object is an instance is of. I think he wants the name of the class the method was defined in. Where is the difference? The method is defined in a class - and an instance is created from that

Re: introspection inquiry

2005-02-20 Thread John Roth
Michael Hoffman [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Robin Becker wrote: self.__class__.__name__ Unless I misunderstood the question, that won't work. That will give you the name of the class the object is an instance is of. I think he wants the name of the class the method

Re: introspection inquiry

2005-02-20 Thread Michael Hoffman
Diez B. Roggisch wrote: [Michael Hoffman]: Unless I misunderstood the question, that won't work. That will give you the name of the class the object is an instance is of. I think he wants the name of the class the method was defined in. Where is the difference? The method is defined in a class -

Re: introspection inquiry

2005-02-20 Thread Michael Hoffman
John Roth wrote: If that's the case, then the inspect module should give the tools to do it without a great deal of angst. Unfortunately, it doesn't give you the class that defined the method, just the class that invoked it. Are you saying that the inspect module *should* give you the tools to do

Re: Real-Time Fluid Dynamics for Games...

2005-02-20 Thread bearophileHUGS
Your two email addresses bouce emails back, so I post a shortened version of my comment here. I haven't installed: PyOpenGL-2.0.2.01.py2.4-numpy23 glut-3.7.6 Therefore at the moment I cannot try your interesting code. What's the speed of this Python code on your computer? I'd like to see a

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-20 Thread Ilias Lazaridis
Martin v. Löwis wrote: Ilias Lazaridis wrote: Should I take answers serious? If not, why are you asking questions in the first place? simply read the next question, which limits the scope of the first one. Answer from people which do not respect coherence of writings? Coherence of writings? An

Re: - E02 - Support for MinGW Open Source Compiler

2005-02-20 Thread BrainDead
[snip, Ilias would not understand it] P.S. if Ilias volunteers, or offers to pay someone to do this, instead of just complaining, will hell freeze over?) Nick, There is about as much chance of hell freezing over as there is of England beating Australia in the cricket this summer. [I'am a

questions concerning cgi.FieldStorage(keep_blank_values=1)

2005-02-20 Thread Jonas Meurer
hello, i'm quite new to python. currently i try to write a web application with python cgi scripts. in this application, i need keys to be delivered with the url, some with and some without value (for example 'script.py?key1key2=foo'. i've searched the internet, and already figured out that i

Re: [Fwd: Re: [Uuu-devel] languages] -- Why Python

2005-02-20 Thread Ville Vainio
Donn == Donn Cave [EMAIL PROTECTED] writes: Donn I don't know what the Windows version is like, but for all Donn the UNIX shell's weaknesses, it's very well suited to its Donn role. The Plan 9 I don't know about that - I don't see anything in shell that couldn't be done better in

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-20 Thread Jan Dries
Ilias Lazaridis wrote: they above 2 questions are coherent, thus answering isolated [as you've done] makes not much sense. Should I take answers serious? Answer from people which do not respect coherence of writings? Except that the quote here above is NOT what was in your original

Re: questions concerning cgi.FieldStorage(keep_blank_values=1)

2005-02-20 Thread Daniel Lichtenberger
Hi, Jonas Meurer wrote: if i request the script with script.py?key1key2=foo, it will output: list keys with form.keys(): key2 any suggestions about how to make form.keys() contain the blank keys as well? key1 isn't a valid parameter, to supply an empty key you would write

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-20 Thread Ilias Lazaridis
Jan Dries wrote: Ilias Lazaridis wrote: [...] - (things which justify inability of coherence-detection) If you would have written: Should I take answers serious? Answer from people which do not respect coherence of writings? it would have been much more coherent. I understand. Let's see: -

Re: questions concerning cgi.FieldStorage(keep_blank_values=1)

2005-02-20 Thread Jonas Meurer
On 20/02/2005 Daniel Lichtenberger wrote: any suggestions about how to make form.keys() contain the blank keys as well? key1 isn't a valid parameter, to supply an empty key you would write script.py?key1=key2=foo Then cgi.FieldStorage also includes key1. great, it works. but is there

intersection of 2 list of pairs

2005-02-20 Thread les_ander
Hi, I have 2 lists of tuples that look like: E1=[('a','g'),('r','s')] and E2=[('g','a'),('r','q'),('f','h')]. In this tuple, the ordering does not matter, i.e. (u,v) is the same as (v,u). What I want to do is the following: given 2 list of tuples, E1 and E2, I want to create another list with

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-20 Thread Fredrik Lundh
Ilias Lazaridis wrote: I understand. no. /F -- http://mail.python.org/mailman/listinfo/python-list

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-20 Thread Martin v. Löwis
Ilias Lazaridis wrote: Should I take answers serious? . . . . Answer from people which do not respect coherence of writings? - - - I still detect the coherence. As most people in this group will detect the coherence. I don't. The second fragment is not even correct English (it does not have a verb

Re: help please

2005-02-20 Thread gargonx
I think there's a problem with the code: py decode_replacements.update([(std[key], key) for key in std]) py decode_replacements.update([(ext[key], key) for key in ext]) when i run this i get an error: AttributeError: keys I can't get that figured out --

Re: intersection of 2 list of pairs

2005-02-20 Thread Peter Otten
[EMAIL PROTECTED] wrote: I have 2 lists of tuples that look like: E1=[('a','g'),('r','s')] and E2=[('g','a'),('r','q'),('f','h')]. In this tuple, the ordering does not matter, i.e. (u,v) is the same as (v,u). What I want to do is the following: given 2 list of tuples, E1 and E2, I want

Re: lambda closure question

2005-02-20 Thread jfj
Carl Banks wrote: Say you want to calculate a list of points of an iterated fractal. Here's the idea: you have a set of linear transformations. You take the origin (0,0) as the first point, and then apply each transformation in turn to get a new point. You recursively apply each transformation

Re: introspection inquiry

2005-02-20 Thread Robin Becker
Michael Hoffman wrote: Robin Becker wrote: self.__class__.__name__ Unless I misunderstood the question, that won't work. That will give you the name of the class the object is an instance is of. I think he wants the name of the class the method was defined in. Here's a way to do that using

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-20 Thread Grant Edwards
On 2005-02-20, Ilias Lazaridis [EMAIL PROTECTED] wrote: If you would have written: Should I take answers serious? Answer from people which do not respect coherence of writings? it would have been much more coherent. I understand. I doubt it. I still detect the coherence. As

help wanted: poser to ogre 3d python script

2005-02-20 Thread verizon account
a community of online 3d developers is looking for a python script writer to write a script to export from poser to ogre3d .mesh/.skeleton formats, using the poser python script interpretor. please reply to [EMAIL PROTECTED]thanks!! -- http://mail.python.org/mailman/listinfo/python-list

Re: - E02 - Support for MinGW Open Source Compiler

2005-02-20 Thread Pat
Nick Coghlan wrote: Pat wrote: On Windows, most users are used to installing precompiled binary packages, rather than compiling from source. When you do have to compile from source, it often requires you to fiddle with nitty gritty details about which you'd rather remain ignorant. The

Re: - E02 - Support for MinGW Open Source Compiler

2005-02-20 Thread BrainDead
[Snip] Martin, I believe that you are wasting your time. Looking at your email address, this may well be relevant.

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-20 Thread Ilias Lazaridis
Martin v. Löwis wrote: Ilias Lazaridis wrote: Should I take answers serious? [...] Answer from people which do not respect coherence of writings? [...] I still detect the coherence. As most people in this group will detect the coherence. I don't. The second fragment is not even correct English

Re: intersection of 2 list of pairs

2005-02-20 Thread John Machin
[EMAIL PROTECTED] wrote: Hi, I have 2 lists of tuples that look like: E1=[('a','g'),('r','s')] and E2=[('g','a'),('r','q'),('f','h')]. In this tuple, the ordering does not matter, i.e. (u,v) is the same as (v,u). What I want to do is the following: given 2 list of tuples, E1 and E2, I

Re: [ANN] Python 2.4 Quick Reference available

2005-02-20 Thread François Pinard
[Michael Hoffman] To be honest I doubt open will be extended in this manner. I did not read Guido's arguments for a while, so I may remember them wrongly. So, take me with a grain of salt. I would not think Guido is arguing for the sole sake of arguing. Maybe his plans or visions will

Re: introspection inquiry

2005-02-20 Thread Michael Hoffman
Robin Becker wrote: import inspect class A: _class_name=inspect.currentframe().f_code.co_name def __init__(self,text,_defining_class_name=_class_name): print 'text=',text,'_defining_class_name=',_defining_class_name class B(A): pass b=B('aaa') That won't work, if you, say, wanted to

Re: Trouble with mysql-python 1.2.0 on Solaris 8 sparc

2005-02-20 Thread Andy Dustman
Did you build your own MySQL, or did you use a pre-built version? And what version? It's not clear if you're using 4.0 or 4.1. If mysql_config is returning the wrong flags, then that's a bug with MySQL. You should be able to work around this by doing this in setup.py before the call to setup():

Re: BaseHTTPServer threading using SocketServer.ThreadingMixIn

2005-02-20 Thread Tortelini
It's not that, here is definition that I use: class myWebServer(SocketServer.ThreadingMixIn, BaseHTTPServer.HTTPServer): pass code that runs server: server = myWebServer(('', 80), myWebHTTPHandler) LOG(Web Server starting) server.serve_forever() and here is shortened version of

Re: lambda closure question

2005-02-20 Thread Dirk Thierbach
Ted Lilley [EMAIL PROTECTED] wrote: As a side note, I'm familiar with the term currying from a friend who learned ML and Scheme quite some time ago. Not sure if that's the true origin, but it was a sufficiently different context from Python (or at least I thought) that I didn't want to rely

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-20 Thread Ilias Lazaridis
Summarized Suggestions for the Python Team, PSF, Community): - - - An automated-build-process-system should allow community-members to add their targets (e.g. MinGW) into an special incubation section, which does not in any way affect the main section (which contains the official production

Re: help please

2005-02-20 Thread Steven Bethard
gargonx wrote: I think there's a problem with the code: py decode_replacements.update([(std[key], key) for key in std]) py decode_replacements.update([(ext[key], key) for key in ext]) when i run this i get an error: AttributeError: keys I can't get that figured out Can you show the part of your

Re: How to wrap a class's methods?

2005-02-20 Thread Steven Bethard
rbt wrote: Jeff Shannon wrote: You could probably also do this as a factory function, rather than as a class (also untested!): def Wrapper(func): def wrapped(self, *args, **kwargs): s, r = func(self, *args, **kwargs) if s != 'OK': raise NotOK((s,r)) return

Re: exercise: partition a list by equivalence

2005-02-20 Thread John Machin
Reinhold Birkenfeld wrote: Reinhold Birkenfeld wrote: My solution (which may not be the fastest or most effective, but till now is the shortest wink and it works): [snip RB] A recursive solution (around twice as fast as the above, though very slow still...) [snip RB2] Another one:

Moving to Python from PHP - 3 questions

2005-02-20 Thread Michal Migurski
Hi everyone, I've been planning to move to Python from PHP for some time now. I use PHP extensively for web scripting, with mod_php, Apache, and a DB (I would characterize my knowledge of PHP as advanced). Here are three stumbling blocks I've experienced, for which I couldn't seem to find any

Re: exercise: partition a list by equivalence

2005-02-20 Thread John Machin
Eric Pederson wrote: From: Xah Lee [EMAIL PROTECTED] ©for group in interm: what do the funny little ©s stand for? ... import unicodedata as ucd; ucd.name('©'.decode('cp1252')) 'COPYRIGHT SIGN' Xah is asserting his right to be recognised as the author of his artistic creations, line by

Re: recommended way of generating HTML from Python

2005-02-20 Thread Pierre Quentel
Here are a couple of pointers. I agree with Michele that it would be nice to have some kind of standardization. Maybe this would be worth a post to the Web-SIG ? - I posted a 70-line recipe on the Python Cookbook, a sort of poor man's HTMLGen called HTMLTags

Re: PyQt Python Bindings for Qt v3.14 Released

2005-02-20 Thread Simon John
All looks like good news, especially PyQt4 - one question, if it's statically linked with Qt4, will it still work with things like py2exe? I guess it just won't need qt-mt4.dll? I'm getting a 404 on the new SIP: http://www.river-bank.demon.co.uk/download/QScintilla/qscintilla-1.61-gpl-1.5.tar.gz

Re: Moving to Python from PHP - 3 questions

2005-02-20 Thread Diez B. Roggisch
Hi, 2) Session management. Cookie-based sessions in PHP are pretty transparent, with a small library of basic functions that do 95% of what anyone may need to store session data in serialized files and associate them with cookies. I've seen python code that accomplishes this, but so far no

Re: PyQt Python Bindings for Qt v3.14 Released

2005-02-20 Thread Phil Thompson
On Sunday 20 February 2005 8:42 pm, Simon John wrote: All looks like good news, especially PyQt4 - one question, if it's statically linked with Qt4, will it still work with things like py2exe? Should do. I guess it just won't need qt-mt4.dll? The binary will be provided for the Windows GPL

Re: Moving to Python from PHP - 3 questions

2005-02-20 Thread Michal Migurski
The python-based zope application server has session management. Togther with a built-in user and access rights management. ... This can be done in zope if you name a variable name:list. That then will give you the variable as list regardless of the number of occurences. Thank you. My impression

Re: recommended way of generating HTML from Python

2005-02-20 Thread xtian
Stan (part of nevow, which is part of twisted) is a nice python syntax for building HTML - I like the use of () and [] to separate attributes from sub-elements. For example: class Greeter(rend.Page): def greet(self, context, data): return random.choice([Hello, Greetings, Hi]), ,

Article on Hi-Fi Myths

2005-02-20 Thread Al Christians
I learned Friday night that the hi-fi talk is our most popular tape. This page: http://www.belt.demon.co.uk/product/Cable_Controversy/Cable_Controversy.htm Gives a somewhat different take on the controversy, almost certainly bizarre. It's a long page and the interesting part is near the end. The

Bug in email package?

2005-02-20 Thread Roman Suzi
I was playing with email package and discovrered this strange kind of behaviour: import email.Message m = email.Message.Message() m['a'] = '123' print m From nobody Mon Feb 21 00:12:27 2005 a: 123 for i in m: print i ... Traceback (most recent call last): File stdin, line 1, in ? File

Re: - E02 - Support for MinGW Open Source Compiler

2005-02-20 Thread Nick Vargish
BrainDead [EMAIL PROTECTED] writes: I believe that you are wasting your time. Looking at your email address, this may well be relevant. [ 4-line URL snipped ] Thanks for the historical reference. Please consider a visit to tinyurl.com before posting a monster like that... :^) Nick -- #

Re: Moving to Python from PHP - 3 questions

2005-02-20 Thread Diez B. Roggisch
Thank you. My impression of Zope in the past has been that it does what I need, along with 10,000 other things I don't (built in WebDAV server?!), but clearly I owe it another chance. I've been initially The apache has a built in webdav server too - is that a reason _not_ to use it? If you

Re: [long] nested lists as arrays

2005-02-20 Thread [EMAIL PROTECTED]
great thanks -- http://mail.python.org/mailman/listinfo/python-list

ANNOUNCE: KirbyBase 1.8

2005-02-20 Thread Jamey Cribbs
KirbyBase is a simple, plain-text, database management system written in Python. It can be used either embedded in a python script or in a client/server, multi-user mode. You use python code to express your queries instead of having to use another language such as SQL. KirbyBase is

Re: Test for structure

2005-02-20 Thread Martin Miller
I don't believe you can use the test for a __iter__ attribute in this case, for the following reason: c1 = 'abc' c2 = ['de', 'fgh', 'ijkl'] hasattr(c1, '__iter__') False hasattr(c2, '__iter__') True for i in c1: print i=%s is an element of c1 % repr(i) ... i='a' is an element of c1 i='b' is

Re: Moving to Python from PHP - 3 questions

2005-02-20 Thread Brian Beck
Michal Migurski wrote: Thank you. My impression of Zope in the past has been that it does what I need, along with 10,000 other things I don't (built in WebDAV server?!), but clearly I owe it another chance. I've been initially attracted to mod_python because of its raw simplicity and its

Re: Newbie CGI problem

2005-02-20 Thread Rory Campbell-Lange
On 18/02/05, Peter Otten ([EMAIL PROTECTED]) wrote: Rory Campbell-Lange wrote: #!/usr/bin/python import cgi print Content-type: text/html\n\n print hi Gives me the following in my browser: ''' hi Content-type: text/html hi ''' Why are there two 'hi's? You

Re: Moving to Python from PHP - 3 questions

2005-02-20 Thread Brian Beck
Maybe this can help you get it working on OS X: http://thread.gmane.org/gmane.comp.python.mod-python/4039 But as stated in my other post, you may want to take a look at your other options first. Web development with Python is really nothing like PHP, unless you really want it to be. -- Brian

Re: Test for structure

2005-02-20 Thread Steven Bethard
Terry Hancock wrote: But you probably shouldn't do that. You should probably just test to see if the object is iterable --- does it have an __iter__ method? Which might look like this: if hasattr(a, '__iter__'): print 'a' quacks like a duck Martin Miller top-posted: I don't believe you

Re: questions concerning cgi.FieldStorage(keep_blank_values=1)

2005-02-20 Thread Daniel Lichtenberger
Jonas Meurer wrote: key1 isn't a valid parameter, to supply an empty key you would write script.py?key1=key2=foo Then cgi.FieldStorage also includes key1. great, it works. but is there no way to use single keywords as GET argument? You could manually parse the request string (CGI stores the

Re: Moving to Python from PHP - 3 questions

2005-02-20 Thread Joe Francia
Michal Migurski wrote: Thank you. My impression of Zope in the past has been that it does what I need, along with 10,000 other things I don't (built in WebDAV server?!), but clearly I owe it another chance. I've been initially attracted to mod_python because of its raw simplicity and its

Re: [ANN] Python 2.4 Quick Reference available

2005-02-20 Thread Peter Hansen
Michael Hoffman wrote: That said, I still use file() instead of open(). I think that: for line in file(mytext.txt): makes a lot more sense than: for line in open(mytext.txt): I guess it's because the first option sounds a lot more like English. Call me a space-waster (or a waste of space ;-) but

Re: [ANN] Python 2.4 Quick Reference available

2005-02-20 Thread Michael Hoffman
François Pinard wrote: [Michael Hoffman] To be honest I doubt open will be extended in this manner. I did not read Guido's arguments for a while, so I may remember them wrongly. No, I think you remember them the same way I do. So, take me with a grain of salt. I would not think Guido is arguing

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-20 Thread Neil Hodgson
Martin v. Löwis: So I have to guess what you could have meant. If you want to be understood, you might have phrased the question like this: Should I take answers from people which do not respect coherence of writings serious? The main grammatical problem with the question is the use of

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-20 Thread Nick Vargish
Ilias Lazaridis [EMAIL PROTECTED] writes: Now it's really time to close this thread. I suspect this will fall of deaf ears, but I have to mention that you do not get to close threads on Usenet. You can excuse yourself from this one and stop replying to comments, but you don't get to

Re: Pausing a program - poll/sleep/threads?

2005-02-20 Thread Simon John
Ah yes, that Informit article helped endlessly - I'm all done now - got the backend to fetch the info from the server every 2secs using a QThread, then it pass the data back to the GUI frontend by raising a custom event! Thanks for all the help folks, now I'm off to compile the new PyQt 3.14 ;-)

Re: Bug in email package?

2005-02-20 Thread Erik Max Francis
Roman Suzi wrote: I think that if any object (from standard library at least) doesn't support iteration, it should clearly state so. My guess is that 'for' causes the use of 'm[0]', which is (rightfully) an error... Can this behaviour of email be considered a bug? Is there a good case to iterate

  1   2   >