Roundup Issue Tracker release 1.4.2

2008-02-10 Thread Richard Jones
I'm proud to release version 1.4.2 of Roundup. If you're upgrading from an older version of Roundup you *must* follow the Software Upgrade guidelines given in the maintenance documentation. New Features in 1.4.2: - New config option in mail section: ignore_alternatives allows to ignore

[ANN] Release 0.69.0 of Task Coach

2008-02-10 Thread Frank Niessink
Hi, I'm happy to announce release 0.69.0 of Task Coach. This release makes it possible to repeat tasks on either a daily or a weekly basis and to add notes to categories. It also contains a number of other changes and bug fixes. Bugs fixed: * The reminder dialog didn't close when opening the

ANN: next pyCologne meeting, Wed Feb 13, 2008, 6:30 pm

2008-02-10 Thread Christopher Arndt
Dear Pythonistas, the next monthly meeting of pyCologne, the Python User Group Köln, takes place on: Date: Wednesday Feb 13, 2008 Time: 6:30 Uhr pm CET c.t. Venue: Room 0.14 , ground floor, computing centre (RRZK-B) Universität Köln, Berrenrather Str. 136, 50937 Köln Agenda: *

ANN: pyparsing 1.4.11 released

2008-02-10 Thread Paul McGuire
I have just uploaded version 1.4.11 of pyparsing to SourceForge. It has been a pretty full 2 months since the last release, with contributions from new users, old users, and also some help from the Google Highly-Open Participation contest. I think there are some very interesting new features in

Re: Why not a Python compiler?

2008-02-10 Thread mani
On Feb 6, 2:43 am, Luis M. González [EMAIL PROTECTED] wrote: On 5 feb, 05:19, Santiago Romero [EMAIL PROTECTED] wrote: ( Surely if this question has been asked for a zillion of times... ) ( and sorry for my english! ) I'm impressed with python. I'm very happy with the language and I

Re: Better way to negate a boolean list?

2008-02-10 Thread Gary Herron
David Trémouilles wrote: Hi, Is there any better (shorter) way to negate a boolean list than: negated_boolean_list = [not elem for elem in boolean_list] ? I tried: map(not, boolean_list) but it seems that not is not a function. Thanks in advance, David But import module

Re: shelve.open call gives error

2008-02-10 Thread Bernie Woodham
Gabriel Genellina [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] En Sat, 09 Feb 2008 03:35:14 -0200, waltbrad [EMAIL PROTECTED] escribi?: On Feb 8, 5:29 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Fri, 08 Feb 2008 06:36:53 -0200, waltbrad [EMAIL PROTECTED] escribió:

Re: Pure Python Salsa20 Stream Cipher Implementation

2008-02-10 Thread ThunderBug
And FWIW there already exists a pySalsa20, a ctypes wrapper for Bernstein's eSTREAM submission. http://www.seanet.com/~bugbee/crypto/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Recursion limit of pickle?

2008-02-10 Thread Gabriel Genellina
En Sun, 10 Feb 2008 02:09:12 -0200, Victor Lin [EMAIL PROTECTED] escribió: On 2月10日, 上午11時42分, Gabriel Genellina [EMAIL PROTECTED] wrote: En Sat, 09 Feb 2008 09:49:46 -0200, Victor Lin [EMAIL PROTECTED] escribió: I encounter a problem with pickle. I download a html from:

Re: wxpython file dialog

2008-02-10 Thread Janwillem
Guilherme Polo wrote: 2008/2/9, Janwillem [EMAIL PROTECTED]: Is there a way to force the wx.FileDialog to show as default the thumbnails vie in stead of list view? thanks, janwillem -- http://mail.python.org/mailman/listinfo/python-list You should be using

Re: Python Beginner needs help with for loop

2008-02-10 Thread Chris
On Feb 10, 8:06 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I'm trying to write a for loop in place of the string method .replace() to replace a character within a string if it's found. So far, I've got s = raw_input(please enter a string: ) c = raw_input(please enter a character: )

Re: sort functions in python

2008-02-10 Thread Hrvoje Niksic
Steven D'Aprano [EMAIL PROTECTED] writes: I've never seen anything better than bubble sort being called bubble sort. What, you didn't read the post you're replying to? I responded to a specific point about combsort being called bubble sort. I agree that generally the line between bubblesort

Re: Python Beginner needs help with for loop

2008-02-10 Thread John Machin
On Feb 10, 8:26 pm, Chris [EMAIL PROTECTED] wrote: On Feb 10, 8:06 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I'm trying to write a for loop in place of the string method .replace() to replace a character within a string if it's found. So far, I've got s = raw_input(please

Plotting 3d points

2008-02-10 Thread Rasmus Kjeldsen
Anybody know of a simple way to plot 3d points? Nothing fancy, just points. I've tried looking into Mayavi, but can't really find out how to get get 3 arrays (x,y,z) into a vtk file. I've also seen mlab mentioned, but how do I install that, and import it? I can't get the examples i've seen of

Tkinter equiv for setPalette

2008-02-10 Thread Helmut Jarausch
Hi, I am to convert an old Perl-Tk script to Python. It starts by my $MW= new MainWindow; $MW-setPalette(background = 'AntiqueWhite1', foreground = 'blue'); Is there an equivalent for Tkinter? How can I set default colors for background and foreground for the whole application (root window and

Re: wxpython file dialog

2008-02-10 Thread Guilherme Polo
2008/2/10, Janwillem [EMAIL PROTECTED]: Guilherme Polo wrote: 2008/2/9, Janwillem [EMAIL PROTECTED]: Is there a way to force the wx.FileDialog to show as default the thumbnails vie in stead of list view? thanks, janwillem --

Re: wxpython file dialog

2008-02-10 Thread Janwillem
Guilherme Polo wrote: 2008/2/10, Janwillem [EMAIL PROTECTED]: Guilherme Polo wrote: 2008/2/9, Janwillem [EMAIL PROTECTED]: Is there a way to force the wx.FileDialog to show as default the thumbnails vie in stead of list view? thanks, janwillem --

Re: Plotting 3d points

2008-02-10 Thread Elby
Matplotlib as some 3D capabilities too. You can have a look at these examples : http://scipy.org/Cookbook/Matplotlib/mplot3D -- http://mail.python.org/mailman/listinfo/python-list

Re: Better way to negate a boolean list?

2008-02-10 Thread Paddy
On Feb 10, 7:46 am, David Trémouilles [EMAIL PROTECTED] wrote: Hi, Is there any better (shorter) way to negate a boolean list than: negated_boolean_list = [not elem for elem in boolean_list] ? I tried: map(not, boolean_list) but it seems that not is not a function. Thanks in

Re: Better way to negate a boolean list?

2008-02-10 Thread Steve Holden
Paddy wrote: On Feb 10, 7:46 am, David Trémouilles [EMAIL PROTECTED] wrote: Hi, Is there any better (shorter) way to negate a boolean list than: negated_boolean_list = [not elem for elem in boolean_list] ? I tried: map(not, boolean_list) but it seems that not is not a function.

Re: Why not a Python compiler?

2008-02-10 Thread Stefan Behnel
Steven D'Aprano wrote: On Sat, 09 Feb 2008 01:11:09 +, Marc 'BlackJack' Rintsch wrote: On Fri, 08 Feb 2008 05:12:29 -0800, Ryszard Szopa wrote: Expressing simple loops as C for loops... You mean simple loops like ``for i in xrange(1000):``? How should the compiler know what object is

Re: Better way to negate a boolean list?

2008-02-10 Thread Stargaming
On Sun, 10 Feb 2008 08:46:24 +0100, David Trémouilles wrote: [snip] I tried: map(not, boolean_list) but it seems that not is not a function. `not` is not a function, indeed. It is a keyword, allowing you to write ``not x`` instead of ``not(x)``. You can of course write a function that

Re: Plotting 3d points

2008-02-10 Thread Grant Edwards
On 2008-02-10, Elby [EMAIL PROTECTED] wrote: Matplotlib as some 3D capabilities too. You can have a look at these examples : http://scipy.org/Cookbook/Matplotlib/mplot3D I use gnuplot.py for 3D stuff regularly. -- Grant Edwards grante Yow! Alright,

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-10 Thread Grant Edwards
On 2008-02-09, Doug Morse [EMAIL PROTECTED] wrote: Or just the old particle/wave dichotomy... particles travel, waves propagate (that is, the wave form -- crest/dip -- changes position, but the material of the medium it is in just jiggles in place). So, showing of my physics

Re: Tkinter equiv for setPalette

2008-02-10 Thread MASI
Il Sun, 10 Feb 2008 12:03:59 +0100, Helmut Jarausch ha scritto: Hi, I am to convert an old Perl-Tk script to Python. It starts by my $MW= new MainWindow; $MW-setPalette(background = 'AntiqueWhite1', foreground = 'blue'); Is there an equivalent for Tkinter? How can I set default colors

Re: Turn off ZeroDivisionError?

2008-02-10 Thread [EMAIL PROTECTED]
Would a wrapper function be out of the question here? def MyDivision(num, denom): if denom==0: return NaN else return num / denom -- http://mail.python.org/mailman/listinfo/python-list

Tkinter - tk_focusNext broken for years?

2008-02-10 Thread Helmut Jarausch
Hi, I'd like to bind the 'Return' event to a function which does some calculations (like a database lookup) and then invoke tk_focusNext. I get an exception as many others have reported earlier, see http://bugs.python.org/issue799428 There has even a patch been suggested. Why hasn't it been

Re: Is there an easy way to sort a list by two criteria?

2008-02-10 Thread neocortex
Hello! Thank you all, so much! Now I can do double-criteria sort in at least three ways. More than I have expected. Best, PM -- http://mail.python.org/mailman/listinfo/python-list

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Mark Dickinson
On Feb 9, 5:03 pm, Neal Becker [EMAIL PROTECTED] wrote: If I use C code to turn off the hardware signal, will that stop python from detecting the exception, or is python checking for 0 denominator on it's own (hope not, that would waste cycles). Yes, Python does do an explicit check for a zero

Re: Better way to negate a boolean list?

2008-02-10 Thread David Trémouilles
Thanks to all of you for the prompt answer to my question. Just a short feedback: map(not_, boolean_list) looks more readable to me but: [not elem for elem in boolean_list] seems to be slightly faster (ipython timeit results) (python 2.5.1 MacOS X) Not a big deal anyway! Most important for

Re: Better way to negate a boolean list?

2008-02-10 Thread Paddy
On Feb 10, 1:41 pm, Steve Holden [EMAIL PROTECTED] wrote: Paddy wrote: On Feb 10, 7:46 am, David Trémouilles [EMAIL PROTECTED] wrote: Hi, Is there any better (shorter) way to negate a boolean list than: negated_boolean_list = [not elem for elem in boolean_list] ? I tried:

Re: Plotting 3d points

2008-02-10 Thread Paul McGuire
On Feb 10, 4:37 am, Rasmus Kjeldsen [EMAIL PROTECTED] wrote: Anybody know of a simple way to plot 3d points? Nothing fancy, just points. I've tried looking into Mayavi, but can't really find out how to get get 3 arrays (x,y,z) into a vtk file. I've also seen mlab mentioned, but how do I

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Dikkie Dik
Mark Dickinson wrote: On Feb 9, 5:03 pm, Neal Becker [EMAIL PROTECTED] wrote: If I use C code to turn off the hardware signal, will that stop python from detecting the exception, or is python checking for 0 denominator on it's own (hope not, that would waste cycles). Yes, Python does do an

Re: sort functions in python

2008-02-10 Thread Jeff Schwab
Steven D'Aprano wrote: On Sat, 09 Feb 2008 14:28:15 -0800, Jeff Schwab wrote: Steven D'Aprano wrote: On Sat, 09 Feb 2008 13:37:23 -0800, Jeff Schwab wrote: Carl Banks wrote: On Feb 8, 10:09 pm, Jeff Schwab [EMAIL PROTECTED] wrote: If you expect your data to be pretty nearly sorted

python 3.0 memory leaking?

2008-02-10 Thread rupert.thurner
the edgewall trac release 0.11 is blocked now since more than one month for a memory leak nobody is able to find, see http://groups.google.com/group/trac-dev/browse_thread/thread/116e519da54f16b . does python-3.0 improve something to avoid writing memory leaking applications? rupert. --

Reducing types

2008-02-10 Thread bearophileHUGS
For me Python is useful to write code that gives *correct* results, allowing me to write it in a short simple way, with quick debugging cycles (and for other purposes, like to write dynamic code, to use it as glue language to use libraries, to create quick GUIs, as scripting for data munging,

Re: Reducing types

2008-02-10 Thread Paul McGuire
On Feb 10, 1:19 pm, [EMAIL PROTECTED] wrote: So why not adopt the Decimal (IEEE 854) as the standard float for Python (if speed is a concern, than a mfloat type may be introduced, it's a machine float, it's essentially the float of Python 2.5, operations between a float and a mfloat give a

Re: python 3.0 memory leaking?

2008-02-10 Thread Jeroen Ruigrok van der Werven
Hi Rupert, -On [20080210 20:16], rupert.thurner ([EMAIL PROTECTED]) wrote: the edgewall trac release 0.11 is blocked now since more than one month for a memory leak nobody is able to find, see http://groups.google.com/group/trac-dev/browse_thread/thread/116e519da54f16b . You are slightly

Re: python 3.0 memory leaking?

2008-02-10 Thread Christian Heimes
Jeroen Ruigrok van der Werven wrote: For me, a relative newbie to Python, the entire memory allocation issue is not transparent at all and information about it is scattered across the net. One of the things I hope to contribute to in the coming year is to make sure the entire area of Python

Re: python 3.0 memory leaking?

2008-02-10 Thread Christian Heimes
rupert.thurner wrote: does python-3.0 improve something to avoid writing memory leaking applications? No, it doesn't. Python 3.0 and maybe 2.6 are going to have some small improvements but the improvements aren't related to memory leaking. I'm working on the matter for a while now. I've limited

Re: Turn off ZeroDivisionError?

2008-02-10 Thread bearophileHUGS
Mark Dickinson: This is probably the only sane way to deal with differences in platform behaviour when doing float divisions. What Python run on a CPU that doesn't handle the nan correctly? Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: Reducing types

2008-02-10 Thread bearophileHUGS
Paul McGuire: Sounds like you've been reading about Cobra... I have heard about that language (for dotnet?) but my idea doesn't come from Cobra... Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Useful site for beginners

2008-02-10 Thread subeen
This website can be helpful for Python newbies: http://love-python.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Steve Holden
Dikkie Dik wrote: Mark Dickinson wrote: On Feb 9, 5:03 pm, Neal Becker [EMAIL PROTECTED] wrote: If I use C code to turn off the hardware signal, will that stop python from detecting the exception, or is python checking for 0 denominator on it's own (hope not, that would waste cycles). Yes,

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Grant Edwards
On 2008-02-10, Mark Dickinson [EMAIL PROTECTED] wrote: On Feb 9, 5:03 pm, Neal Becker [EMAIL PROTECTED] wrote: If I use C code to turn off the hardware signal, will that stop python from detecting the exception, or is python checking for 0 denominator on it's own (hope not, that would waste

Displaying Unicode Chars

2008-02-10 Thread [EMAIL PROTECTED]
I want to make a little Python utility where a user can enter the unicode numerical code and get the actual symbol back in utf-8. For example, a user could enter something like u221E And get back ∞ Now, this does seem to work: print u\u221E ∞ However how can I change it so it works with a

Re: Useful site for beginners

2008-02-10 Thread James Matthews
If you don't mind me recommending that you include links to python documentation and show new users how they can read the docs and see the info! James On Feb 10, 2008 9:30 PM, subeen [EMAIL PROTECTED] wrote: This website can be helpful for Python newbies: http://love-python.blogspot.com/ --

Re: Displaying Unicode Chars

2008-02-10 Thread James Matthews
Why don't you use ord? 2008/2/10 [EMAIL PROTECTED] [EMAIL PROTECTED]: I want to make a little Python utility where a user can enter the unicode numerical code and get the actual symbol back in utf-8. For example, a user could enter something like u221E And get back ∞ Now, this does seem

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Neal Becker
[EMAIL PROTECTED] wrote: Would a wrapper function be out of the question here? def MyDivision(num, denom): if denom==0: return NaN else return num / denom I bought a processor that has hardware to implement this. Why do I want software to waste time on it? --

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Christian Heimes
Grant Edwards wrote: I've always found that check to be really annoying. Every time anybody asks about floating point handling, the standard response is that Python just does whatever the underlying platform does. Except it doesn't in cases like this. All my platforms do exactly what I want

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Jeff Schwab
Neal Becker wrote: [EMAIL PROTECTED] wrote: Would a wrapper function be out of the question here? def MyDivision(num, denom): if denom==0: return NaN else return num / denom I bought a processor that has hardware to implement this. Why do I want software to

Re: Displaying Unicode Chars

2008-02-10 Thread Martin v. Löwis
I want to make a little Python utility where a user can enter the unicode numerical code and get the actual symbol back in utf-8. For example, a user could enter something like u221E I'm puzzled why the user would enter u221E - why not just 221E? And get back ∞ Now, this does seem to

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Grant Edwards
On 2008-02-10, Christian Heimes [EMAIL PROTECTED] wrote: Grant Edwards wrote: I've always found that check to be really annoying. Every time anybody asks about floating point handling, the standard response is that Python just does whatever the underlying platform does. Except it doesn't

Re: python 3.0 memory leaking?

2008-02-10 Thread rupert.thurner
On Feb 10, 9:08 pm, Christian Heimes [EMAIL PROTECTED] wrote: rupert.thurner wrote: does python-3.0 improve something to avoid writing memory leaking applications? No, it doesn't. Python 3.0 and maybe 2.6 are going to have some small improvements but the improvements aren't related to

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Mark Dickinson
On Feb 10, 3:10 pm, [EMAIL PROTECTED] wrote: What Python run on a CPU that doesn't handle the nan correctly? How about platforms that don't even have nans? I don't think either IBM's hexadecimal floating-point format, or the VAX floating-point formats support NaNs. Python doesn't assume IEEE

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Grant Edwards
On 2008-02-10, Neal Becker [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: Would a wrapper function be out of the question here? def MyDivision(num, denom): if denom==0: return NaN else return num / denom I bought a processor that has hardware to implement

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Grant Edwards
On 2008-02-10, Jeff Schwab [EMAIL PROTECTED] wrote: Neal Becker wrote: [EMAIL PROTECTED] wrote: Would a wrapper function be out of the question here? def MyDivision(num, denom): if denom==0: return NaN else return num / denom I bought a processor that has

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Mark Dickinson
On Feb 10, 3:29 pm, Grant Edwards [EMAIL PROTECTED] wrote: platform does.  Except it doesn't in cases like this. All my platforms do exactly what I want for division by zero: they generate a properly signed INF.  Python chooses to override that (IMO correct) platform behavior with something

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Paul Rubin
Christian Heimes [EMAIL PROTECTED] writes: Python targets both newbies and professionals. That's the reason for two math modules (math and cmath). Ehhh??? cmath is for complex-valued functions, nothing to do with newbies vs. professionals. --

Re: Chinese character error

2008-02-10 Thread John Deas
On Feb 9, 3:00 am, Mark Tolonen [EMAIL PROTECTED] wrote: Chris [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Feb 8, 11:29 am, John Deas [EMAIL PROTECTED] wrote: Hi, I made a small script to recursively copy files from a directory tree to an exportDir only if they have

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Christian Heimes
Grant Edwards wrote: A more efficient implementation? Just delete the code that raises the exception and the HW will do the right thing. Do you really think that the hardware and the C runtime library will do the right thing? Python runs on a lots platforms and architectures. Some of the

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Jeff Schwab
Grant Edwards wrote: On 2008-02-10, Jeff Schwab [EMAIL PROTECTED] wrote: Neal Becker wrote: [EMAIL PROTECTED] wrote: Would a wrapper function be out of the question here? def MyDivision(num, denom): if denom==0: return NaN else return num / denom I bought a

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Christian Heimes
Grant Edwards wrote: You must have gone to a different school than I did. I learned that for IEEE floating point operations a/0. is INF with the same sign as a (except when a==0, then you get a NaN). I'm not talking about CS and IEEE floating point ops. I was referring to plain good old math.

Re: Displaying Unicode Chars

2008-02-10 Thread Bjoern Schliessmann
[EMAIL PROTECTED] wrote: However how can I change it so it works with a string variable? print unicode(\u221E) doesn't seem to do it. Sure, that's because \u only works in unicode strings. You'd need to encode your \u-containing string to a unicode string. Perhaps this'll help: def

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Mark Dickinson
On Feb 10, 4:56 pm, Grant Edwards [EMAIL PROTECTED] wrote: Exactly.  Espeically when Python supposedly leaves floating point ops up to the platform. There's a thread at http://mail.python.org/pipermail/python-list/2005-July/329849.html that's quite relevant to this discussion. See especially

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Ben Finney
Mark Dickinson [EMAIL PROTECTED] writes: On Feb 10, 3:29 pm, Grant Edwards [EMAIL PROTECTED] wrote: platform does.  Except it doesn't in cases like this. All my platforms do exactly what I want for division by zero: they generate a properly signed INF.  Python chooses to override that

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Neal Becker
Christian Heimes wrote: Grant Edwards wrote: A more efficient implementation? Just delete the code that raises the exception and the HW will do the right thing. Do you really think that the hardware and the C runtime library will do the right thing? Python runs on a lots platforms and

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Grant Edwards
On 2008-02-10, Ben Finney [EMAIL PROTECTED] wrote: Mark Dickinson [EMAIL PROTECTED] writes: platform does. platforms do exactly what I want for division by zero: they generate a properly signed INF.  Python chooses to override that (IMO correct) platform behavior with something surprising.

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Grant Edwards
On 2008-02-10, Christian Heimes [EMAIL PROTECTED] wrote: Python's a/0 outcome doesn't violate the standards It does. because Python doesn't promise to follow the IEEE 754 standard in the first place. Whether a certain behavior violates that standard is independant of whether somebody

Help with jabber client in wx

2008-02-10 Thread Astan Chee
Hi, A project Im working on is a jabber client working with wx to interface with uTorrent's webUI using a python API for it. My project can be found here: http://code.google.com/p/gtalktorrent/ A quick note, the project started as a google talk client, but it seems that xmpppy is flexible

Re: Why not a Python compiler?

2008-02-10 Thread castironpi
On Feb 10, 7:29 am, Stefan Behnel [EMAIL PROTECTED] wrote: Steven D'Aprano wrote: On Sat, 09 Feb 2008 01:11:09 +, Marc 'BlackJack' Rintsch wrote: On Fri, 08 Feb 2008 05:12:29 -0800, Ryszard Szopa wrote: Expressing simple loops as C for loops... You mean simple loops like ``for i in

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Carl Banks
On Feb 10, 3:29 pm, Grant Edwards [EMAIL PROTECTED] wrote: On 2008-02-10, Mark Dickinson [EMAIL PROTECTED] wrote: On Feb 9, 5:03 pm, Neal Becker [EMAIL PROTECTED] wrote: If I use C code to turn off the hardware signal, will that stop python from detecting the exception, or is python

Re: Reducing types

2008-02-10 Thread Dan Bishop
On Feb 10, 1:19 pm, [EMAIL PROTECTED] wrote: For me Python is useful to write code that gives *correct* results, allowing me to write it in a short simple way, with quick debugging cycles (and for other purposes, like to write dynamic code, to use it as glue language to use libraries, to

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Mark Dickinson
On Feb 10, 5:50 pm, Ben Finney [EMAIL PROTECTED] wrote: Most people would not want this behaviour either::     0.1     0.10001 Sure. And if it weren't for backwards-compatibility and speed issues one could reasonably propose making Decimal the default floating-point type in

Re: Error on Python

2008-02-10 Thread timr
On Sat, Feb 09, 2008 at 11:05:34PM -0500, Steve Holden wrote: Tim Roberts wrote: maehhheeyy [EMAIL PROTECTED] wrote: Hi, right now I'm using Python and Multicast. I have the code for Multicast receiver on Python but I keep getting this error; File string, line 1, in bind error:

ANN: pyparsing 1.4.11 released

2008-02-10 Thread Paul McGuire
I have just uploaded version 1.4.11 of pyparsing to SourceForge. It has been a pretty full 2 months since the last release, with contributions from new users, old users, and also some help from the Google Highly-Open Participation contest. I think there are some very interesting new features in

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Carl Banks
On Feb 10, 5:50 pm, Ben Finney [EMAIL PROTECTED] wrote: Mark Dickinson [EMAIL PROTECTED] writes: On Feb 10, 3:29 pm, Grant Edwards [EMAIL PROTECTED] wrote: platform does. Except it doesn't in cases like this. All my platforms do exactly what I want for division by zero: they generate

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Mark Dickinson
On Feb 10, 7:08 pm, Carl Banks [EMAIL PROTECTED] wrote: I understand your pain, but Python, like any good general-purpose language, is a compromise.  For the vast majority of programming, division by zero is a mistake and not merely a degenerate case, so Python decided to treat it like one.

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Christian Heimes
Grant Edwards wrote: That would be great. I'm looking forward to review your patch anytime soon. :) Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Mark Dickinson
On Feb 10, 7:07 pm, Grant Edwards [EMAIL PROTECTED] wrote: On 2008-02-10, Christian Heimes [EMAIL PROTECTED] wrote: from somemodule import ieee754 with ieee754: ...    r = a/0 ...    print r inf That would be great. Seriously, in some of my crazier moments I've considered trying to

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Christian Heimes
Mark Dickinson wrote: Any suggestions about how to achieve the above-described state of affairs are welcome! I have worked out a suggestion in three parts. Part 1 -- The PyFloat C API gets two more functions: int PyFloat_SetIEEE754(int new_state) - old state int PyFloat_GetIEEE754(void)

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Ben Finney
Christian Heimes [EMAIL PROTECTED] writes: The two function are exposed to Python code as math.set_ieee754 and math.get_ieee754. Or, better, as a property, 'math.ieee754'. -- \ My, your, his, hers, ours, theirs, its. I'm, you're, he's, | `\ she's, we're,

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Christian Heimes
Ben Finney wrote: Or, better, as a property, 'math.ieee754'. No, it won't work. It's not possible to have a module property. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Edit Python code programmatically

2008-02-10 Thread greg
Guilherme Polo wrote: Generating code like this is always dangerous. Generating code isn't dangerous in itself. What's dangerous is mixing hand-edited and generated code in the same file. There's too much opportunity for hand edits to get wiped out by subsequent automatic edits or vice versa.

packing greyscale values

2008-02-10 Thread jimgardener
hi i am getting value of a pixel of a greyscale image using PIL's image.getdata and need to pack it as an int as below ie greyvalues 127 , 56 , 135 , 99 , 102 , 101 , 146 , 112 , 155 , 154 , 112 , 169 should become -4473925, -8289919, -4144960, -5789785, -5592406, -5658199 ,-3684409, -5131855,

Re: OT: Star Wars and parsecs

2008-02-10 Thread greg
Bjoern Schliessmann wrote: No, even simpler: In the Star Wars galaxy, parsec is a time unit. Yep, it's the Paradoxical Second, defined as the average length of time it takes a person to figure out that the pilot they've hired is feeding them a load of bull for the purpose of finding out how

Re: Turn off ZeroDivisionError?

2008-02-10 Thread Christian Heimes
Christian Heimes wrote: Mark Dickinson wrote: Any suggestions about how to achieve the above-described state of affairs are welcome! I have worked out a suggestion in three parts. [snip] I've implemented my proposal and submitted it to the experimental math branch:

How can I kill CGIHTTPServer ?

2008-02-10 Thread eching
I'm running CGIHTTPServer with the serve_forever method and I cannot get the darn thing to stop unless I kill the command prompt its running in. I searched for similar posts here and found this:

Re: Displaying Unicode Chars

2008-02-10 Thread Martin v. Löwis
Thanks to both of you. Those approaches make sense. Here's the final result if you're curious: http://utilitymill.com/utility/Display_Unicode_Char_From_Hex Not sure what operating system you are using. On Windows, I recommend that you look at the charmap.exe utility. On Linux, try

Professional Grant Proposal Writing Workshop (May 2008: Denver, Colorado)

2008-02-10 Thread Anthony Jones
The Grant Institute's Grants 101: Professional Grant Proposal Writing Workshop will be held in Denver, Colorado, May 14 - 16, 2008. Interested development professionals, researchers, faculty, and graduate students should register as soon as possible, as demand means that seats will fill up

wxpython thread question

2008-02-10 Thread marcinguy
I am new to threading and python. Currently I am working on a GUI app that will be a frontend to CLI client. I want to invoke a method of the class from GUI and run it in the thread. That works well, the problems is I dont know how can I stop this operation, thread if the user would like to

Re: Displaying Unicode Chars

2008-02-10 Thread [EMAIL PROTECTED]
On Feb 10, 4:30 pm, Martin v. Löwis [EMAIL PROTECTED] wrote: I want to make a little Python utility where a user can enter the unicode numerical code and get the actual symbol back in utf-8. For example, a user could enter something like u221E I'm puzzled why the user would enter u221E -

Re: Chinese character error

2008-02-10 Thread Martin v. Löwis
Have you any idea why this is not working on my computer ? Can you please try the listdir operation with the Python distribution from python.org instead of Cygwin Python? Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Help to translate simple VBA code to Python

2008-02-10 Thread Alexandr N Zamaraev
I use Bentley MicroStation through Automation interface. But I do not known how translate some VBA code to Python. For example (Copy Element Example from documentation): code 'The following code starts the command Sub RunCopyElement() CommandState.StartLocate New clsCopyElementCommand End

Re: OT: Speed of light [was Re: Why not a Python compiler?]

2008-02-10 Thread greg
Gabriel Genellina wrote: Before the famous Michelson-Morley experiment (end of s. XIX), some physicists would have said light propagates over ether, some kind of matter that fills the whole space but has no measurable mass, but the experiment failed to show any evidence of it existence.

Re: Turn off ZeroDivisionError?

2008-02-10 Thread greg
Christian Heimes wrote: The state is to be stored and fetched from Python's thread state object. This could slow down floats a bit because every time f/0. occurs the state has to be looked up in the thread state object. An alternative implementation might be to leave zero division traps

Re: Error on Python

2008-02-10 Thread Zara
On Sat, 9 Feb 2008 10:26:26 -0800 (PST), maehhheeyy [EMAIL PROTECTED] wrote: Hi, right now I'm using Python and Multicast. I have the code for Multicast receiver on Python but I keep getting this error; File string, line 1, in bind error: (10049, Can't assign requested address) The error is

Re: Turn off ZeroDivisionError?

2008-02-10 Thread greg
Christian Heimes wrote: I'm not talking about CS and IEEE floating point ops. I was referring to plain good old math. Python targets both newbies and professionals. Maybe there should be another division operator for use by FP professionals? / -- mathematical real division // --

[issue2056] install command rejects --compiler option

2008-02-10 Thread Martin v. Löwis
Changes by Martin v. Löwis: -- resolution: - wont fix status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2056 __ ___ Python-bugs-list mailing list

[issue1762] Inheriting from ABCs makes classes slower.

2008-02-10 Thread Jeffrey Yasskin
Jeffrey Yasskin added the comment: Right. Decimal was just the place I noticed the problem first. Now it affects Rational more, but it's really a problem with ABCs in general, not specific concrete classes. -- title: Inheriting from ABC slows Decimal down. - Inheriting from ABCs makes

  1   2   >