Re: list index()

2007-08-31 Thread MRAB
On Aug 31, 11:05 am, Jon Ribbens [EMAIL PROTECTED] wrote: On 2007-08-31, Erik Max Francis [EMAIL PROTECTED] 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.

Re: So what exactly is a complex number?

2007-08-31 Thread iapain
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? You shouldnt worry about it in python, its pretty large to handle all your calc. --

Re: So what exactly is a complex number?

2007-08-31 Thread Matt McCredie
So what exactly is a complex number? It is a math construct, and has almost nothing to do with Python, other than the fact that Python has a data type for them. So, here is a list of better ways to get information about complex numbers than asking python-list: 1. Google it:

Re: strings (dollar.cents) into floats

2007-08-31 Thread MRAB
On Aug 31, 5:28 pm, Chris Mellon [EMAIL PROTECTED] 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

Re: Biased random?

2007-08-31 Thread Ivan Voras
Mark Dickinson wrote: That's because the call to abs() usually collapses two values to one (e.g. -2 and 2 both end up being 2), but there's only one integer n for which abs(n) == 0. Ah. Need to sleep more. signature.asc Description: OpenPGP digital signature --

Re: strings (dollar.cents) into floats

2007-08-31 Thread David H Wild
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 decimal time values (except us crazy computer folk), you're write 1 pound 4

Re: So what exactly is a complex number?

2007-08-31 Thread Lamonte Harris
Is English your native language? I'm having a hard time decoding your question. dont be an ass About the complex numbers I get what they are in python now. Thanks Paul Boddie -Lamonte. On 8/31/07, Paul Boddie [EMAIL PROTECTED] wrote: On 31 Aug, 18:12, Chris Mellon [EMAIL PROTECTED] wrote:

low level ethernet device access in linux

2007-08-31 Thread Tom Brown
Hi, I have a windows application, written in delphi, that communicates to our devices using raw ethernet frames. I am trying to port this application to linux using python. However, when I try to open a socket, I get this error: File /home/tbrown/projects/discovery/trunk/comm.py, line 9, in

Python 3000 released as 3.0a1

2007-08-31 Thread Guido van Rossum
[Bcc: [EMAIL PROTECTED] The first Python 3000 release is out -- Python 3.0a1. Be the first one on your block to download it! http://python.org/download/releases/3.0/ Excerpts: Python 3000 (a.k.a. Py3k, and released as Python 3.0) is a new version of the language that is incompatible with

Wing IDE 3.0 beta2 released

2007-08-31 Thread Stephan Deibel
Hi, I'm happy to announce the release of Wing IDE 3.0 beta 2. It is available from http://wingware.com/wingide/beta Changes since the previous beta release include: * Stackless Python 2.4 and 2.5 are now supported * Python 2.5 for 64-bit Windows is now supported * Fixed Zope WingDBG so it will

Re: Question involving a Python app...

2007-08-31 Thread sberry
On Aug 31, 8:43 am, sberry [EMAIL PROTECTED] wrote: On Aug 31, 8:25 am, [EMAIL PROTECTED] wrote: On Aug 31, 9:52 am, sberry [EMAIL PROTECTED] wrote: I am a Flash developer (also a Python dev) and I use an editor called SEPY Actionscript Editor. The latest release version does not

Re: So what exactly is a complex number?

2007-08-31 Thread Paul Boddie
On 31 Aug, 18:12, Chris Mellon [EMAIL PROTECTED] wrote: On 8/31/07, Carsten Haese [EMAIL PROTECTED] 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?

Re: Google spreadsheets

2007-08-31 Thread iapain
On Aug 31, 5:40 pm, Michele Simionato [EMAIL PROTECTED] wrote: I would like to upload a tab-separated file to a Google spreadsheet from Python. Does anybody have a recipe handy? TIA, Michele Simionato Probably its irrelevant to python. Use should see Google Spreadsheet API and use it in

Re: reload(sys)

2007-08-31 Thread Steven Bethard
Sönmez Kartal wrote: On 31 A ustos, 04:24, Steven Bethard [EMAIL PROTECTED] wrote: Sönmez Kartal wrote: I've had an encoding issue and solved it by sys.setdefaultencoding('utf-8')... My first try wasn't successful since setdefaultencoding is not named when I imported sys module. After, I

Re: low level ethernet device access in linux

2007-08-31 Thread Grant Edwards
On 2007-08-31, Tom Brown [EMAIL PROTECTED] wrote: I understand that I am getting this error because I am running the application as a user and not as root. I would like to be able to run this app. as a user. Is there a way to create a socket without running the app. as root or sudo? Yes.

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

2007-08-31 Thread Miki
Hello, 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. Of course I wouldn't mind requiring a specific keystroke in the future, but I would think this is simpler for now. I have used kbhit() and getch() many

Re: Looking for Delaunay triangulation module...

2007-08-31 Thread Grant Edwards
On 2007-08-31, Grant Edwards [EMAIL PROTECTED] wrote: So for lack of a delaunay module, I'm stuck trying to port my application to Win32. I've found that VTK contains a Delaunay triangulation module, and Entought Python includes VTK, so that's next on my list of things to try as soon as VTK

troll vs. trawl [was: Re: list index()]

2007-08-31 Thread David Naughton
On Fri, Aug 31, 2007 at 10:27:34AM +0100, Richie Hindle wrote: [Carsten] .. If we start labeling people, this thread will earn you a label that rhymes with roll. [Hendrik] weird this - maybe a native English speaker can comment - when I pronounce what fishermen do -

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

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

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

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

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')): Good

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 possibility

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

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, then? When is it OK to use

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: 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 variable and the pdf

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: 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 out? On a

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

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 experienced

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

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 don't use decimal

Re: Horace Lives!

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

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

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 worth, I too

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

Horace Lives!

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

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

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 would

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 not pronounced.

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 from

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 seems

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

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

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.

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

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 isn't for

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

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 in fact use

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) set up a

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 amount and 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,

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

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

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

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 le

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

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,

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

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 doubt that is

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

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

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 strings). The

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:

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 information

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 simply

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

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

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: 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 bugs, you fix

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

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() will go

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

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

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

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 how

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 vectors. In a 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 vectors. In a vector,

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

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 I have found

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

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

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 45 degree angle.

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

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 current

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

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 an amount and a

<    1   2   3   >