Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Serge Orlov
Ken Tilton wrote: > It is vastly more disappointing that an alleged tech genius would sniff > at the chance to take undeserved credit for PyCells, something probably > better than a similar project on which Adobe (your superiors at > software, right?) has bet the ranch. This is the Grail, dude, Bro

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Tomasz Zielonka
Alex Martelli wrote: > Tomasz Zielonka <[EMAIL PROTECTED]> wrote: > >> Alex Martelli wrote: >> > Having to give functions a name places no "ceiling on expressiveness", >> > any more than, say, having to give _macros_ a name. >> >> And what about having to give numbers a name? > > Excellent style,

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Alex Martelli
Tomasz Zielonka <[EMAIL PROTECTED]> wrote: ... > higher level languages. There are useful programming techniques, like > monadic programming, that are infeasible without anonymous functions. > Anonymous functions really add some power to the language. Can you give me one example that would be f

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Alex Martelli
Tomasz Zielonka <[EMAIL PROTECTED]> wrote: > Alex Martelli wrote: > > Having to give functions a name places no "ceiling on expressiveness", > > any more than, say, having to give _macros_ a name. > > And what about having to give numbers a name? Excellent style, in most cases; I believe most se

Re: wxPython problem

2006-05-06 Thread Bill Maxwell
On 28 Apr 2006 10:16:57 -0700, [EMAIL PROTECTED] wrote: >What I'm wondering is, perhaps it has something to do with the wx.pth >file? I can't seem to find anything in the documentation about what the >path should be, which file it should be pointing to. Mine has this in it: wx-2.6-msw-un

Re: Splice two lists

2006-05-06 Thread Ben Cartwright
[EMAIL PROTECTED] wrote: > Thanks, this worked great. Welcome. :-) > Can you explain the syntax of the '*' on the > return value of izip? I've only ever seen this syntax with respect to > variable number of args. When used in a function call (as opposed to a function definition), * is the "unpac

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Robert Kern
Ken Tilton wrote: > It is vastly more disappointing that an alleged tech genius would sniff > at the chance to take undeserved credit for PyCells, something probably > better than a similar project on which Adobe (your superiors at > software, right?) has bet the ranch. This is the Grail, dude,

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Tomasz Zielonka
Alex Martelli wrote: > Having to give functions a name places no "ceiling on expressiveness", > any more than, say, having to give _macros_ a name. And what about having to give numbers a name? > Yes, we are, because the debate about why it's better for Python (as a > language used in real-world

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Alex Martelli
Bill Atkins <[EMAIL PROTECTED]> wrote: ... > > And here is where we check if you're as gracious about admitting your > > errors, as I am about mine. Brooks' law is: > > > > """Adding manpower to a late software project makes it later.""" > > > > These are Brooks' words, literally. OK so far? >

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Tomasz Zielonka
Alex Martelli wrote: > ``An unneeded feature "cannot" be added (elegantly) in future releases > of the language'' is just as trivial and acceptable for the unneded > feature ``allow ( as an ordinary single-character identifier'' as for > the unneded feature ``allow unnamed functions with all the fl

Re: python 2.5a2, gcc 4.1 and memory problems

2006-05-06 Thread Tim Peters
[Michele Petrazzo] > I'm doing some tests on my debian testing and I see a very strange > memory problem with py 2.5a2 (just downloaded) and compiled with gcc > 4.1.0, but not with the gcc 3.3.5: > > My test are: > > #--test.py > import sys > if sys.version.startswith("2.3"): > from sets import S

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Ken Tilton
Alex Martelli wrote: > Ken Tilton <[EMAIL PROTECTED]> wrote: >... > >>Why? (symbol-name '|(|) -> "(" (No, the "s are not part of the name!) >> >>If you want to argue about that, I will have to bring up the Lisp >>readtable. Or did you forget that, too? > > > Mea culpa -- it wasn't in the

Re: unittest.main-workalike that runs doctests too?

2006-05-06 Thread Chris Lambacher
On Fri, May 05, 2006 at 06:47:26PM +0100, John J. Lee wrote: > Jay Parlar <[EMAIL PROTECTED]> writes: > > On May 5, 2006, at 6:35 AM, John J. Lee wrote: > [...] > > > I know about nose, but it seems just a little too magical for my > > > tastes, and includes stuff I don't really need. > [...] > > n

Re: Splice two lists

2006-05-06 Thread [EMAIL PROTECTED]
Thanks, this worked great. Can you explain the syntax of the '*' on the return value of izip? I've only ever seen this syntax with respect to variable number of args. Thanks again. -- http://mail.python.org/mailman/listinfo/python-list

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread David Steuber
"Xah Lee" <[EMAIL PROTECTED]> writes: > In this post, i'd like to deconstruct one of Guido's recent blog about > lambda in Python. Why couldn't you keep this to comp.lang.python where it would almost be relevant? Before I pulled down the headers, I thought maybe something interesting was posted

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Bill Atkins
[EMAIL PROTECTED] (Alex Martelli) writes: > Bill Atkins <[EMAIL PROTECTED]> wrote: >... >> Believe it or not, _you_ got it wrong. > > Acknowledged: Common Lisp is even MORE insane (note that the quote > "INSANELY extensible" is from Tilton) than I believed -- I'm pretty sure > that the Lisp di

Re: ANN: eric3 3.9.0 released

2006-05-06 Thread Petr Jakes
I think you can get the answer on http://www.die-offenbachs.de/detlev/eric3-mailinglist.html rather then here. HTH Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: python 2.5a2, gcc 4.1 and memory problems

2006-05-06 Thread [EMAIL PROTECTED]
Michele Petrazzo wrote: > > I haven't tried to recompile py 2.4 myself with gcc 4.1 because it is > already compiled with it (4.0.3), so I think (only think) that is a py > 2.5 problem. > I'm right? or I have to compile it with something other switches? Sounds like a gcc problem to me. Try adding

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Alex Martelli
Ken Tilton <[EMAIL PROTECTED]> wrote: ... > Why? (symbol-name '|(|) -> "(" (No, the "s are not part of the name!) > > If you want to argue about that, I will have to bring up the Lisp > readtable. Or did you forget that, too? Mea culpa -- it wasn't in the Lisp(s) I used 25+ years ago, nor in

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Alex Martelli
Paul Rubin wrote: ... > > Yes, we are, because the debate about why it's better for Python (as a > > language used in real-world production systems, *SCALABLE* to extremely > > large-scale ones) to *NOT* be insanely extensible and mutable is a > > separate one -- Pytho

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Alex Martelli
Bill Atkins <[EMAIL PROTECTED]> wrote: ... > Believe it or not, _you_ got it wrong. Acknowledged: Common Lisp is even MORE insane (note that the quote "INSANELY extensible" is from Tilton) than I believed -- I'm pretty sure that the Lisp dialects I used in 1979-1981 didn't go to such crazy extr

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Alex Martelli
Bill Atkins <[EMAIL PROTECTED]> wrote: ... > Does Python have any support for closures? If so, ignore this point. Ignored, since closures are there. > Being able to keep pass around state with functions is useful. Sure, but naming the functions doesn't hamper that. > There are also cases wh

Re: Splice two lists

2006-05-06 Thread Michael J. Fromberger
In article <[EMAIL PROTECTED]>, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Is there a good way to splice two lists together without resorting to a > manual loop? Say I had 2 lists: > > l1 = [a,b,c] > l2 = [1,2,3] > > And I want a list: > > [a,1,b,2,c,3] as the result. > > I've been sear

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Bill Atkins
I V <[EMAIL PROTECTED]> writes: > On Sat, 06 May 2006 21:19:58 -0400, Bill Atkins wrote: >> There are also cases where a function is so trivial that the simplest >> way to describe it is with its source code, where giving it a name and >> putting it at the beginning of a function is just distracti

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Bill Atkins
[EMAIL PROTECTED] (Alex Martelli) writes: > Yes, we are, because the debate about why it's better for Python (as a > language used in real-world production systems, *SCALABLE* to extremely > large-scale ones) to *NOT* be insanely extensible and mutable is a > separate one -- Python's uniformity of

Re: Splice two lists

2006-05-06 Thread Ben Cartwright
[EMAIL PROTECTED] wrote: > Is there a good way to splice two lists together without resorting to a > manual loop? Say I had 2 lists: > > l1 = [a,b,c] > l2 = [1,2,3] > > And I want a list: > > [a,1,b,2,c,3] as the result. Our good friend itertools can help us out here: >>> from itertools import

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Cameron MacKinnon
Alex Martelli wrote: > Ken Tilton <[EMAIL PROTECTED]> wrote: >... > >>True but circular, because my very point is that () was a great design >>choice in that it made macros possible and they made CL almost >>infinitely extensible, while indentation-sensitivity was a mistaken >>design choice

Re: the print statement

2006-05-06 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > bit of an understanding of the \xhh pattern. It's still unclear to me, > however, how one can go from the \x92 pattern and arrive at the > apostrophe character. Is \x92 the apostrophe character in another > character set? If so, whi

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread I V
On Sat, 06 May 2006 21:19:58 -0400, Bill Atkins wrote: > There are also cases where a function is so trivial that the simplest > way to describe it is with its source code, where giving it a name and > putting it at the beginning of a function is just distracting and > time-consuming. E.g.: > >

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Paul Rubin
Bill Atkins <[EMAIL PROTECTED]> writes: > Does Python have any support for closures? If so, ignore this point. > But if not, what about examples like this: > > (defun make-window (window observer) > ;; initialization code here > (add-handler window 'close > (lambda (eve

MySQLdb problem

2006-05-06 Thread liupei
I am use mod_python3.2.8,MySQL-python-1.2.1_p2,mysql5.0.20,centOS when I run the script below(I have also saved this script in utf-8): #coding: utf-8 from MySQLdb import connect connection=connect(user='root',passwd='',host='localhost',db='test') cursor = connection.cursor() cursor.execute("INSERT

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Bill Atkins
[EMAIL PROTECTED] (Alex Martelli) writes: > Bill Atkins <[EMAIL PROTECTED]> wrote: >... >> > >> > Read again what I wrote: I very specifically said "ordinary >> > *single-character* identifier" (as opposed to "one of many characters >> > inside a multi-character identifier"). Why do you think

Re: Counterproductive goals (was Re: code vetting)

2006-05-06 Thread Edward Elliott
Apologies to the group for getting so OT here. Thanks for your indulgence. Ben Finney wrote: >> I think both your goal and his (spreading free software at the >> expense of non-free) are counterproductive. > > Huh? A goal is counterproductive? By what do you measure > "counterproductive", if no

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Ken Tilton
Alex Martelli wrote: > Ken Tilton <[EMAIL PROTECTED]> wrote: >... > >>True but circular, because my very point is that () was a great design >>choice in that it made macros possible and they made CL almost >>infinitely extensible, while indentation-sensitivity was a mistaken >>design choic

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Paul Rubin
Bill Atkins <[EMAIL PROTECTED]> writes: > Fair enough. But what does Python offer above any garbage-collected > language that makes it so scalable? I think what used to be Lisp culture now uses the *ML languages or Haskell. It's only throwbacks (which includes me sometimes) who still use Lisp. I

Re: ANN: eric3 3.9.0 released

2006-05-06 Thread J. A. Gaeta Mendes
Detlev Offenbach wrote: > Hi, > > this is to inform you of the release of eric3 3.9.0. This version > includes support for Qt4 and PyQt4. Hi, I'm getting a "Segmentation fault" error when trying to execute eric3 although I've installed Qt-3.3.4, QSCintilla-1.65, sip-4.4.3 and PyQt-3.16, in tha

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Paul Rubin
[EMAIL PROTECTED] (Alex Martelli) writes: > > (|(| "your Lisp /is/ rusty.") > > Interestingly, the SECOND lisper to prove himself unable to read the > very text he's quoting. Reread carefully, *USE THE ***SINGLE*** > CHARACTER* ... *AS AN ORDINARY IDENTIFIER*. What makes you read a > ``PART OF''

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Bill Atkins
[EMAIL PROTECTED] (Alex Martelli) writes: > Ken Tilton <[EMAIL PROTECTED]> wrote: >... >> True but circular, because my very point is that () was a great design >> choice in that it made macros possible and they made CL almost >> infinitely extensible, while indentation-sensitivity was a mist

Re: Splice two lists

2006-05-06 Thread Alex Martelli
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Is there a good way to splice two lists together without resorting to a > manual loop? Say I had 2 lists: > > l1 = [a,b,c] > l2 = [1,2,3] > > And I want a list: > > [a,1,b,2,c,3] as the result. > > I've been searching around but I can't seem to fi

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Alex Martelli
Bill Atkins <[EMAIL PROTECTED]> wrote: ... > > > > Read again what I wrote: I very specifically said "ordinary > > *single-character* identifier" (as opposed to "one of many characters > > inside a multi-character identifier"). Why do you think I said > > otherwise, when you just quoted what I

Re: Python Eggs Just install in *ONE* place? Easy to uninstall?

2006-05-06 Thread John J. Lee
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > It appears that apps distributed as Python Eggs are either a single > compressed > blob in site-packages directory or a directory under site-packages > directory. > > Is this ALWAYS true? No. > So by just erasing stuff under site-packages > I c

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Alex Martelli
Ken Tilton <[EMAIL PROTECTED]> wrote: ... > True but circular, because my very point is that () was a great design > choice in that it made macros possible and they made CL almost > infinitely extensible, while indentation-sensitivity was a mistaken > design choice because it makes for very cl

Re: Python Eggs Just install in *ONE* place? Easy to uninstall?

2006-05-06 Thread Jorge Godoy
[EMAIL PROTECTED] wrote: > It appears that apps distributed as Python Eggs are either a single > compressed > blob in site-packages directory or a directory under site-packages > directory. > > Is this ALWAYS true? So by just erasing stuff under site-packages > I can do a COMPLETE uninstallation

Splice two lists

2006-05-06 Thread [EMAIL PROTECTED]
Is there a good way to splice two lists together without resorting to a manual loop? Say I had 2 lists: l1 = [a,b,c] l2 = [1,2,3] And I want a list: [a,1,b,2,c,3] as the result. I've been searching around but I can't seem to find a good example. Thanks, Dan McLeran -- http://mail.python.org

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Bill Atkins
[EMAIL PROTECTED] (Alex Martelli) writes: > Bill Atkins <[EMAIL PROTECTED]> wrote: >... >> > ``allow ( as an ordinary single-character identifier'' as for the >> > unneded feature ``allow unnamed functions with all the flexibility of >> > named ones''. >> >> Not so infeasible: >> >> (let (

Re: the print statement

2006-05-06 Thread mirandacascade
Thank you. Yes, that post answers most of the questions. I now have a bit of an understanding of the \xhh pattern. It's still unclear to me, however, how one can go from the \x92 pattern and arrive at the apostrophe character. Is \x92 theh apostrophe character in another character set? If so,

Re: the print statement

2006-05-06 Thread Tim Roberts
[EMAIL PROTECTED] wrote: > >O/S: Win2K >Vsn of Python: 2.4 > >Here is copy/paste from interactive window of pythonwin: >... >My questions are: >1) is the 'x' character within the variable y a signal that what >follows is a hex value? Sort of; it is the \x pair that signals this. This is in the Py

Re: combined files together

2006-05-06 Thread Gary Wessle
Gary Herron <[EMAIL PROTECTED]> writes: > Gary Wessle wrote: > > >Hi > > > >is there a module to do things like concatenate all files in a given > >directory into a big file, where all the files have the same data > >formate? > >name address phone_no. > > > >or do I have to open each, read from o

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Alex Martelli
Bill Atkins <[EMAIL PROTECTED]> wrote: ... > > ``allow ( as an ordinary single-character identifier'' as for the > > unneded feature ``allow unnamed functions with all the flexibility of > > named ones''. > > Not so infeasible: > > (let ((|bizarrely(named()symbol| 3)) > (+ |bizarrely(na

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Ken Tilton
Alex Martelli wrote: > Ken Tilton <[EMAIL PROTECTED]> wrote: >... > >>Looks like dictionaries are no match for the ambiguity of natural >>language. :) Let me try again: it is Python itself that cannot scale, as >>in gain "new power and capability", and at least in the case of lambda >>it se

Need to send email on HIGH Disk usage

2006-05-06 Thread - C Saha -
Hi Python Worriors   I am looking for a py script which will send me email when ever my disk becomes more than 90% full. By the way my OS is Win XP.   If anybody have already has written same type of script or something very similar kind of script will also be great.  Thanks a lot to all in

Re: Replace

2006-05-06 Thread Eric
On 2006-05-06, Dennis Lee Bieber wrote: > On Sat, 06 May 2006 19:55:35 GMT, Dennis Lee Bieber ><[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > >> splits = encData.split("#", 1) > > Whoops # => = > > Since there are only what, five, escaped characters, th

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Bill Atkins
[EMAIL PROTECTED] (Alex Martelli) writes: > Ken Tilton <[EMAIL PROTECTED]> wrote: >... >> Looks like dictionaries are no match for the ambiguity of natural >> language. :) Let me try again: it is Python itself that cannot scale, as >> in gain "new power and capability", and at least in the ca

Re: the print statement

2006-05-06 Thread Ben Finney
[EMAIL PROTECTED] writes: > My questions are: Mostly answered in the language reference: http://docs.python.org/ref/strings.html> -- \ "Facts are meaningless. You could use facts to prove anything | `\ that's even remotely true!" -- Homer, _The Simpsons_ | _o__)

ANN: pynakotheka v1.0.2

2006-05-06 Thread Iñigo Serna
Hi there, I'm pleased to announce a new bug-fix release of Pynakotheka. Pynakotheka is a simple GPL-licensed python script which generates static HTML photo albums to be added to web sites or to be burnt in CDs. It includes some templates and it's easy to create more. It depends on python, Cheet

Counterproductive goals (was Re: code vetting)

2006-05-06 Thread Ben Finney
Edward Elliott <[EMAIL PROTECTED]> writes: > I think both your goal and his (spreading free software at the > expense of non-free) are counterproductive. Huh? A goal is counterproductive? By what do you measure "counterproductive", if not the goal? > Organizations (and people) should look for th

Re: sort a list of files

2006-05-06 Thread Scott David Daniels
Ryan Forsythe wrote: > Gary Wessle wrote: >> Hi >> >> I am trying to print out the contents of a directory, sorted. > ... >> if I remove ".sort()" at the end of line 6 I get an unsorted list of >> files, if I leave it I get None. who do I fix this? > > `blah.sort()` sorts in-place and returns None

Re: Swaying A Coder Away From Python

2006-05-06 Thread Ten
On Thursday 04 May 2006 12:57, Tim Williams wrote: > > (and why do you > > seem to think that this matters, btw ?) > > I actually think it is complete twaddle For my part, I have to agree with you on this one. In terms of any subjective to-and-fro'ing regarding the languages themselves I did s

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Alex Martelli
Ken Tilton <[EMAIL PROTECTED]> wrote: ... > Looks like dictionaries are no match for the ambiguity of natural > language. :) Let me try again: it is Python itself that cannot scale, as > in gain "new power and capability", and at least in the case of lambda > it seems to be because of indentati

Re: NaN handling

2006-05-06 Thread Robert Kern
Grant Edwards wrote: > On 2006-05-06, Robert Kern <[EMAIL PROTECTED]> wrote: > >Since numpy seems to be working on a variety of platforms/hardware, >how hard would it be to extract this functionality from it to add to >Python proper? Harder than just enabling fpectl. >>> >>>

Re: os.isfile() error

2006-05-06 Thread Adonis
Gary Wessle wrote: > Hi > > could someone help me to find out whats wrong with this code? > > code > import os, sys > > if len(sys.argv) < 2: > sys.exit("please enter a suitable directory.") > > dpath = sys.argv[1] > for name in os.listdir(dpath): > if

os.isfile() error

2006-05-06 Thread Gary Wessle
Hi could someone help me to find out whats wrong with this code? code import os, sys if len(sys.argv) < 2: sys.exit("please enter a suitable directory.") dpath = sys.argv[1] for name in os.listdir(dpath): if os.isfile(dpath+name): infile = open(

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Ken Tilton
Ken Tilton wrote: > > Come on, try just one meaty Common Lisp project at Google. Have someone > port Cells to Python. I got halfway done but decided I would rather be > doing Lisp. uh-oh. Does Python have anything like special variables? :) Omigod. I scare myself sometimes. This would be a gr

the print statement

2006-05-06 Thread mirandacascade
O/S: Win2K Vsn of Python: 2.4 Here is copy/paste from interactive window of pythonwin: >>> x = "Joe's desk" >>> y = 'Joe\x92s desk' >>> type(x) >>> type(y) >>> print x Joe's desk >>> print y Joe's desk >>> if x == y: ... print 'equal' ... else: ... print 'not equal' ... not equal >>> le

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Ken Tilton
Alex Martelli wrote: > Ken Tilton <[EMAIL PROTECTED]> wrote: > > >>Martin P. Hellwig wrote: >> >>>Bill Atkins wrote: >>> >>> How do you define scalability? >>> >>>http://www.google.com/search?hl=en&q=define%3Ascalability&btnG=Google+Search >>> >> >>Damn! Google can do that?! Omigod!!!

Re: NaN handling

2006-05-06 Thread Grant Edwards
On 2006-05-06, Terry Reedy <[EMAIL PROTECTED]> wrote: >> That's Python 2.4.1 on Mac OS X. > float("NaN") > > Traceback (most recent call last): > File "", line 1, in -toplevel- > float("NaN") > ValueError: invalid literal for float(): NaN > > As Tim Peters has said often enough, this so

Re: GladeGen and initializing widgets at startup

2006-05-06 Thread David Reed
On May 6, 2006, at 4:39 PM, Aengys wrote: > Hi all, > > Being struck by article 7421 of the linux journal > (http://www.linuxjournal.com/article/7421), I'll tried to give it a > go. > Mainly because I have done some experiments with Glade and found that > it is really easy to create good lookin

Re: NaN handling

2006-05-06 Thread Grant Edwards
On 2006-05-06, Robert Kern <[EMAIL PROTECTED]> wrote: Since numpy seems to be working on a variety of platforms/hardware, how hard would it be to extract this functionality from it to add to Python proper? >>> >>>Harder than just enabling fpectl. >> >> Last thing I heard fpectl was

GladeGen and initializing widgets at startup

2006-05-06 Thread Aengys
Hi all, Being struck by article 7421 of the linux journal (http://www.linuxjournal.com/article/7421), I'll tried to give it a go. Mainly because I have done some experiments with Glade and found that it is really easy to create good looking GUIs. On the other end, there is the GladeGen tool which

Re: sort a list of files

2006-05-06 Thread Ryan Forsythe
Gary Wessle wrote: > Hi > > I am trying to print out the contents of a directory, sorted. ... > if I remove ".sort()" at the end of line 6 I get an unsorted list of > files, if I leave it I get None. who do I fix this? `blah.sort()` sorts in-place and returns None. You probably want sorted(blah)

Re: Elegent solution to replacing ' and " ?

2006-05-06 Thread fyleow
I'm using PyGreSQL on a PostgreSQL db. I didn't even include my SQL but Serge guessed right and that's what I had. I changed it and it works now. Thanks for the help! :) -- http://mail.python.org/mailman/listinfo/python-list

sort a list of files

2006-05-06 Thread Gary Wessle
Hi I am trying to print out the contents of a directory, sorted. the code 1 import os, sys 2 3 if len(sys.argv) < 2: 4 sys.exit("please enter a suitable directory.") 5 6 print os.listdir(sys.argv[1]).sort() **

Re: [Reported] (was Re: A critic of Guido's blog on Python's lambda)

2006-05-06 Thread Luc The Perverse
"John Bokma" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Reported for excessive crossposting. Did u report yourself? -- LTP :) -- http://mail.python.org/mailman/listinfo/python-list

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Alex Martelli
Ken Tilton <[EMAIL PROTECTED]> wrote: > Martin P. Hellwig wrote: > > Bill Atkins wrote: > > > > > >> > >> How do you define scalability? > >> > > http://www.google.com/search?hl=en&q=define%3Ascalability&btnG=Google+Search > > > > Damn! Google can do that?! Omigod!!! Not joking, I never knew t

Re: NaN handling

2006-05-06 Thread Robert Kern
Alexander Schmolck wrote: > Robert Kern <[EMAIL PROTECTED]> writes: >>Ivan Vinogradov wrote: >>>Since numpy seems to be working on a variety of platforms/hardware, >>>how hard would it be to extract this functionality from it to add to >>>Python proper? >> >>Harder than just enabling fpectl. >

Re: NaN handling

2006-05-06 Thread Robert Kern
Felipe Almeida Lessa wrote: > Em Sex, 2006-05-05 às 16:37 -0400, Ivan Vinogradov escreveu: > >>This works to catch NaN on OSX and Linux: >> >># assuming x is a number >>if x+1==x or x!=x: >> #x is NaN > > This works everywhere: > > nan = float('nan') Have you tried it on Windows? -- Robe

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Thomas F. Burdick
[ I pruned the cross-posting down to a reasonable level ] Ken Tilton <[EMAIL PROTECTED]> writes: > Thomas F. Burdick wrote: > > > This is second-hand, as I don't actually follow Python closely, but > > from what I've heard, they now have reasonable scoping rules (or maybe > > they're about to, I'

Re: Newbie question on code vetting

2006-05-06 Thread Edward Elliott
I'm replying to Ben because William's post is no longer on my news server. <[EMAIL PROTECTED]> wrote: > I would like to offer a couple of links to the kind of stuff I am talking > about w.r.t. the "transparency" issue. > First, some from Eclipse: > http://www.eclipse.org/legal/ See especially the

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Martin P. Hellwig
Paul Rubin wrote: > "Martin P. Hellwig" <[EMAIL PROTECTED]> writes: >>> This is a weird approach. Why not let the "ticket" by the (maybe >>> encrypted) PRNG seed that generates the permutation? >> Because the server that handles the generate request doesn't need to >> be the same as the one that h

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Paul Rubin
"Martin P. Hellwig" <[EMAIL PROTECTED]> writes: > > This is a weird approach. Why not let the "ticket" by the (maybe > > encrypted) PRNG seed that generates the permutation? > > Because the server that handles the generate request doesn't need to > be the same as the one that handles the request

Re: Is this a good use of __metaclass__?

2006-05-06 Thread [EMAIL PROTECTED]
I played around with my old code before I saw your post, and I believe I've found a solution that's a bit neater than what I had before. I thought I could just as well post it if you're interested and have the time. This one uses multiple inheritance, but it's legal and there's only one metaclass.

Re: Replace

2006-05-06 Thread Eric
On 2006-05-06, Tim Williams wrote: > On 06/05/06, Eric <[EMAIL PROTECTED]> wrote: >> I have a string... >> >> str = "tyrtrbd =ffgtyuf == =tyryr =u=p ff" >> >> I want to replace the characters after each '=', what I ended up doing is >> somthing like this... >> >> buf = list(str) >> newchr = '#'

Re: NaN handling

2006-05-06 Thread Terry Reedy
"Ryan Forsythe" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Terry Reedy wrote: >> "Felipe Almeida Lessa" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >>> This works everywhere: >>> >>> nan = float('nan') >> >> Not. >> > nan = float('nan') >> >> Traceback (m

Python Eggs Just install in *ONE* place? Easy to uninstall?

2006-05-06 Thread [EMAIL PROTECTED]
It appears that apps distributed as Python Eggs are either a single compressed blob in site-packages directory or a directory under site-packages directory. Is this ALWAYS true? So by just erasing stuff under site-packages I can do a COMPLETE uninstallation of an Egg? Chris -- http://mail.pyth

Re: NaN handling

2006-05-06 Thread Ryan Forsythe
Terry Reedy wrote: > "Felipe Almeida Lessa" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> This works everywhere: >> >> nan = float('nan') > > Not. > nan = float('nan') > > Traceback (most recent call last): > File "", line 1, in -toplevel- > nan = float('nan') > Va

Re: Is this a good use of __metaclass__?

2006-05-06 Thread [EMAIL PROTECTED]
Hi! Thank you for a quick and informative response! > I'd go for 'manually decorating' anyway. Metaclasses can be really handy > for framework-like stuff, but for the use case you describe, I think the > explicit decorator option is much more, well, explicit - and also more > flexible - than meta

Re: NaN handling

2006-05-06 Thread Terry Reedy
"Felipe Almeida Lessa" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > This works everywhere: > > nan = float('nan') Not. >>> nan = float('nan') Traceback (most recent call last): File "", line 1, in -toplevel- nan = float('nan') ValueError: invalid literal for float(): nan

Re: __getattr__ for global namespace?

2006-05-06 Thread Harold Fellermann
Great! sys.excepthook() is exactly what I was looking for. Thank you. -- http://mail.python.org/mailman/listinfo/python-list

Re: Job opportunity in France

2006-05-06 Thread Butternut squash
Rony Steelandt wrote: > We have a vacancy for a python programmer for a 6 months assignement. > > If interested, please visit www.bucodi.com > > And don't worry we speak english :) > > R_ > seriously, a job opportunity in France?? I heard that the unemployment rate is not doing too well. --

Re: Replace

2006-05-06 Thread Larry Bates
Eric wrote: > I have a string... > > str = "tyrtrbd =ffgtyuf == =tyryr =u=p ff" > > I want to replace the characters after each '=', what I ended up doing is > somthing like this... > > buf = list(str) > newchr = '#' > > count = 0 > for i in range(len(buf)): > if buf[count] == '=': >

Re: NaN handling

2006-05-06 Thread Alexander Schmolck
Felipe Almeida Lessa <[EMAIL PROTECTED]> writes: > Em Sex, 2006-05-05 às 16:37 -0400, Ivan Vinogradov escreveu: > > This works to catch NaN on OSX and Linux: > > > > # assuming x is a number > > if x+1==x or x!=x: > > #x is NaN > > This works everywhere: > > nan = float('nan') > > . > . >

Class Library for Numbers now available for Windows

2006-05-06 Thread Raymond L. Buvel
Due to the contribution of Frank Palazzolo, a Windows binary installer and build instructions are available for the clnum package. This also makes ratfun and rpncalc usable on the Windows platform. The clnum package adds rational numbers and arbitrary precision floating point numbers in real and c

[ANN] clnum-1.2 Class Library For Numbers Python Binding

2006-05-06 Thread Raymond L. Buvel
The clnum package adds rational numbers and arbitrary precision floating point numbers in real and complex form to Python. Also provides arbitrary precision floating point replacements for the functions in the math and cmath standard library modules. Home page: http://calcrpnpy.sourceforge.net/cln

Re: NaN handling

2006-05-06 Thread Felipe Almeida Lessa
Em Sex, 2006-05-05 às 16:37 -0400, Ivan Vinogradov escreveu: > This works to catch NaN on OSX and Linux: > > # assuming x is a number > if x+1==x or x!=x: > #x is NaN This works everywhere: nan = float('nan') . . . if x == nan: # x is not a number -- Felipe. -- http://mail.python

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Ken Tilton
Kay Schluehr wrote: > Ken Tilton wrote: > > >>Oh, my, you are preaching to the herd (?!) of lemmings?! Please tell me >>you are aware that lemmings do not have ears. You should just do Lisp >>all day and add to the open source libraries to speed Lisp's ascendance. >>The lemmings will be liberat

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Ken Tilton
Martin P. Hellwig wrote: > Bill Atkins wrote: > > >> >> How do you define scalability? >> > http://www.google.com/search?hl=en&q=define%3Ascalability&btnG=Google+Search > Damn! Google can do that?! Omigod!!! Not joking, I never knew that,a lways used dictionary.com. Thx! I meant: > The abi

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Ken Tilton
Thomas F. Burdick wrote: > Ken Tilton <[EMAIL PROTECTED]> writes: > > >> Hopefully it can be a big issue and still not justify a flame war. >> >>Mileages will always vary, but one reason for lambda is precisely not >>to have to stop, go make a new function for this one very specific >>use, come

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Martin P. Hellwig
Paul Rubin wrote: > "Martin P. Hellwig" <[EMAIL PROTECTED]> writes: >> and clients make it quite scalable. For example, I'm creating a >> xmlrpcserver that returns a randomized cardlist, but I because of >> fail-over I needed some form of scalability , my solution was to first >> randomize the deck

Re: A critic of Guido's blog on Python's lambda

2006-05-06 Thread Paul Rubin
Paul Rubin writes: > I don't know what good that hardware crypto is doing you, if you're > then writing out the shuffled deck to disk in the clear. Ehhh, I guess you want the crypto hardware to generate physical randomness for each shuffle. I'm skeptical of the value of

Re: how to remove 50000 elements from a 100000 list?

2006-05-06 Thread Ju Hui
to Andrew Gwozdziewycz: Real humor... Peter Otten: thanks your reminder, in my project, a will a superset of b. so symmetric_difference equals difference. thank you all again! -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >