ANN: python-ntlm (http://code.google.com/p/python-ntlm/)

2008-12-10 Thread Matthijs
== python-ntlm (http://code.google.com/p/python-ntlm/) == Python library that provides NTLM support, including an authentication handler for urllib2. This library allows you to retrieve content from (usually corporate) servers protected with windows authentication (NTLM) using the python

ETS 3.1.0 released!

2008-12-10 Thread Dave Peterson
I'm pleased to announce that the Enthought Tool Suite (ETS) 3.1.0 has been tagged, released, and uploaded to PyPi! Both source distributions (.tar.gz) and binary (.egg) for Windows have been built and uploaded to PyPi. You can update an existing ETS install to v3.1.0 like so: easy_install -U

Announcing IronPython 2.0

2008-12-10 Thread Dave Fugate
Hello Python Community, The IronPython and Dynamic Language Runtime teams are proud to announce the release of IronPython 2.0 final. IronPython 2.0 is the culmination of nearly two years worth of work resulting in a CPython 2.5 compatible release on .NET 2.0 SP1. By far, the biggest change

Re: Mathematica 7 compares to other languages

2008-12-10 Thread Stef Mientki
On 12/10/08, Xah Lee [EMAIL PROTECTED] wrote: On Dec 8, 5:25 pm, Terry Reedy [EMAIL PROTECTED] wrote: Lest anyone doubt that problem size is important for comparing program run times, consider ... just in case there's any doubt: Simply change these lines in Jon's program: Main[9, 512, 4]

Re: how to get a beep, OS independent ?

2008-12-10 Thread Duncan Booth
Grant Edwards [EMAIL PROTECTED] wrote: On 2008-12-09, greg [EMAIL PROTECTED] wrote: Duncan Booth wrote: If I'm logged in to one of my servers in a large datacentre then I don't what that system to beep as that would be pretty useless. It also might cause the datacentre operators some

Re: memory leak?

2008-12-10 Thread Gabriel Rossetti
Terry Reedy wrote: Gabriel Rossetti wrote: I ran these tests on linux 2.6 (ubuntu 8.04) using python 2.5.2. Have you tried the much newer 2.6? 2.5.3 will be out soon with some bug fixes. Thanks for the reply Terry, I just tried the pyserial example with python 2.6 and it still has the

Curses Blank Background

2008-12-10 Thread Damian Johnson
Does anyone know how to instruct the Python curses bindings to leave the background alone (use the default terminal background)? I'm interested in keeping my semi-transparent background which curses can't replicate. This question was raised on this list before (

filter iterable based on predicate take from another iterable

2008-12-10 Thread [EMAIL PROTECTED]
Hi, is there is a neat way to select items from an iterable based on predicates stored in another iterable without zipping? I can do something like this: import itertools foo = range(10) # select even numbers bar = map(lambda i: i%2, foo) foobarselected = itertools.ifilterfalse(lambda t: t[0],

Re: filter iterable based on predicate take from another iterable

2008-12-10 Thread Peter Otten
[EMAIL PROTECTED] wrote: is there is a neat way to select items from an iterable based on predicates stored in another iterable without zipping? I can do something like this: import itertools foo = range(10) # select even numbers bar = map(lambda i: i%2, foo) foobarselected =

Re: memory leak?

2008-12-10 Thread Gabriel Rossetti
Gabriel Rossetti wrote: Terry Reedy wrote: Gabriel Rossetti wrote: I ran these tests on linux 2.6 (ubuntu 8.04) using python 2.5.2. Have you tried the much newer 2.6? 2.5.3 will be out soon with some bug fixes. Thanks for the reply Terry, I just tried the pyserial example with python

Re: Mathematica 7 compares to other languages

2008-12-10 Thread Jon Harrop
Stef Mientki wrote: Who said Mathematica was a high level language ? Xah is using what he calls highlevelness as an excuse for poor performance. -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?u -- http://mail.python.org/mailman/listinfo/python-list

Re: Announcement: MindTree for Python beta -- feedback appreciated

2008-12-10 Thread greg
Johann Spies wrote: % /usr/local/bin/python3.0 MindTree.pyw Traceback (most recent call last): File MindTree.pyw, line 2, in module from future_builtins import * ImportError: No module named future_builtins Hmmm... does this mean that Python3 has no future? :-) -- Greg --

Re: Best way to report progress at fixed intervals

2008-12-10 Thread eric
Don't mind if I give my shot ? def work(i): Dummy process function, which takes a random time in the interval 0.0-0.5 secs to execute print Work step %d % i time.sleep(0.5 * random.random()) def workAll(work, verbose=True, max_iter=20, progress_interval=1.0): '''

Re: Best way to report progress at fixed intervals

2008-12-10 Thread Slaunger
On 10 Dec., 12:08, eric [EMAIL PROTECTED] wrote: Don't mind if I give my shot ? def work(i):         Dummy process function, which takes a random time in the interval     0.0-0.5 secs to execute         print Work step %d % i     time.sleep(0.5 * random.random()) def workAll(work,

Re: as keyword woes

2008-12-10 Thread Paul Boddie
On 10 Des, 00:00, Steven D'Aprano [EMAIL PROTECTED] cybersource.com.au wrote: Go right ahead. Write your experimental language, and if people like it, they'll use it. That's what Guido did, all those years ago. But don't turn Python into a hodgepodge of features that most people consider

Re: Mathematica 7 compares to other languages

2008-12-10 Thread Almar Klein
2008/12/10 Xah Lee [EMAIL PROTECTED] Jon Harrop moron wrote: Only for trivial input and not for the challenge you were given. what challenge? That code is evaluated once to build the scene. There is no point in optimizing it. The point is optimizing your incompetence. That

Using the `email' module in a bazaar plugin

2008-12-10 Thread Julian Smith
I don't seem to be able to use the `email' module from within a bazaar plugin. Other modules work ok, e.g. nntplib. Here's my plugin, cut-down to show just the email problem: import sys print 'sys.version', sys.version import nntplib n = nntplib.NNTP( 'jsmith-ubuntu2' ) print n

Re: StringIO in 2.6 and beyond

2008-12-10 Thread Bill McClain
On 2008-12-10, ajaksu [EMAIL PROTECTED] wrote: On Dec 9, 5:24 pm, Bill McClain [EMAIL PROTECTED] wrote: On 2008-12-09, MRAB [EMAIL PROTECTED] wrote: In Python 2.x unmarked string literals are bytestrings. In Python 3.x they're Unicode. The intention is to make the transition from 2.x

Re: [OT] Google Groups in bad odour

2008-12-10 Thread Steven D'Aprano
On Wed, 10 Dec 2008 02:20:24 -0800, Frank Millman wrote: Unfortunately it seems that their newsgroup does not have a mail gateway, so I cannot use gmane. (Please correct me if I am wrong). I will therefore have to find a suitable news client. Any recommendations? Pan and KNode. -- Steven

[OT] Google Groups in bad odour

2008-12-10 Thread Frank Millman
Hi all I know there have been complaints about spam on Google Groups over the last few months, with some members rejecting all traffic from them. You might be interested in this comment I got in a reply from someone on comp.os.linux.setup - If you want to be read by a wider audience, you really

Re: Don't you just love writing this sort of thing :)

2008-12-10 Thread Tim Rowe
2008/12/9 Ethan Furman [EMAIL PROTECTED]: Not all code has to be written for everyone. Not all code will be read by the masses. Some code you write for yourself... an expression of who you are, how you think... While my own quirks are not as visually entertaining, I think it's another

Re: forcing future re-import from with an imported module

2008-12-10 Thread Gabriel Genellina
En Tue, 09 Dec 2008 23:27:10 -0200, _wolf [EMAIL PROTECTED] escribió: how can i say, approximately, re-import the present module when it is imported the next time, don’t use the cache in a simple way? i do not want to reload the module, that doesn’t help. I'd say you're using modules the

Re: How do I manually uninstall setuptools (installed by egg)?

2008-12-10 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: On Dec 9, 10:04 pm, Chris Rebert [EMAIL PROTECTED] wrote: So, why do you think apt and not setuptools is The Right Way(tm)? I like to keep 1 Python on my computer. 1. First, there's the system Python, which is installed by my OS and which I try not to mess with

Re: as keyword woes

2008-12-10 Thread Paul Boddie
On 9 Des, 19:23, Chris Mellon [EMAIL PROTECTED] wrote: So hold up a second. I'm out of line for calling someone on making a trollish post that's not relevant to the topic, and for being pretty late to the party even with the part that *was* on topic, and for (even in the original post) going

Re: pickling a circular object inherited from list

2008-12-10 Thread Klaus Kopec
Ned Deily wrote: In article [EMAIL PROTECTED], Klaus Kopec [EMAIL PROTECTED] wrote: What did I do wrong? Old Python version? :) Seems to work in 3.0 (don't have 2.6 currently to check but IMO it's fixed there as well). It works for me with v3.0 as well, but not with v2.6.1 (same error as

Re: Using the `email' module in a bazaar plugin

2008-12-10 Thread Matt Nordhoff
Julian Smith wrote: I don't seem to be able to use the `email' module from within a bazaar plugin. Other modules work ok, e.g. nntplib. Here's my plugin, cut-down to show just the email problem: import sys print 'sys.version', sys.version import nntplib n = nntplib.NNTP(

Re: SequenceMatcher bug ?

2008-12-10 Thread rdmurray
On Tue, 9 Dec 2008 at 22:15, eliben wrote: On Dec 10, 4:12?am, [EMAIL PROTECTED] wrote: On Mon, 8 Dec 2008 at 23:46, eliben wrote: This is about Python 2.5.2 - I don't know if there were fixes to this module in 2.6/3.0 I think I ran into a bug with difflib.SequenceMatcherclass.

Flushing PyQt's Event Queue

2008-12-10 Thread ff
Hi, I am writing an app which models growth of a system over time visually which is activated by button clicks, and when the loop finishes running i dont want any events [mainly clicking on buttons] that happened during the loop to be put into action since then it may run multiple times without

Re: getting error...... Traceback (most recent call last): File stdin, line 1, in module File C:\Python25\Lib\site-packages\xlrd\__init__.py, line 370, in open_workbook biff_version = bk.getb

2008-12-10 Thread JodyGnumeric
On Dec 8, 9:02 pm, John Machin [EMAIL PROTECTED] wrote: On Dec 9, 12:19 pm, JodyGnumeric [EMAIL PROTECTED] wrote: On Dec 8, 5:54 am, John Machin [EMAIL PROTECTED] wrote: On Dec 8, 6:48 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Fri, 05 Dec 2008 02:31:01 -0200, pk sahoo [EMAIL

Re: filter iterable based on predicate take from another iterable

2008-12-10 Thread James Stroud
Peter Otten wrote: [EMAIL PROTECTED] wrote: is there is a neat way to select items from an iterable based on predicates stored in another iterable without zipping? I can do something like this: import itertools foo = range(10) # select even numbers bar = map(lambda i: i%2, foo) foobarselected

Re: StringIO in 2.6 and beyond

2008-12-10 Thread Jean-Paul Calderone
On 10 Dec 2008 11:58:37 GMT, Bill McClain [EMAIL PROTECTED] wrote: On 2008-12-10, ajaksu [EMAIL PROTECTED] wrote: On Dec 9, 5:24 pm, Bill McClain [EMAIL PROTECTED] wrote: On 2008-12-09, MRAB [EMAIL PROTECTED] wrote: In Python 2.x unmarked string literals are bytestrings. In Python 3.x

Re: Using the `email' module in a bazaar plugin

2008-12-10 Thread Julian Smith
On Wed, 10 Dec 2008 12:13:28 + Matt Nordhoff [EMAIL PROTECTED] wrote: Julian Smith wrote: I don't seem to be able to use the `email' module from within a bazaar plugin. Other modules work ok, e.g. nntplib. Here's my plugin, cut-down to show just the email problem: import sys

Re: Announcement: MindTree for Python beta -- feedback appreciated

2008-12-10 Thread Marc 'BlackJack' Rintsch
On Wed, 10 Dec 2008 23:47:05 +1300, greg wrote: Johann Spies wrote: % /usr/local/bin/python3.0 MindTree.pyw Traceback (most recent call last): File MindTree.pyw, line 2, in module from future_builtins import * ImportError: No module named future_builtins Hmmm... does this mean

Re: How do I manually uninstall setuptools (installed by egg)?

2008-12-10 Thread David Cournapeau
On Wed, Dec 10, 2008 at 12:04 PM, Chris Rebert [EMAIL PROTECTED] wrote: On Tue, Dec 9, 2008 at 6:49 PM, [EMAIL PROTECTED] wrote: On Ubuntu, I accidentally manually installed setuptools http://pypi.python.org/pypi/setuptools/0.6c9 (by running the .egg file as a shell script via sudo), and now

Re: Is 3.0 worth breaking backward compatibility?

2008-12-10 Thread Lie Ryan
On Tue, 09 Dec 2008 17:25:59 -0500, Benjamin Kaplan wrote: On Tue, Dec 9, 2008 at 3:56 PM, Lie Ryan [EMAIL PROTECTED] wrote: On Sun, 07 Dec 2008 21:48:46 +, Tim Rowe wrote: snip But that's what a major release number does for you. Modula2 was quite a break from Modula. Think of

Re: Rich Comparisons Gotcha

2008-12-10 Thread Rasmus Fogh
Rhamphoryncus wrote: You grossly overvalue using the in operator on lists. Maybe. But there is more to it than just 'in'. If you do: c = numpy.zeros((2,)) ll = [1, c, 3.] then the following all throw errors: 3 in ll, 3 not in ll, ll.index(3), ll.count(3), ll.remove(3) c in ll, c not in ll,

Re: Rich Comparisons Gotcha

2008-12-10 Thread Rasmus Fogh
Rhodri James wrote: On Mon, 08 Dec 2008 14:24:59 -, Rasmus Fogh wrote: On the minus side there would be the difference between '__equal__' and '__eq__' to confuse people. This is a very big minus. It would be far better to spell __equal__ in such a way as to make it clear why it

Re: as keyword woes

2008-12-10 Thread MRAB
Aaron Brady wrote: On Dec 9, 12:40 pm, MRAB [EMAIL PROTECTED] wrote: Aaron Brady wrote: On Dec 9, 8:28 am, MRAB [EMAIL PROTECTED] wrote: snip In some languages (I think Delphi is one of them - it's been a while!) some words which would normally be identifiers have a special meaning in certain

Re: StringIO in 2.6 and beyond

2008-12-10 Thread pruebauno
On Dec 10, 6:58 am, Bill McClain [EMAIL PROTECTED] wrote: On 2008-12-10, ajaksu [EMAIL PROTECTED] wrote: On Dec 9, 5:24 pm, Bill McClain [EMAIL PROTECTED] wrote: On 2008-12-09, MRAB [EMAIL PROTECTED] wrote: In Python 2.x unmarked string literals are bytestrings. In Python 3.x

Re: StringIO in 2.6 and beyond

2008-12-10 Thread pruebauno
On Dec 10, 10:06 am, [EMAIL PROTECTED] wrote: On Dec 10, 6:58 am, Bill McClain [EMAIL PROTECTED] wrote: On 2008-12-10, ajaksu [EMAIL PROTECTED] wrote: On Dec 9, 5:24 pm, Bill McClain [EMAIL PROTECTED] wrote: On 2008-12-09, MRAB [EMAIL PROTECTED] wrote: In Python 2.x

Re: SequenceMatcher bug ?

2008-12-10 Thread Gabriel Genellina
En Wed, 10 Dec 2008 12:00:30 -0200, [EMAIL PROTECTED] escribió: On Tue, 9 Dec 2008 at 22:15, eliben wrote: On Dec 10, 4:12 am, [EMAIL PROTECTED] wrote: On Mon, 8 Dec 2008 at 23:46, eliben wrote: This is about Python 2.5.2 - I don't know if there were fixes to this module in 2.6/3.0 I think

ANN: python-ntlm - provides NTLM support, including an authentication handler for urllib2

2008-12-10 Thread Matthijs
Announcing: python-ntlm http://code.google.com/p/python-ntlm/ python-ntlm is a library that provides NTLM support, including an authentication handler for urllib2. This library allows you to retrieve content from (usually corporate) servers protected with windows authentication (NTLM) using the

Re: Rich Comparisons Gotcha

2008-12-10 Thread Luis Zarrabeitia
Quoting Rasmus Fogh [EMAIL PROTECTED]: Rhamphoryncus wrote: You grossly overvalue using the in operator on lists. Maybe. But there is more to it than just 'in'. If you do: c = numpy.zeros((2,)) ll = [1, c, 3.] then the following all throw errors: 3 in ll, 3 not in ll, ll.index(3),

Re: Rich Comparisons Gotcha

2008-12-10 Thread M.-A. Lemburg
On 2008-12-10 16:40, Luis Zarrabeitia wrote: Quoting Rasmus Fogh [EMAIL PROTECTED]: Rhamphoryncus wrote: You grossly overvalue using the in operator on lists. Maybe. But there is more to it than just 'in'. If you do: c = numpy.zeros((2,)) ll = [1, c, 3.] then the following all throw errors:

Re: as keyword woes

2008-12-10 Thread Bruno Desthuilliers
Lie a écrit : On Dec 7, 2:38 am, Warren DeLano [EMAIL PROTECTED] wrote: (snip) As someone somewhat knowledgable of how parsers work, I do not understand why a method/attribute name object_name.as(...) must necessarily conflict with a standalone keyword as . It seems to me that it should be

Maintaining signature in help(decorated function)

2008-12-10 Thread jelsas
Hi -- I can't seem to maintain the function signature when applying a decorator. I'm using functools.wraps. Example: def mydecorator(fn): ... from functools import wraps ... # simple decorator ... @wraps(fn) ... def wrapped(*args, **kwargs): ... print 'i\'m

Python music sequencer timing problems

2008-12-10 Thread badmuthahubbard
I've been trying to get the timing right for a music sequencer using Tkinter. First I just loaded the Csound API module and ran a Csound engine in its own performance thread. The score timing was good, being controlled internally by Csound, but any time I moved the mouse I got audio dropouts. It

Re: [OT] Google Groups in bad odour

2008-12-10 Thread Peter Pearson
On Wed, 10 Dec 2008 02:20:24 -0800 (PST), Frank Millman wrote: . . . I will therefore have to find a suitable news client. Any recommendations? I'm a happy user of slrn. -- To email me, substitute nowhere-spamcop, invalid-net. -- http://mail.python.org/mailman/listinfo/python-list

Re: Maintaining signature in help(decorated function)

2008-12-10 Thread Michele Simionato
On Dec 10, 5:07 pm, jelsas [EMAIL PROTECTED] wrote: Hi -- I can't seem to maintain the function signature when applying a decorator.  I'm using functools.wraps.  Example: def mydecorator(fn): ...     from functools import wraps ...     # simple decorator ...     @wraps(fn) ...     def

Re: Flushing PyQt's Event Queue

2008-12-10 Thread Chris Mellon
On Wed, Dec 10, 2008 at 6:30 AM, ff [EMAIL PROTECTED] wrote: Hi, I am writing an app which models growth of a system over time visually which is activated by button clicks, and when the loop finishes running i dont want any events [mainly clicking on buttons] that happened during the loop to

Re: [OT] Google Groups in bad odour

2008-12-10 Thread Cousin Stanley
I will therefore have to find a suitable news client. Any recommendations ? Frank You might try the python-based xpn news client http://xpn.altervista.org/index-en.html To thine own snake be true :-) -- Stanley C. Kitching Human Being Phoenix, Arizona --

Re: To Troll or Not To Troll (aka: as keyword woes)

2008-12-10 Thread Nigel Rantor
James Stroud wrote: Andreas Waldenburger wrote: Is it me, or has c.l.p. developed a slightly harsher tone recently? (Haven't been following for a while.) Yep. I can only post here for about a week or two until someone blows a cylinder and gets ugly because they interpreted something I said

Re: Maintaining signature in help(decorated function)

2008-12-10 Thread jelsas
Thanks! This is exactly what I needed. -- http://mail.python.org/mailman/listinfo/python-list

cx_Oracle issues

2008-12-10 Thread huw_at1
Hey all. When using cx_Oracle to run a procedure like: cursor.execute(select (obj.function(value)) from table where id=blah) I am getting the following error: ORA-06502: PL/SQL: numeric or value error: character string buffer too small ORA-06512: at line 1 Looking at cursor.description I get:

Re: SequenceMatcher bug ?

2008-12-10 Thread eliben
My system is Gentoo, which installs python from source.  Maybe gentoo applies patches that the binary releases don't have. I can't reproduce the problem. I got exactly the same results (0.999...)   with all the releases I have at hand, ranging from 3.0 back to 2.1.3, all   on Windows.

Re: Best way to report progress at fixed intervals

2008-12-10 Thread George Sakkis
On Dec 10, 2:50 am, Slaunger [EMAIL PROTECTED] wrote: Sorry, apparently I did not realize that at first sight. Anyway, I'd rather avoid using further external modules besides the standard batteries, as I would have to update several workstations with different OSes (some of which I do not

Re: as keyword woes

2008-12-10 Thread Patrick Mullen
On Wed, Dec 10, 2008 at 6:57 AM, MRAB [EMAIL PROTECTED] wrote: Aaron Brady wrote: On Dec 9, 12:40 pm, MRAB [EMAIL PROTECTED] wrote: Aaron Brady wrote: On Dec 9, 8:28 am, MRAB [EMAIL PROTECTED] wrote: snip In some languages (I think Delphi is one of them - it's been a while!) some words

Re: as keyword woes

2008-12-10 Thread MRAB
Patrick Mullen wrote: On Wed, Dec 10, 2008 at 6:57 AM, MRAB [EMAIL PROTECTED] wrote: Aaron Brady wrote: On Dec 9, 12:40 pm, MRAB [EMAIL PROTECTED] wrote: Aaron Brady wrote: On Dec 9, 8:28 am, MRAB [EMAIL PROTECTED] wrote: snip In some languages (I think Delphi is one of them - it's been a

get todays files

2008-12-10 Thread Andrew D
I have a script that will login to my ftp server and download all the backup files, but I want it to only download the files that were created today, e.g. if I ran the script today I want it to only fetch files created today. I am really not sure about how to do this, but it is quite important to

Re: get todays files

2008-12-10 Thread Steve Holden
Andrew D wrote: I have a script that will login to my ftp server and download all the backup files, but I want it to only download the files that were created today, e.g. if I ran the script today I want it to only fetch files created today. I am really not sure about how to do this, but it

Re: SequenceMatcher bug ?

2008-12-10 Thread Steve Holden
eliben wrote: My system is Gentoo, which installs python from source. Maybe gentoo applies patches that the binary releases don't have. I can't reproduce the problem. I got exactly the same results (0.999...) with all the releases I have at hand, ranging from 3.0 back to 2.1.3, all on

Re: get todays files

2008-12-10 Thread Andrew D
On Dec 10, 5:55 pm, Steve Holden [EMAIL PROTECTED] wrote: Andrew D wrote: I have a script that will login to my ftp server and download all the backup files, but I want it to only download the files that were created today, e.g. if I ran the script today I want it to only fetch files

Jewel of the Week: Sterling Icon Collection just $39

2008-12-10 Thread JFMoreno
Add a touch of class to your projects with this beautiful icon collection. 262 gorgeous icons for a total of 14934 files in +540mg that will make all your projects shine (Application, Website, Gadget, Game, Desktop, etc.). The collection includes 9 sizes: 16x16, 24x24, 32x32, 48x48, 64x64, 72x72,

Re: get todays files

2008-12-10 Thread Steve Holden
Andrew D wrote: On Dec 10, 5:55 pm, Steve Holden [EMAIL PROTECTED] wrote: Andrew D wrote: I have a script that will login to my ftp server and download all the backup files, but I want it to only download the files that were created today, e.g. if I ran the script today I want it to only

Re: get todays files

2008-12-10 Thread Andrew D
On Dec 10, 6:13 pm, Steve Holden [EMAIL PROTECTED] wrote: Andrew D wrote: On Dec 10, 5:55 pm, Steve Holden [EMAIL PROTECTED] wrote: Andrew D wrote: I have a script that will login to my ftp server and download all the backup files, but I want it to only download the files that were

Python is slow

2008-12-10 Thread cm_gui
http://blog.kowalczyk.info/blog/2008/07/05/why-google-should-sponsor-a-faster-python-vm.html I fully agree with Krzysztof Kowalczyk . Can't they build a faster VM for Python since they love the language so much? Python is SLOW.And I am not comparing it with compiled languages like C. Python

Re: Rich Comparisons Gotcha

2008-12-10 Thread Rhamphoryncus
On Dec 10, 7:49 am, Rasmus Fogh [EMAIL PROTECTED] wrote: Rhamphoryncus wrote: You grossly overvalue using the in operator on lists. Maybe. But there is more to it than just 'in'. If you do: c = numpy.zeros((2,)) ll = [1, c, 3.] then the following all throw errors: 3 in ll, 3 not in ll,

Re: Rich Comparisons Gotcha

2008-12-10 Thread Terry Reedy
Rasmus Fogh wrote: Rhamphoryncus wrote: You grossly overvalue using the in operator on lists. Maybe. But there is more to it than just 'in'. If you do: c = numpy.zeros((2,)) ll = [1, c, 3.] then the following all throw errors: 3 in ll, 3 not in ll, ll.index(3), ll.count(3), ll.remove(3) c

Re: get todays files

2008-12-10 Thread Tim Chase
) code, stamp = results.split(None, 1) assert code == 213, Unexpected result print %s was modified on %s % (filename, stamp) today = '20081210' if stamp[:8] == today: process(filename) else: print ignoring, filename The MDTM command is not part of the core RFC-959, but rather

Re: StringIO in 2.6 and beyond

2008-12-10 Thread Bill McClain
On 2008-12-10, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I think this combination might do the trick (I don't have 2.6 to test it right now): from __future__ import print_function from __future__ import unicode_literals from functools import partial import io print = partial(print, sep=

Deeper tracebacks?

2008-12-10 Thread brooklineTom
I want my exception handler to report the method that originally raised an exception, at the deepest level in the call-tree. Let give an example. import sys, traceback class SomeClass: def error(self): Raises an AttributeError exception. int(3).zork() def perform_(self,

Re: Rich Comparisons Gotcha

2008-12-10 Thread Luis Zarrabeitia
On Wednesday 10 December 2008 10:50:57 am M.-A. Lemburg wrote: On 2008-12-10 16:40, Luis Zarrabeitia wrote: Quoting Rasmus Fogh [EMAIL PROTECTED]: Rhamphoryncus wrote: Rich comparisons were added to Python at the request of the Numeric (now numpy) developers and they have been part of

Re: get todays files

2008-12-10 Thread Andrew D
)    filename = pub/README    results = conn.sendcmd(MDTM %s % filename)    code, stamp = results.split(None, 1)    assert code == 213, Unexpected result    print %s was modified on %s % (filename, stamp)    today = '20081210'    if stamp[:8] == today:      process(filename)    else

Re: Python is slow

2008-12-10 Thread Paul McGuire
On Dec 10, 12:42 pm, cm_gui [EMAIL PROTECTED] wrote: Python is slow. Very slow. And... ? Was there a question or specific suggestion in there somewhere? Do you go to your mechanic and say My car wont go as fast as the other cars on the road! They should make it faster!? Good luck to you in

conratulations.......

2008-12-10 Thread john adam
conratulatios.. Here's my dear friend largest mobile library programs All you care programs : Witness all the programs in the modern world Alkmiotr Honored by your visit You'll see in the blogger 1.If you are suffering from a virus protection programs most important to you AVG Anti-Virus Free

hi...hi.....hi

2008-12-10 Thread john adam
conratulatios.. Here's my dear friend largest mobile library programs All you care programs : Witness all the programs in the modern world Alkmiotr Honored by your visit You'll see in the blogger 1.If you are suffering from a virus protection programs most important to you AVG Anti-Virus Free

Re: get todays files

2008-12-10 Thread Tim Chase
This looks very good and I have tested successfully, but is there a way I can set the today to automatically become todays date in that format? Yes...see the python datetime module[1]...particularly the strftime() call on date/datetime objects. -tkc [1]

Dabo 0.9.0 Released

2008-12-10 Thread Ed Leafe
We are proud (and relieved!) to finally release Dabo 0.9.0, the first official release of the framework in six months. We haven't been taking it easy during that period; rather, we made some changes that clean up some weak spots in the codebase, and as a result can offer a much more solid

Re: Python is slow

2008-12-10 Thread Benjamin Kaplan
On Wed, Dec 10, 2008 at 2:07 PM, Paul McGuire [EMAIL PROTECTED] wrote: On Dec 10, 12:42 pm, cm_gui [EMAIL PROTECTED] wrote: Python is slow. Very slow. And... ? Was there a question or specific suggestion in there somewhere? Do you go to your mechanic and say My car wont go as fast as

Re: Python is slow

2008-12-10 Thread Tim Chase
[nibbling a little flame-bait] Python is even slower than PHP! Just go to any Python website and you will know. An example is: http://www2.ljworld.com/ I'm not sure I'm seeing what you're seeing -- the dynamic page loaded in under 2 seconds -- about on par with sun.com, python.org, php.net

Re: Python is slow

2008-12-10 Thread Thorsten Kampe
* cm_gui (Wed, 10 Dec 2008 10:42:40 -0800 (PST)) Python is SLOW.And I am not comparing it with compiled languages like C. Python is even slower than PHP! Sure. But Perl is faster than Ruby (exactly 2.53 times as fast). And Python is 1.525 times faster than VisualBasic (or was it the

Re: Python is slow

2008-12-10 Thread Jason Scheirer
On Dec 10, 10:42 am, cm_gui [EMAIL PROTECTED] wrote: http://blog.kowalczyk.info/blog/2008/07/05/why-google-should-sponsor-... I fully agree with Krzysztof Kowalczyk . Can't they build a faster VM for Python since they love the language so much? Python is SLOW.    And I am not comparing it

Re: Rich Comparisons Gotcha

2008-12-10 Thread M.-A. Lemburg
On 2008-12-10 20:01, Luis Zarrabeitia wrote: On Wednesday 10 December 2008 10:50:57 am M.-A. Lemburg wrote: On 2008-12-10 16:40, Luis Zarrabeitia wrote: Quoting Rasmus Fogh [EMAIL PROTECTED]: Rhamphoryncus wrote: Rich comparisons were added to Python at the request of the Numeric (now numpy)

Re: Python is slow

2008-12-10 Thread Duncan Booth
Tim Chase [EMAIL PROTECTED] wrote: [nibbling a little flame-bait] Python is even slower than PHP! Just go to any Python website and you will know. An example is: http://www2.ljworld.com/ I'm not sure I'm seeing what you're seeing -- the dynamic page loaded in under 2 seconds --

Re: Python is slow

2008-12-10 Thread George Sakkis
On Dec 10, 1:42 pm, cm_gui [EMAIL PROTECTED] wrote: http://blog.kowalczyk.info/blog/2008/07/05/why-google-should-sponsor-... I fully agree with Krzysztof Kowalczyk . Can't they build a faster VM for Python since they love the language so much? WTF is Krzysztof Kowalczyk and why should we

Re: as keyword woes

2008-12-10 Thread Benjamin Kaplan
On Wed, Dec 10, 2008 at 12:22 PM, Patrick Mullen [EMAIL PROTECTED]wrote: On Wed, Dec 10, 2008 at 6:57 AM, MRAB [EMAIL PROTECTED] wrote: Aaron Brady wrote: On Dec 9, 12:40 pm, MRAB [EMAIL PROTECTED] wrote: Aaron Brady wrote: On Dec 9, 8:28 am, MRAB [EMAIL PROTECTED] wrote: snip

Re: Python is slow

2008-12-10 Thread Stef Mientki
cm_gui wrote: http://blog.kowalczyk.info/blog/2008/07/05/why-google-should-sponsor-a-faster-python-vm.html I fully agree with Krzysztof Kowalczyk . Can't they build a faster VM for Python since they love the language so much? Python is SLOW.And I am not comparing it with compiled languages

Re: SequenceMatcher bug ?

2008-12-10 Thread Gabriel Genellina
En Wed, 10 Dec 2008 15:14:20 -0200, eliben [EMAIL PROTECTED] escribió: My system is Gentoo, which installs python from source.  Maybe gentoo applies patches that the binary releases don't have. I can't reproduce the problem. I got exactly the same results (0.999...)   with all the releases

How to pass out the result from iterated function

2008-12-10 Thread JD
I got a iterated function like this: def iterSomething(list): has_something = False for cell in list: if something in cell: has_something = True output = something if has_something: iterSomething(output) else: final_out = outupt The

Re: Python is slow

2008-12-10 Thread D'Arcy J.M. Cain
On Wed, 10 Dec 2008 21:04:12 +0100 Stef Mientki [EMAIL PROTECTED] wrote: cm_gui wrote: [...] Put this guy in the junk filter, What's the point if people like you are just going to repost his entire message like that? -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three

Re: Python is slow

2008-12-10 Thread Bruno Desthuilliers
cm_gui a écrit : (snip FUD) see also: http://groups.google.com/group/comp.lang.python/browse_frm/thread/5cea684680f63c82 by the same troll^M^M^M^M^Msmart guy. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to pass out the result from iterated function

2008-12-10 Thread Gary Herron
JD wrote: I got a iterated function like this: def iterSomething(list): has_something = False for cell in list: if something in cell: has_something = True output = something if has_something: iterSomething(output) else:

Re: get todays files

2008-12-10 Thread Andrew Doades
Tim Chase wrote: This looks very good and I have tested successfully, but is there a way I can set the today to automatically become todays date in that format? Yes...see the python datetime module[1]...particularly the strftime() call on date/datetime objects. -tkc [1]

Re: How to pass out the result from iterated function

2008-12-10 Thread eric
On Dec 10, 9:16 pm, JD [EMAIL PROTECTED] wrote: I got a iterated function like this: def iterSomething(list):     has_something = False     for cell in list:         if something in cell:             has_something = True             output = something    if has_something:        

upgrading my SIMPL Programming with Python nofee online course need some volunteer testers

2008-12-10 Thread bobicanprogram
SIMPL is an open source project which has been around for almost 10 years. It maintains a very compact interprocesss communication library which gives Linux developers the Send/Receive/Reply messaging paradigm first popularized by QNX almost 30 years ago. (http://www.icanprogram.com/simpl).

Re: Mathematica 7 compares to other languages

2008-12-10 Thread w_a_x_man
On Dec 5, 9:51 am, Xah Lee [EMAIL PROTECTED] wrote: For those of you who don't know linear algebra but knows coding, this means, we want a function whose input is a list of 3 elements say {x,y,z}, and output is also a list of 3 elements, say {a,b,c}, with the condition that a =

getting back into programming

2008-12-10 Thread usawargamer
I used to program in C and Perl (up until 2001) (a little C++ and Java too). Since then I've been a Business Analyst and only coded in VBA/ Excel and written some SQL queries. (we use Sybase) I feel the need for other tools. Primarily I want to write a bunch of small programs to query a

pydb 1.24

2008-12-10 Thread R. Bernstein
This release is to clear out some old issues. It contains some bugfixes, document corrections, and enhancements. Tests were revised for Python 2.6 and Python without readline installed. A bug involving invoking from ipython was fixed. The frame command is a little more like gdb's. Exceptions are

Re: Mathematica 7 compares to other languages

2008-12-10 Thread Dotan Cohen
2008/12/10 [EMAIL PROTECTED]: On Dec 5, 9:51 am, Xah Lee [EMAIL PROTECTED] wrote: For those of you who don't know linear algebra but knows coding, this means, we want a function whose input is a list of 3 elements say {x,y,z}, and output is also a list of 3 elements, say {a,b,c}, with the

looking up function's doc in emacs

2008-12-10 Thread Xah Lee
in programing elisp in emacs, i can press “Ctrl+h f” to lookup the doc for the function under cursor. is there such facility when coding in perl, python, php? (i'm interested in particular python. In perl, i can work around with “perldoc -f functionName”, and in php it's php.net/functionName.

  1   2   3   4   >