Re: python2.4 generator expression > python2.3 list expression

2005-02-20 Thread Michael Hoffman
snacktime wrote: I need to convert a generator expression to a list expression so it will work under python 2.3. I rewrote this: for c in range(128): even_odd = (sum(bool(c & 1< As this: for c in range(128): bo = [bool(c & 1< Seems to work, is there a better way to do this? If you want to keep

Re: Moving to Python from PHP - 3 questions

2005-02-20 Thread Michal Migurski
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 apparent similarity to mod_ph

Re: unicode encoding usablilty problem

2005-02-20 Thread aurora
On Sun, 20 Feb 2005 15:01:09 +0100, Martin v. Löwis <[EMAIL PROTECTED]> wrote: Nick Coghlan wrote: Having "", u"", and r"" be immutable, while b"" was mutable would seem rather inconsistent. Yes. However, this inconsistency might be desirable. It would, of course, mean that the literal canno

Re: Bug in email package?

2005-02-20 Thread Tim Roberts
Roman Suzi <[EMAIL PROTECTED]> wrote: > >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 >... >T

Re: Article on Hi-Fi Myths

2005-02-20 Thread Mike Meyer
Al Christians <[EMAIL PROTECTED]> writes: > 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

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

2005-02-20 Thread Mike Meyer
[EMAIL PROTECTED] (Paul Boddie) writes: > 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 t

Re: recommended way of generating HTML from Python

2005-02-20 Thread Michele Simionato
The problem is a problem of standardization, indeed. There plenty of recipes to do the same job, I just would like to use a blessed one (I am teaching a Python course and I do not know what to recommend to my students). FWIW, here is a my version of the recipe (stripped down to the bare essentials

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

2005-02-20 Thread Michele Simionato
Jonas: > in this application, i need keys to be delivered with the url, some with > and some without value (for example 'script.py?key1&key2=foo'. You are missing an "=" sign after key1. Confront with this example: from cgi import parse_qsl QS = "x=1&y=2&x=3&z=&y=4" print parse_qsl(QS) print par

Re: help please

2005-02-20 Thread Steven Bethard
Dennis Lee Bieber wrote: On 20 Feb 2005 20:12:50 -0800, "gargonx" <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: decode_replacements.update([(std[key], key) for key in std]) Traceback (most recent call last): File "", line 1, in ? AttributeError: keys Did you read the reference

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

2005-02-20 Thread Mike Meyer
Nick Coghlan <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: >> Arich Chanachai <[EMAIL PROTECTED]> writes: >> >>>Mike Meyer wrote: >>> Whatever the intentions may be, the *act* is one of dictation. Since the point of the underlying OS is to increase the interconnections between applic

Re: unicode encoding usablilty problem

2005-02-20 Thread aurora
On Sat, 19 Feb 2005 18:44:27 +0100, Fredrik Lundh <[EMAIL PROTECTED]> wrote: "aurora" <[EMAIL PROTECTED]> wrote: I don't want to mix them. But how could I find them? How do I know this statement can be potential problem if a==b: where a and b can be instantiated individually far away from

IDLE Problem: win98\Python2.4

2005-02-20 Thread kim kubik
This sure seems like it would have been brought up but I checked Google Groups (the dejanews replacement) and saw nothing: I installed Python2.4 in Win98 and IDLE doesn't work (neither does the online manual even tho a 3.6KB Python24.chm is there, but that's a story for another day) - that is, cli

Re: python2.4 generator expression > python2.3 list expression

2005-02-20 Thread Steven Bethard
snacktime wrote: I need to convert a generator expression to a list expression so it will work under python 2.3. I rewrote this: for c in range(128): even_odd = (sum(bool(c & 1< As this: for c in range(128): bo = [bool(c & 1< Seems to work, is there a better way to do this? Well, if you were ha

Re: help please

2005-02-20 Thread Steven Bethard
gargonx wrote: Even if i put it in exactly the way you did: import re charmatcher = re.compile(r' [A-Z] [\d]?') ext = dict(D="V1", O="M1", G="S1") std = dict(S="H") decode_replacements ={} decode_replacements.update([(std[key], key) for key in std]) Traceback (most recent call last): File "", lin

Re: lambda closure question

2005-02-20 Thread Mike Meyer
"Carl Banks" <[EMAIL PROTECTED]> writes: > Say you have a suite of functions, all of which are called by some main > function and each other, and all of which need to access a lot of the > same data. The best, most straightforward way to do it is to have the > common data be a local variable of t

python2.4 generator expression > python2.3 list expression

2005-02-20 Thread snacktime
I need to convert a generator expression to a list expression so it will work under python 2.3. I rewrote this: for c in range(128): even_odd = (sum(bool(c & 1

Re: intersection of 2 list of pairs

2005-02-20 Thread James Stroud
Learned list comprehension today, its cool: >>> E1=[('a','g'),('r','s')] >>> E2=[('g','a'),('r','q'),('f','h')] >>> [x for x in E1 for y in E2 if x == y or (x[1],x[0])==y] [('a', 'g')] On Sunday 20 February 2005 09:24 am, [EMAIL PROTECTED] wrote: > Hi, > I have 2 lists of tuples that look lik

Python/Rexx Interface Now Available

2005-02-20 Thread les
A Python Rexx Interface is now available to allow Python scripting to access REXX libraries and utilities. See http://www.lestec.com.au for details Regards, Les -- http://mail.python.org/mailman/listinfo/python-list

Re: help please

2005-02-20 Thread gargonx
Even if i put it in exactly the way you did: >>> import re >>> charmatcher = re.compile(r' [A-Z] [\d]?') >>> >>> ext = dict(D="V1", O="M1", G="S1") >>> std = dict(S="H") >>> >>> decode_replacements ={} >>> decode_replacements.update([(std[key], key) for key in std]) Traceback (most recent call las

PyEphem on Win32

2005-02-20 Thread David Flory
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Has anyone run the PyEphem ephemeris application under WinXP? I have compiled it with Visual Studio 6 and it crashes Python with a simple >>> import ephem >>> ephem.date('1994/7/16') Identical code works fine under Linux. I am running ActivePyth

Re: How Do I get Know What Attributes/Functions In A Class?

2005-02-20 Thread George Sakkis
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Thank you Hans. Could you give me a simple sample of using inspect? > http://www.python.org/doc/current/lib/module-inspect.html George -- http://mail.python.org/mailman/listinfo/python-list

Re: low-end persistence strategies?

2005-02-20 Thread Paul Rubin
"Michele Simionato" <[EMAIL PROTECTED]> writes: > Ok, I have yet another question: what is the difference between > fcntl.lockf and fcntl.flock? The man page of my Linux system says > that flock is implemented independently of fcntl, however it does > not say if I should use it in preference over f

Re: How Do I get Know What Attributes/Functions In A Class?

2005-02-20 Thread steven
Thank you Hans. Could you give me a simple sample of using inspect? -- http://mail.python.org/mailman/listinfo/python-list

Re: Tuple index

2005-02-20 Thread John Machin
Steve M wrote: > Hello, > > I'm trying to figure out the index position of a tuple member. > I know the member name, but I need to know the members index position. Tuples, like lists, don't have members in the sense that they can be "named" like t.foo. The only way of referring to them is

Re: recommended way of generating HTML from Python

2005-02-20 Thread has
xtian wrote: > Stan (part of nevow, which is part of twisted) is a nice python syntax > for building HTML [...] > I don't know how detachable it is from the rest of nevow. I'd assume it > wouldn't be too difficult to implement in a standalone fashion. FWIW I whipped up a simple self-contained Stan

Re: - E02 - Support for MinGW Open Source Compiler

2005-02-20 Thread Mark Lawrence
Nick Vargish wrote: > "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

Re: Tuple index

2005-02-20 Thread Erik Max Francis
Larry Bates wrote: Tuples don't have all the nice methods that lists have so convert it to a list. tuple=('a','b','c','d') l=list(tuple) now you can do: list.index('c') which returns 2 Remember index returns -1 when nothing is found. No, that's .find in strings that returns -1. .index in lists rai

Re: Bug in email package?

2005-02-20 Thread Steven Bethard
Erik Max Francis wrote: 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 the

Re: Tuple index

2005-02-20 Thread Larry Bates
Tuples don't have all the nice methods that lists have so convert it to a list. tuple=('a','b','c','d') l=list(tuple) now you can do: list.index('c') which returns 2 Remember index returns -1 when nothing is found. Larry Bates Steve M wrote: > Hello, > > I'm trying to figure out th

Tuple index

2005-02-20 Thread Steve M
Hello, I'm trying to figure out the index position of a tuple member. I know the member name, but I need to know the members index position. I know that if I use the statement print tuple[4] that it will print the contents of that location. What I don't understand is if I know that foo is

Re: exercise: partition a list by equivalence

2005-02-20 Thread Erik Max Francis
John Machin wrote: Xah is asserting his right to be recognised as the author of his artistic creations, line by line. Not very well, however, since his usage doesn't constitute a valid copyright notice :-). -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA

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

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: [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 unilate

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

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 fo

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" ;-)

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 apparen

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 requ

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 beli

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 Bec

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 > > ''' > >

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 apparen

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

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 disk-base

Re: [long] nested lists as arrays

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

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 d

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 --

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 "", line 1, in ? File "/usr/loc

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

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"]), "

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 :list. That then will give you the variable as list regardless of the number of occurences. Thank you. My impression of Z

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 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

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: 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 http://aspn.activestate.com/ASPN/Coo

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 creati

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 h

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 and it works): [snip RB] > > A recursive solution (around twice as fast as the above, though very > slow still...) > [snip RB2] > > Another

Re: recommended way of generating HTML from Python

2005-02-20 Thread Fernando Perez
Michele Simionato wrote: > 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? I'm also an htmlgen user, but it's getting a bit long in the tooth, and the installation is not

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: 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 you

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: 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 r

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 myWebHTTPHandl

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(): e

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 print

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 change

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

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: - 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. http://groups-beta.google.com/group/de.admin.net-abuse.news/browse_frm/thread/8914399857641c05/4163a4fb8a624349?q=Ilias&_done=%2Fgroup%2Fde.admin.net-abuse.news%2Fsearch%3Fgroup%3D

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

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: [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 det

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 metacla

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 at

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

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 -- http://mail.python.org/mailman/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: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

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

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 tupl

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

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 Daniel Lichtenberger
Hi, Jonas Meurer wrote: > if i request the script with script.py?key1&key2=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 script.

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 p

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

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?key1&key2=foo'. i've searched the internet, and already figured out that i n

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 hal

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 exam

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 screensh

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 i

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 - a

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 metho

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 c

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: segfault when calling Python from C thread

2005-02-20 Thread Fredrik Lundh
Greg Chapman wrote: > Your callback function needs to hold the Python GIL (and have a vaild > threadstate) before it calls any Python C-API functions. Change the > last part of it to: > >PyGILState_STATE state; > >/* ... */ > >/* Time to call the callback */ > >state = PyGILState_

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 com

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

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

Re: introspection inquiry

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

  1   2   >