Re: list index() (OT)

2007-08-31 Thread Hendrik van Rooyen
"Richie Hindle" wrote: > But - the word for someone who posts to the internet with the intention of > stirring up trouble derives from the word for what fishermen do, not from > the word for something that lives under a bridge. It derives from "trolling > for suckers" or "trolling for newbies".

Re: How to find parent function/class of generators?

2007-08-31 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, J. A. Aczel wrote: > Unfortunately, generator objects don't seem to include any information > about the parent object or function that created them. So add your own. -- http://mail.python.org/mailman/listinfo/python-list

Re: Automation and scheduling of FrontPage publishing using Python

2007-08-31 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Steve Holden wrote: > Lawrence D'Oliveiro wrote: > >> In message <[EMAIL PROTECTED]>, >> [EMAIL PROTECTED] wrote: >> >>> We have numerous web sites which are currently being manually >>> published via Front Page. >>> >>> Doing one or two sites on an ad-hoc basis wa

Re: So what exactly is a complex number?

2007-08-31 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Roy Smith wrote: > In article <[EMAIL PROTECTED]>, > Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: > >> In message <[EMAIL PROTECTED]>, >> Wildemar Wildenburger wrote: >> >> > Tim Daneliuk wrote: >> >> >> >> One of the most common uses for Complex Numbers is in

Re: list index()

2007-08-31 Thread Hendrik van Rooyen
"Paddy" wrote: > > I say the 'oll' in troll like the 'ol' in frolic, and pronounce roll > and role similarly. > > My accent is probably from the East Midlands of the UK, but is not > pronounced. Same here - when the Troll lives under a bridge - I could not think of something to rhyme with it -

Re: status of Programming by Contract (PEP 316)?

2007-08-31 Thread Paul Rubin
Russ <[EMAIL PROTECTED]> writes: > The idea here is that errors in the self-testing code are unlikely > to be correlated with errors in the primary code. Hence, you get a > sort of multiplying effect on reliability. For example, if the > chance of error in the primary code and the self-test code ar

Re: list index()

2007-08-31 Thread Steve Holden
Dennis Lee Bieber wrote: > On Fri, 31 Aug 2007 21:15:10 +0100, DaveM <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > >> No - but I would pronounce "lever" and "fever" the same way, if that helps. >> >To me, those are different... I suppose you also add an > extra "i

Re: How to find out if the interpreter is a debug build?

2007-08-31 Thread Martin v. Löwis
llothar schrieb: > How can i find out if a selected python interpreter (i only know the > path name under which i should start it) is a debug build? I tried > > sys.api_version, sys.platform, sys.version, sys.version_info > > and there is no difference between "python.exe" and "python_d.exe".

Re: list index()

2007-08-31 Thread Hendrik van Rooyen
"Erik Max Francis" wrote: > Hendrik van Rooyen wrote: > > > weird this - maybe a native English speaker can comment - > > when I pronounce what fishermen do - it rhymes with roll, > > but when I am talking about the thing that lives under bridges > > and munches goats, the "O" sound is shorte

Re: status of Programming by Contract (PEP 316)?

2007-08-31 Thread Carl Banks
On Fri, 31 Aug 2007 22:18:09 -0300, Jorge Godoy wrote: > Russ wrote: > >> Alex, I think you are missing the point. Yes, I'm sure that web >> searches are critical to >> Google's mission and commercial success. But the point is that a few >> subtle bugs cannot >> destroy Google. If your search eng

Re: HowTo Use Cython on a Windows XP Box?

2007-08-31 Thread Paul McGuire
On Sep 1, 12:13 am, John Machin <[EMAIL PROTECTED]> wrote: > On Sep 1, 1:40 pm, Paul McGuire <[EMAIL PROTECTED]> wrote: > > > > > > > On Aug 31, 9:06 pm, David Lees <[EMAIL PROTECTED]> wrote: > > > > August 31, 2007 > > > > I just downloaded the current Cython release and have no problem running >

Re: HowTo Use Cython on a Windows XP Box?

2007-08-31 Thread David Bolen
David Lees <[EMAIL PROTECTED]> writes: > Yes, you are correct in understanding my question. I thought my post > was clear, but I guess not. I will go try the pyrex list. You might also try looking for references to distutils support for non-MS compilers, since Pyrex (and presumably Cython) uses

Re: status of Programming by Contract (PEP 316)?

2007-08-31 Thread Russ
On Aug 31, 6:45 pm, Steve Holden > We probably need to distinguish between "mission-critical", where a > program has to work reliably for an organization to meet its goals, and > "safety-critical" where people die or get hurt if the program misbehaves. The term "mission critical" itself can have

Re: HowTo Use Cython on a Windows XP Box?

2007-08-31 Thread David Lees
John Machin wrote: > On Sep 1, 1:40 pm, Paul McGuire <[EMAIL PROTECTED]> wrote: >> On Aug 31, 9:06 pm, David Lees <[EMAIL PROTECTED]> wrote: >> >>> August 31, 2007 >>> I just downloaded the current Cython release and have no problem running >>> the cpython.py translator on the demo code. But when

Re: HowTo Use Cython on a Windows XP Box?

2007-08-31 Thread John Machin
On Sep 1, 1:40 pm, Paul McGuire <[EMAIL PROTECTED]> wrote: > On Aug 31, 9:06 pm, David Lees <[EMAIL PROTECTED]> wrote: > > > August 31, 2007 > > > I just downloaded the current Cython release and have no problem running > > the cpython.py translator on the demo code. But when I try compiling, I >

Re: strings (dollar.cents) into floats

2007-08-31 Thread Grant Edwards
On 2007-09-01, Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: > In message <[EMAIL PROTECTED]>, > sturlamolden wrote: > >> There are fractions that can be exactly represented by floats that >> cannot be exactly represented by decimals. > > There are no such. In that statement does "float" mean fin

Re: Looking for Delaunay triangulation module...

2007-08-31 Thread Grant Edwards
On 2007-09-01, Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: > In message <[EMAIL PROTECTED]>, Grant Edwards wrote: > >> So for lack of a delaunay module, I'm stuck trying to port my >> application to Win32. > > Why not run it under Cygwin? :) :) I'm hoping there is an easier way than trying to

Re: Automation and scheduling of FrontPage publishing using Python

2007-08-31 Thread Steve Holden
Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] wrote: > >> We have numerous web sites which are currently being manually >> published via Front Page. >> >> Doing one or two sites on an ad-hoc basis was not too bad but we are >> now over 20 or thirty at set times d

Re: So what exactly is a complex number?

2007-08-31 Thread Roy Smith
In article <[EMAIL PROTECTED]>, Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: > In message <[EMAIL PROTECTED]>, Wildemar > Wildenburger wrote: > > > Tim Daneliuk wrote: > >> > >> One of the most common uses for Complex Numbers is in what are > >> called "vectors". In a vector, you have both a

Re: Python Unicode to String conversion

2007-08-31 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > The error I keep having is something like this: > ERREUR: Séquence d'octets invalide pour le codage «UTF8» : 0xe02063 It would be useful to see some actual code snippet, traceback listing etc. -- http://mail.python.org/mailman/listinfo

Re: HowTo Use Cython on a Windows XP Box?

2007-08-31 Thread Paul McGuire
On Aug 31, 9:06 pm, David Lees <[EMAIL PROTECTED]> wrote: > August 31, 2007 > > I just downloaded the current Cython release and have no problem running > the cpython.py translator on the demo code. But when I try compiling, I > get an error complaining that my version of Python (which is the curr

Re: Automation and scheduling of FrontPage publishing using Python

2007-08-31 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > We have numerous web sites which are currently being manually > published via Front Page. > > Doing one or two sites on an ad-hoc basis was not too bad but we are > now over 20 or thirty at set times during a business day. Let me open th

Re: How to find out if the interpreter is a debug build?

2007-08-31 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, llothar wrote: > How can i find out if a selected python interpreter (i only know the > path name under which i should start it) is a debug build? What's the difference in their behaviour? -- http://mail.python.org/mailman/listinfo/python-list

Re: So what exactly is a complex number?

2007-08-31 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Wildemar Wildenburger wrote: > Tim Daneliuk wrote: >> >> One of the most common uses for Complex Numbers is in what are >> called "vectors". In a vector, you have both an amount and >> a *direction*. For example, I can say, "I threw 23 apples in the air >> at a 4

Re: Non-Blocking IO

2007-08-31 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, mp wrote: > Calling try3() yields the error: > File "./test.py", line 54, in try3 > print os.read(fout.fileno(),256) > OSError: [Errno 35] Resource temporarily unavailable That's what's supposed to happen. That's telling you there are no bytes currently avail

Re: Important Research Project

2007-08-31 Thread E.D.G.
"E.D.G." <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Important Research Project (Related to computer programming) > > Posted by E.D.G. on August 30, 2007 [EMAIL PROTECTED] This effort was not successful. And I am returning to trying to slowly make progress with the computer

Re: Parameter Passing - String Variable Truncated ?

2007-08-31 Thread goldtech
snip... > > -- > > Try handle.write(repr(sys.argv[1:]) + "\n") > and come back with your conclusions ... unless of course someone has > spoonfed you in the meantime. > > Another clue: write yourself a little arg-dumper script and try > running it in a Command Prompt window.

Re: Python weather application

2007-08-31 Thread dc
On Aug 30, 5:41 pm, Zentrader <[EMAIL PROTECTED]> wrote: > On Aug 30, 12:45 pm, seancron <[EMAIL PROTECTED]> wrote: > > > > > Does anybody have any suggestions for getting started on desigining a > > desktop weather application in Python? > > > I've been looking for access to weather data and while

Non-Blocking IO

2007-08-31 Thread mp
I'm trying to use popen2 to call a program and then write and read data from the program using a Python script. Unfortunately, my calls to read block (I need non-blocking IO), and all the workarounds I've seen online don't work. Here is my most promising solution and how it breaks: Source of solut

Re: So what exactly is a complex number?

2007-08-31 Thread Tim Daneliuk
Wildemar Wildenburger wrote: > Tim Daneliuk wrote: >> A number by itself is called a "scalar". For example, when I say, >> "I have 23 apples", the "23" is a scalar that just represents an >> amount in this case. >> >> One of the most common uses for Complex Numbers is in what are >> called "vector

Re: So what exactly is a complex number?

2007-08-31 Thread Tim Daneliuk
Wildemar Wildenburger wrote: > Tim Daneliuk wrote: >> A number by itself is called a "scalar". For example, when I say, >> "I have 23 apples", the "23" is a scalar that just represents an >> amount in this case. >> >> One of the most common uses for Complex Numbers is in what are >> called "vector

Re: strings (dollar.cents) into floats

2007-08-31 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Wildemar Wildenburger wrote: > But what use is there for floats, then? When is it OK to use > them? Floating-point numbers are useful when you have to deal with very large and very small amounts at the same time. In using them, you must understand something about h

Re: list index()

2007-08-31 Thread Carsten Haese
On Sat, 2007-09-01 at 13:50 +1200, Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Carsten > Haese wrote: > > has_key() will go away, period. It has been made obsolete by "in", which > > is faster and more concise. > > And is also a backdoor way of introducing non-virtual methods into

HowTo Use Cython on a Windows XP Box?

2007-08-31 Thread David Lees
August 31, 2007 I just downloaded the current Cython release and have no problem running the cpython.py translator on the demo code. But when I try compiling, I get an error complaining that my version of Python (which is the current 2.5.1 downloaded from python.org) was compiled with Visual C

Re: strings (dollar.cents) into floats

2007-08-31 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, sturlamolden wrote: > There are fractions that can be exactly represented by floats that > cannot be exactly represented by decimals. There are no such. -- http://mail.python.org/mailman/listinfo/python-list

Re: list index()

2007-08-31 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Carsten Haese wrote: > On Thu, 2007-08-30 at 11:21 -0700, [EMAIL PROTECTED] wrote: > >> I wish they were not >> getting rid of dict.has_key() in Python 3, which I prefer to IN. > > That wish will only come true if you maintain your own fork of Python 3. > has_key()

Re: Parameter Passing - String Variable Truncated ?

2007-08-31 Thread Steve Holden
Steve Holden wrote: [...] >> in_featclass = sys.argv[1] > > Try > >in_featclass = sys.argv[1:] > Sorry, that should have been in_featclass = " ".join(sys.argv[1:])+"\n" regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC/Ltd http://www.ho

Re: status of Programming by Contract (PEP 316)?

2007-08-31 Thread Steve Holden
Jorge Godoy wrote: > Russ wrote: > >> Alex, I think you are missing the point. Yes, I'm sure that web >> searches are critical to >> Google's mission and commercial success. But the point is that a few >> subtle bugs cannot >> destroy Google. If your search engines and associated systems have >> b

Re: Looking for Delaunay triangulation module...

2007-08-31 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Grant Edwards wrote: > So for lack of a delaunay module, I'm stuck trying to port my > application to Win32. Why not run it under Cygwin? :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Parameter Passing - String Variable Truncated ?

2007-08-31 Thread Steve Holden
goldtech wrote: > Hi, > > I'm passing what I think is a string parameter to another Python > program (spawn.py) - see the code snip below. But only the counter > part gets printed to a log file via spawn.py. Yet the echo print to > the output window shows the whole string with the fc part. Bette

Re: Parameter Passing - String Variable Truncated ?

2007-08-31 Thread John Machin
On Sep 1, 9:54 am, goldtech <[EMAIL PROTECTED]> wrote: > Hi, > > I'm passing what I think is a string parameter to another Python > program (spawn.py) - see the code snip below. But only the counter > part gets printed to a log file via spawn.py. Yet the echo print to > the output window shows th

Re: How can I wait for all the threads I spawn for 5 minutes

2007-08-31 Thread Steve Holden
herman wrote: > Hi, > > In my python program, I would to like to spwan 5 threads, for the them > for 5 minutes maximum and the continue. Here is my script: > > threads = [] > > for j in range(5): > t = MyThread() > threads.append(t) > >

Re: status of Programming by Contract (PEP 316)?

2007-08-31 Thread Russ
Ricardo Aráoz wrote: > Actually my point was that if a program is to be trusted in a critical > situation (critical as in catastrophe if it goes wrong) then the OS, the > compiler/interpreter etc should abide by the same rules. That is > obviously not possible, so there's not much case in making

Re: status of Programming by Contract (PEP 316)?

2007-08-31 Thread Jorge Godoy
Russ wrote: > Alex, I think you are missing the point. Yes, I'm sure that web > searches are critical to > Google's mission and commercial success. But the point is that a few > subtle bugs cannot > destroy Google. If your search engines and associated systems have > bugs, you fix them > (or simpl

How to find out if the interpreter is a debug build?

2007-08-31 Thread llothar
How can i find out if a selected python interpreter (i only know the path name under which i should start it) is a debug build? I tried sys.api_version, sys.platform, sys.version, sys.version_info and there is no difference between "python.exe" and "python_d.exe". I'm pretty sure the informati

Re: Python Unicode to String conversion

2007-08-31 Thread Carsten Haese
On Fri, 2007-08-31 at 15:55 -0700, [EMAIL PROTECTED] wrote: > Hi everyone, > > I'm having quite some troubles trying to convert Unicode to String > (for use in psycopg, which apparently doesn't know how to cope with > unicode strings). > > The error I keep having is something like this: > ERREUR:

Re: Python Unicode to String conversion

2007-08-31 Thread John Machin
On Sep 1, 9:56 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > On 8/31/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > Hi everyone, > > > I'm having quite some troubles trying to convert Unicode to String > > (for use in psycopg, which apparently doesn't know how to cope with > > unicode str

Re: So what exactly is a complex number?

2007-08-31 Thread Roy Smith
Wildemar Wildenburger <[EMAIL PROTECTED]> wrote: > Again, that is just one way to interpret them. Complex numbers are not > vectors (at least no moe than real numbers are). OK, let me take a shot at this. Math folks like to group numbers into sets. One of the most common sets is the set of int

Re: Python Unicode to String conversion

2007-08-31 Thread John Machin
On Sep 1, 8:55 am, [EMAIL PROTECTED] wrote: > Hi everyone, > > I'm having quite some troubles trying to convert Unicode to String > (for use in psycopg, which apparently doesn't know how to cope with > unicode strings). > > The error I keep having is something like this: > ERREUR: Séquence d'octet

Re: status of Programming by Contract (PEP 316)?

2007-08-31 Thread Ricardo Aráoz
Neil Cerutti wrote: > On 2007-08-31, Ricardo Aráoz <[EMAIL PROTECTED]> wrote: >> Russ wrote: >>> Yes, thanks for reminding me about that. With SPARK Ada, it is >>> possible for some real (non-trivial) applications to formally >>> (i.e., mathematically) *prove* correctness by static analysis. >>> I

Re: Python Unicode to String conversion

2007-08-31 Thread Chris Mellon
On 8/31/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi everyone, > > I'm having quite some troubles trying to convert Unicode to String > (for use in psycopg, which apparently doesn't know how to cope with > unicode strings). > > The error I keep having is something like this: > ERREUR: Séq

Parameter Passing - String Variable Truncated ?

2007-08-31 Thread goldtech
Hi, I'm passing what I think is a string parameter to another Python program (spawn.py) - see the code snip below. But only the counter part gets printed to a log file via spawn.py. Yet the echo print to the output window shows the whole string with the fc part. Better explained below I hope, th

Re: parsing response from SOAPpy request

2007-08-31 Thread Larry Bates
seancron wrote: > I'm using SOAPpy to access weather data from the NOAA National Digital > Forecast Database XML Web Service [1] and I've been having > trouble figuring out how to parse the data. > > The response comes back as XML document but when I check it with > type(result) it shows the the r

How can I wait for all the threads I spawn for 5 minutes

2007-08-31 Thread herman
Hi, In my python program, I would to like to spwan 5 threads, for the them for 5 minutes maximum and the continue. Here is my script: threads = [] for j in range(5): t = MyThread() threads.append(t) for t in threads:

Re: Python Unicode to String conversion

2007-08-31 Thread Larry Bates
[EMAIL PROTECTED] wrote: > Hi everyone, > > I'm having quite some troubles trying to convert Unicode to String > (for use in psycopg, which apparently doesn't know how to cope with > unicode strings). > > The error I keep having is something like this: > ERREUR: Séquence d'octets invalide pour l

Re: Is there a simple way to exit a while loop on keystroke?

2007-08-31 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, gsxg wrote: > I am new to python, and have written a simple program to read a port > via telnet. I would like it to run until any key is pressed. Did you mean "telnet" or did you mean "local terminal"? For a local terminal, the following demo script should give yo

Re: fcntl problems

2007-08-31 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Miles wrote: > except IOError, e: > if e.args[0] == 35: Why not except IOError, (ErrNo, Msg) : if ErrNo == errno.EAGAIN : -- http://mail.python.org/mailman/listinfo/python-list

parsing response from SOAPpy request

2007-08-31 Thread seancron
I'm using SOAPpy to access weather data from the NOAA National Digital Forecast Database XML Web Service [1] and I've been having trouble figuring out how to parse the data. The response comes back as XML document but when I check it with type(result) it shows the the response is a string. Does a

Python Unicode to String conversion

2007-08-31 Thread thijs . braem
Hi everyone, I'm having quite some troubles trying to convert Unicode to String (for use in psycopg, which apparently doesn't know how to cope with unicode strings). The error I keep having is something like this: ERREUR: Séquence d'octets invalide pour le codage «UTF8» : 0xe02063 (sorry, local

Re: So what exactly is a complex number?

2007-08-31 Thread Wildemar Wildenburger
Tim Daneliuk wrote: > A number by itself is called a "scalar". For example, when I say, > "I have 23 apples", the "23" is a scalar that just represents an > amount in this case. > > One of the most common uses for Complex Numbers is in what are > called "vectors". In a vector, you have both an a

Re: Question involving a Python app...

2007-08-31 Thread Wildemar Wildenburger
Simon Brunning wrote: > On 8/31/07, sberry <[EMAIL PROTECTED]> wrote: >> So, how do I create an executable (on Windows) >> to install the program so it will run without the aforementioned >> framework being installed? > > Check out py2exe. > Uhm, just an idea ... Can't we (that is, someone else)

Re: strings (dollar.cents) into floats

2007-08-31 Thread John Machin
On Sep 1, 4:58 am, MRAB <[EMAIL PROTECTED]> wrote: > On Aug 31, 5:39 pm, David H Wild <[EMAIL PROTECTED]> wrote:> In article > <[EMAIL PROTECTED]>, > >Chris Mellon <[EMAIL PROTECTED]> wrote: > > > > I believe that to the degree that "real" accounting was done in those > > > currencies it did i

Re: strings (dollar.cents) into floats

2007-08-31 Thread John Machin
On Sep 1, 4:51 am, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Fri, 31 Aug 2007 12:06:49 -0400, Steve Holden <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > That last sentence is patent nonsense, and completely untrue. Many > > satisfactory financial applications have

Re: Biased random?

2007-08-31 Thread Robert Kern
Jeffrey Barish wrote: > I'm sorry that I took the time to respond. I'm sorry. I didn't intend my post to be as harsh as it was. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it

Re: Is there a simple way to exit a while loop on keystroke?

2007-08-31 Thread kyosohma
On Aug 31, 3:55 pm, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > On Aug 31, 7:11 pm, gsxg <[EMAIL PROTECTED]> wrote: > > > Thanks, > > The curses library doesn't look to helpful to me. > > And yet it is. > > -- > Arnaud Maybe the OP is on Windows. The docs seem to indicate that the curses module

Re: reload() gone?

2007-08-31 Thread Chris Mellon
On 8/31/07, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > On Aug 31, 7:10 pm, "Bernard Lebel" <[EMAIL PROTECTED]> wrote: > > I read in the Python 3.0 documentation that reload() was removed, > > without further explanations. > > > > http://docs.python.org/dev/3.0/whatsnew/3.0.html?highlight=reload

Re: [python 3.0] reload() gone?

2007-08-31 Thread Terry Reedy
"Bernard Lebel" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] |I read in the Python 3.0 documentation that reload() was removed, | without further explanations. | | http://docs.python.org/dev/3.0/whatsnew/3.0.html?highlight=reload The .a1 release docs are a bit skimpy in places. R

Re: reload() gone?

2007-08-31 Thread Arnaud Delobelle
On Aug 31, 7:10 pm, "Bernard Lebel" <[EMAIL PROTECTED]> wrote: > I read in the Python 3.0 documentation that reload() was removed, > without further explanations. > > http://docs.python.org/dev/3.0/whatsnew/3.0.html?highlight=reload > > So what are we supposed to do to reload modules? > PEP 3100 sa

Re: Is there a simple way to exit a while loop on keystroke?

2007-08-31 Thread half . italian
On Aug 31, 11:11 am, gsxg <[EMAIL PROTECTED]> wrote: > Thanks, > The curses library doesn't look to helpful to me. However using CTRL- > C is fine and is working nicely. > > BTW, it should be "time.sleep(1)" in the example above, instead of > just > "sleep(1)" (Just in case any other newbies like

Re: Is there a simple way to exit a while loop on keystroke?

2007-08-31 Thread Arnaud Delobelle
On Aug 31, 7:11 pm, gsxg <[EMAIL PROTECTED]> wrote: > Thanks, > The curses library doesn't look to helpful to me. And yet it is. -- Arnaud -- http://mail.python.org/mailman/listinfo/python-list

Re: Biased random?

2007-08-31 Thread Jeffrey Barish
I'm sorry that I took the time to respond. -- Jeffrey Barish -- http://mail.python.org/mailman/listinfo/python-list

Re: Registering a python function in C

2007-08-31 Thread [EMAIL PROTECTED]
On Aug 31, 3:33 pm, fernando <[EMAIL PROTECTED]> wrote: > Thanks for the responses. To be more specific, this code is part of a > Maya plugin. The funcion MFnPlugin::registerUI takes a pointer to a > PyObject which is the function that will set up the UI for that > plugin. The code Matimus posted s

Re: status of Programming by Contract (PEP 316)?

2007-08-31 Thread Russ
Steve Holden wrote: > Well that's a healthy attitude, but I am concerned that the Python > community should be as welcoming as possible, so I don't like the fact > that you feel you are being treated differently from anyone else. I certainly appreciate that. And I will try my best to refrain fro

Re: OT: pronounciation [was: list index()]

2007-08-31 Thread Paddy
On Aug 31, 11:19 am, Tim Golden <[EMAIL PROTECTED]> wrote: > Tim Golden wrote: > > Erik Max Francis wrote: > >> Paddy wrote: > > >>> I say the 'oll' in troll like the 'ol' in frolic, and pronounce roll > >>> and role similarly. > > >>> My accent is probably from the East Midlands of the UK, but is

Re: list index()

2007-08-31 Thread DaveM
On Fri, 31 Aug 2007 02:37:15 -0700, Erik Max Francis <[EMAIL PROTECTED]> wrote: >_Troll_ and _frolic_ aren't pronounced with the same "o" sound in any >accent I've ever heard of. You've never heard an English accent then. >Which you pronounce _boat_ and _bot_ the same way, too? No - but I wo

Re: strings (dollar.cents) into floats

2007-08-31 Thread David H Wild
In article <[EMAIL PROTECTED]>, MRAB <[EMAIL PROTECTED]> wrote: > > When I worked on the British Railways National Payroll system, about > > 35 years ago, we, in common with many large users, wrote our system to > > deal with integer amounts of pennies, and converted to pounds, > > shillings and

Re: status of Programming by Contract (PEP 316)?

2007-08-31 Thread Russ
Neil Cerutti wrote: > Who watches the watchmen? The contracts are composed by the > programmers writing the code. Is it likely that the same person > who wrote a buggy function will know the right contract? The idea here is that errors in the self-testing code are unlikely to be correlated with

Re: So what exactly is a complex number?

2007-08-31 Thread Steve Holden
Carsten Haese wrote: > On Fri, 2007-08-31 at 11:13 -0600, Lamonte Harris wrote: >>> Is English your native language? I'm having a hard time decoding your >> question. >> dont be an ass > > I'm sorry you took it this way. I was only trying to help. It won't > happen again. > For what it's wort

Re: Registering a python function in C

2007-08-31 Thread fernando
Thanks for the responses. To be more specific, this code is part of a Maya plugin. The funcion MFnPlugin::registerUI takes a pointer to a PyObject which is the function that will set up the UI for that plugin. The code Matimus posted seems to me exactly like what I need to do, except that maya give

Re: JavaScript

2007-08-31 Thread MC
Hi! I know "how to", but only with IE on windows. -- @-salutations Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: Horace Lives!

2007-08-31 Thread MC
Mégalo! -- @-salutations Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: strings (dollar.cents) into floats

2007-08-31 Thread Steve Holden
MRAB wrote: > On Aug 31, 5:39 pm, David H Wild <[EMAIL PROTECTED]> wrote: >> In article <[EMAIL PROTECTED]>, >>Chris Mellon <[EMAIL PROTECTED]> wrote: >> >>> I believe that to the degree that "real" accounting was done in those >>> currencies it did in fact use non-decimal bases. Just as people

Horace Lives!

2007-08-31 Thread Hugh Jampton
http://horace-vitreouschina.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: status of Programming by Contract (PEP 316)?

2007-08-31 Thread Steve Holden
Russ wrote: > Steve Holden wrote: > >> Frankly I am getting a little tired of they way you are unable to even >> recognize that your readers may well have a sensible appreciation of the >> difficulties about which you write. As has been pointed out already, >> many readers here are extremely exper

Re: status of Programming by Contract (PEP 316)?

2007-08-31 Thread Russ
Alex Martelli wrote: > Russ specifically mentioned *mission-critical applications* as being > outside of Python's possibilities; yet search IS mission critical to > Google. Yes, reliability is obtained via a "systems approach", Alex, I think you are missing the point. Yes, I'm sure that web sea

code check for modifying sequence while iterating over it?

2007-08-31 Thread Neal Becker
After just getting bitten by this error, I wonder if any pylint, pychecker variant can detect this error? -- http://mail.python.org/mailman/listinfo/python-list

Re: fcntl problems

2007-08-31 Thread Michael J. Fromberger
In article <[EMAIL PROTECTED]>, "mhearne808[insert-at-sign-here]gmail[insert-dot-here]com" <[EMAIL PROTECTED]> wrote: > Looking at my flock(3) man page, I'm guessing that "35" is the error > code for EWOULDBLOCK. Which system header file am I supposed to look > in to figure that magic number o

Re: strings (dollar.cents) into floats

2007-08-31 Thread MRAB
On Aug 31, 5:39 pm, David H Wild <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, >Chris Mellon <[EMAIL PROTECTED]> wrote: > > > I believe that to the degree that "real" accounting was done in those > > currencies it did in fact use non-decimal bases. Just as people don't > > use de

Re: status of Programming by Contract (PEP 316)?

2007-08-31 Thread Russ
Steve Holden wrote: > Frankly I am getting a little tired of they way you are unable to even > recognize that your readers may well have a sensible appreciation of the > difficulties about which you write. As has been pointed out already, > many readers here are extremely experienced programmers.

Re: Biased random?

2007-08-31 Thread Robert Kern
Jeffrey Barish wrote: > Robert Kern wrote: > >> Ivan Voras wrote: >>> Jeffrey Barish wrote: >>> If you take the difference between two uniformly distributed random variables, the probability density function forms an isosceles triangle centered at 0. Take the absolute value of that

Re: So what exactly is a complex number?

2007-08-31 Thread Carsten Haese
On Fri, 2007-08-31 at 11:13 -0600, Lamonte Harris wrote: > >Is English your native language? I'm having a hard time decoding your > question. > dont be an ass I'm sorry you took it this way. I was only trying to help. It won't happen again. -- Carsten Haese http://informixdb.sourceforge.net

Re: strings (dollar.cents) into floats

2007-08-31 Thread Steve Holden
Chris Mellon wrote: > On 8/31/07, Steve Holden <[EMAIL PROTECTED]> wrote: >> sturlamolden wrote: >>> On 31 Aug, 02:12, Wildemar Wildenburger >>> <[EMAIL PROTECTED]> wrote: >>> I've heard (ok, read) that several times now and I understand the argument. But what use is there for floats, the

Re: list index()

2007-08-31 Thread Steve Holden
Alex Martelli wrote: > [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >... >> Why wouldn't "the one obvious way" be: >> >> def inAnotB(A, B): >> inA = set(os.listdir(A)) >> inBs = set(os.listdir(B)) >> return inA.difference(inBs) > > If you want a set as the result, that's one p

Re: platform system may be Windows or Microsoft since Vista

2007-08-31 Thread Klaas
On Aug 31, 9:47 am, [EMAIL PROTECTED] wrote: > Let's suppose you get Python for Vista Windows today > fromhttp://www.python.org/download/. > > Should you then conclude that the tests: > > if platform.system() in ('Windows', 'Microsoft'): > if not (platform.system() in ('Windows', 'Microsoft')): G

Re: list index()

2007-08-31 Thread Steve Holden
Paddy wrote: > On Aug 31, 8:47 am, Erik Max Francis <[EMAIL PROTECTED]> wrote: >> Hendrik van Rooyen wrote: >>> weird this - maybe a native English speaker can comment - >>> when I pronounce what fishermen do - it rhymes with roll, >>> but when I am talking about the thing that lives under bridges

Re: Joining Big Files

2007-08-31 Thread vasudevram
On Aug 27, 12:43 am, mcl <[EMAIL PROTECTED]> wrote: > All, > > Thank you very much. > > As my background is much smaller memory machines than today's giants - > 64k being abigmachine and 640k being gigantic. I get very worried > about crashing machines when copying or editingbigfiles, especially >

Re: Is there a simple way to exit a while loop on keystroke?

2007-08-31 Thread gsxg
Thanks, The curses library doesn't look to helpful to me. However using CTRL- C is fine and is working nicely. BTW, it should be "time.sleep(1)" in the example above, instead of just "sleep(1)" (Just in case any other newbies like me read this) Thanks again -- http://mail.python.org/mailman/l

[python 3.0] reload() gone?

2007-08-31 Thread Bernard Lebel
I read in the Python 3.0 documentation that reload() was removed, without further explanations. http://docs.python.org/dev/3.0/whatsnew/3.0.html?highlight=reload So what are we supposed to do to reload modules? Thanks Bernard -- http://mail.python.org/mailman/listinfo/python-list

Re: status of Programming by Contract (PEP 316)?

2007-08-31 Thread Russ
Michele Simionato wrote: > I am curious. Why do you think I attacked you? The conversion went as > follows: I don't think you attacked me. I was referring to another person, who apparently came to your defense and *did* attack me. For the record, I apologize for saying that you don't seem to kn

Re: So what exactly is a complex number?

2007-08-31 Thread Tim Daneliuk
Carsten Haese wrote: > On Thu, 2007-08-30 at 20:11 -0500, Lamonte Harris wrote: >> Like in math where you put letters that represent numbers for place >> holders to try to find the answer type complex numbers? > > Is English your native language? I'm having a hard time decoding your > question. >

  1   2   3   >