Re: combined files together

2006-05-06 Thread Gary Herron
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 old/write-or-append to new ... > >thanks > > > There's hardl

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

2006-05-06 Thread Alex Martelli
Ken Tilton <[EMAIL PROTECTED]> wrote: ... > > Absolutely. That's why firms who are interested in building *seriously* > > large scale systems, like my employer (and supplier of your free mail ... > > Obviously will not scale. Never. > > > > Well... hardly ever! > > You are talking about b

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

2006-05-06 Thread Alex Martelli
Steve R. Hastings <[EMAIL PROTECTED]> wrote: ... > > But the key in the whole thread is simply that indentation will not > > scale. Nor will Python. > > This is a curious statement, given that Python is famous for scaling well. I think "ridiculous" is a better characterization than "curious",

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

2006-05-06 Thread Kay Schluehr
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 liberated the day Wired puts John Mc

Your email "Server Report" has been Quarantined

2006-05-06 Thread contentsecurity
Your email message To : >From : python-list@python.org Subject : Server Report has been quarantined because it contains one or all of the following: 1. Infected with a worm/script based virus 2. Has a .zip, .exe, .com, .ink, .bat, .scr or .pif extension. The above mentioned files are not perm

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

2006-05-06 Thread Bill Atkins
"Kay Schluehr" <[EMAIL PROTECTED]> writes: > And then the 12th vanished Lisper returns and Lispers are not > suppressed anymore and won't be loosers forever. The world will be The mark of a true loser is the inability to spell 'loser.' Zing! > them as zealots, equipped with the character of sui

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

2006-05-06 Thread Thomas F. Burdick
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 back and use it as the one lambda

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: >... >> > Absolutely. That's why firms who are interested in building *seriously* >> > large scale systems, like my employer (and supplier of your free mail >... >> > Obviously will not scale. Never. >> >

Re: NaN handling

2006-05-06 Thread Dan Bishop
Ivan Vinogradov wrote: > > > > NaNs are handled. > > Throwing an exception would be nice in regular Python (non-scipy). > > This works to catch NaN on OSX and Linux: > > # assuming x is a number > if x+1==x or x!=x: > #x is NaN x != x works, but: >>> x = 1e100 >>> x + 1 == x True -- http

Re: Best IDE for Python?

2006-05-06 Thread mystilleef
What OS? IDEs are overkill, bloated, complex and slow for agile languages like Python. You need an editor that is nimble, fast, simple, powerful and doesn't get in your way. For linux, I suggest Scribes. http://scribes.sf.net http://scribes.sf.net/snippets.htm (Flash Demo) http://www.minds.nuim.

python 2.5a2, gcc 4.1 and memory problems

2006-05-06 Thread Michele Petrazzo
Hi list, 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 Set as set b=set(range(50

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

2006-05-06 Thread Kay Schluehr
Bill Atkins wrote: > "Kay Schluehr" <[EMAIL PROTECTED]> writes: > > > And then the 12th vanished Lisper returns and Lispers are not > > suppressed anymore and won't be loosers forever. The world will be > > The mark of a true loser is the inability to spell 'loser.' Zing! There is not much lost.

Re: Best IDE for Python?

2006-05-06 Thread Michele Petrazzo
Saurabh Sardeshpande wrote: > Pardon if this is already discussed extensively. But what is the best > IDE for Python for a newbie? I have experience in C++ and Java and this > is the first time I am learning a scripting language. > Thanks in advance > Try all the you find! However on linux I find

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

2006-05-06 Thread Martin P. Hellwig
Bill Atkins wrote: > > How do you define scalability? > http://www.google.com/search?hl=en&q=define%3Ascalability&btnG=Google+Search ;-) -- mph -- http://mail.python.org/mailman/listinfo/python-list

Kamaelia & Summer of Code (was Re: Google's Summer of Code - Students coding on MoinMoin )

2006-05-06 Thread Michael
Alexander Schremmer wrote: ... > Just as a sidenote, there are also at least the organisations BBC R&D ( > Kamaelia) and Python Software Foundation (including Python, PyPy, ...) > which offer work on Python software. I only just had a chance to check c.l.p.a - thanks for posting the reference abov

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

2006-05-06 Thread Bill Atkins
"Martin P. Hellwig" <[EMAIL PROTECTED]> writes: > Bill Atkins wrote: > >> >> How do you define scalability? >> > http://www.google.com/search?hl=en&q=define%3Ascalability&btnG=Google+Search > > ;-) > > -- > mph OK, my real question is: what features of Python make it "scalable"? -- This is a

ANN: Eric3-IDE documentation and wiki

2006-05-06 Thread jUrner
Happy to announce that the Eric3 python IDE has found a home for its documentation and wiki! Currently effords are taken to document the user interface of the Eric3-IDE. The documentation and wiki project is hosted at http://ericide.python-hosting.com/ . Everyone interested in Eric is heartly invi

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

2006-05-06 Thread Tomasz Zielonka
Bill Atkins wrote: > OK, my real question is: what features of Python make it "scalable"? Let me guess: Python makes it easier to scale the application on the "features" axis, and the approach to large-scale computation taken by google makes Python's poor raw performance not so big an issue, so it

Re: Active Directory Authentication

2006-05-06 Thread Michael Ströder
Stephan Diehl wrote: > On Fri, 05 May 2006 05:39:08 -0700, D wrote: > >>Is it possible to have Python authenticate with Active Directory? >>Specifically what I'd like to do is have a user enter a >>username/password, then have Python check the credentials with AD - if >>what they entered is valid,

Re: Replace

2006-05-06 Thread vbgunz
pay attention to Ryan. Do not use 'str' as an identifier as you will over write the built-in doing so. this seems easiest so far. s = "tyrtrbd =ffgtyuf == =tyryr =u=p ff" s = s.replace('=', '=#') print s # -> tyrtrbd =#ffgtyuf =#=# =#tyryr =#u=#p ff -- http://mail.python.org/mailman/lis

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

2006-05-06 Thread Martin P. Hellwig
Bill Atkins wrote: > "Martin P. Hellwig" <[EMAIL PROTECTED]> writes: > >> Bill Atkins wrote: >> >>> How do you define scalability? >>> >> http://www.google.com/search?hl=en&q=define%3Ascalability&btnG=Google+Search >> >> ;-) >> >> -- >> mph > > OK, my real question is: what features of Python m

Re: combined files together

2006-05-06 Thread Tim Williams
On 06 May 2006 16:41:45 +1000, Gary Wessle <[EMAIL PROTECTED]> wrote: > 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? If you want to combine text files file1 and file2 into a combined file1 >>>

Re: NaN handling

2006-05-06 Thread Alexander Schmolck
Robert Kern <[EMAIL PROTECTED]> writes: > Ivan Vinogradov wrote: > > > It doesn't seem to be here under OSX either (universal Python install). > > It's not enabled by default. In the source distribution, it is > Modules/fpectlmodule.c . > > > Since numpy seems to be working on a variety of plat

Re: Replace

2006-05-06 Thread Tim Williams
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 = '#' > > count = 0 > for i in range(len(buf)): >

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

2006-05-06 Thread Paddy
Also addressing the Python and scaling question is the kamaelia.sourceforge.net project whos objective is to solve the problems of putting the BBCs vast archives on the web, and who use Python. -- Pad. -- http://mail.python.org/mailman/listinfo/python-list

Re: Building Python (2.4.x) with Visual C++ 2005 Express Edition?

2006-05-06 Thread Vincent Wehren
Heikki Toivonen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] |I did some searches but did not find any definitive answers as to | whether or not it should be possible to build Python 2.4+ with Microsoft | Visual C++ 2005 Express Edition. | | I tried it myself (have VC++ project fil

Re: Replace

2006-05-06 Thread Kent Johnson
Eric wrote: > I have a string... > > str = "tyrtrbd =ffgtyuf == =tyryr =u=p ff" > > I want to replace the characters after each '=', If you are replacing any char after = with # then re.sub() makes it easy: In [1]: import re In [2]: s = "tyrtrbd =ffgtyuf == =tyryr =u=p ff" In [3]: re.s

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

2006-05-06 Thread Paul Rubin
"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 then marshal it and dum

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

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

[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

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

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

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

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

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

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

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)

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

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, 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: 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!!!

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

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

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

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

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

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

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

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

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

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

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

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

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

  1   2   >