Re: Portable general timestamp format, not 2038-limited

2007-07-11 Thread Hendrik van Rooyen
greg [EMAIL PROTECTED] wrote: Another thought: If the cosmologists ever decide if and when the Big Crunch is going to happen, we may be able to figure out once and for all how many bits we need in the timestamp. Unless of course, its all an oscillation - bang, crunch, bang, crunch, as

Re: Should I use Python for these programs?

2007-07-10 Thread Hendrik van Rooyen
CC [EMAIL PROTECTED] wrote: I have considerable C and assembly language experience. However, these are mostly on embedded microcontrollers since I moved away from PC programming all the way back in 1988 :-O Your experience parallels mine, except that mine has a surfeit of assembler...

Re: Where is the syntax for the dict() constructor ?! (OT)

2007-07-10 Thread Hendrik van Rooyen
Steve Holden [EMAIL PROTECTED] wrote: Sorry - dreadful joke. Since teeth chew, I wondered whether esteeth might eschew. [Graon ...] *grin* *Wonders if he can extend this troll to get Steve to explain what teeth are.* ; - ) - Hendrik --

Re: socket: connection reset by server before client gets response

2007-07-09 Thread Hendrik van Rooyen
ahlongxp [EMAIL PROTECTED] wrote: Try to wait a while in the server thread, after sending the message before closing the connection, to give the message time to get transmitted. time.sleep(0.5) should do it... - Hendrik OMG, it works. I can't believe the problem can be

Re: Where is the syntax for the dict() constructor ?! (OT)

2007-07-09 Thread Hendrik van Rooyen
Steve Holden [EMAIL PROTECTED] wrote: Would we do that with esteeth? Ok Steve you've got me - my dictionary goes from estate to esteem to ester... The US spelling of esthete may have a bearing... - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a way to program a robot with python (ex, an electric motor, control it's speed, etc)

2007-07-09 Thread Hendrik van Rooyen
[EMAIL PROTECTED] wrote: i hope someone here can help me. basically, me and my friend have a summer project. in this project, we need something that would basically function as a blender. we know we'll need to buy a motor that spins, but what we're having trouble with is figuring out

Re: Where is the syntax for the dict() constructor ?!

2007-07-08 Thread Hendrik van Rooyen
John Machin [EMAIL PROTECTED] wrote: 8 nice explanation of quoting problems - (2) A field containing an odd number of characters (or more generally, not meeting whatever quoting convention might be expected in the underlying data) should be treated with suspicion.

Re: socket: connection reset by server before client gets response

2007-07-08 Thread Hendrik van Rooyen
ahlongxp [EMAIL PROTECTED] wrote: me again. Connection reset by peer happens about one in fifth. I'm using python 2.5.1 and ubuntu 7.04. Try to wait a while in the server thread, after sending the message before closing the connection, to give the message time to get transmitted.

Re: Where is the syntax for the dict() constructor ?!

2007-07-07 Thread Hendrik van Rooyen
Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote: On Fri, 06 Jul 2007 08:34:55 +0200, Hendrik van Rooyen wrote: You can even do it more simply - by writing a GetField() that scans for either the delimiter or end of line or end of file, and returns the field found, along

Re: Where is the syntax for the dict() constructor ?!

2007-07-06 Thread Hendrik van Rooyen
John Machin sj,,,[EMAIL PROTECTED] wrote: I don't know what you mean by requires more than one character of lookahead -- any non-Mickey-Mouse implementation of a csv reader will use a finite state machine with about half-a-dozen states, and data structures no more complicated than (1)

Re: Goto

2007-06-14 Thread Hendrik van Rooyen
HMS Surprise [EMAIL PROTECTED] wrote: How does one effect a goto in python? I only want to use it for debug. I dasn't slap an if clause around the portion to dummy out, the indentation police will nab me. I use a global boolean called trace: if trace: do debug stuff But to try to

Re: Case-Insensitive Sorting of Multi-Dimensional Lists

2007-06-09 Thread Hendrik van Rooyen
Joe [EMAIL PROTECTED] wrote: I am new to lambda and have searched for a few hours this morning, coming up empty handed. Is this possible? Seeing as it has happened, it must be. - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: Bug/Weak Implementation? popen* routines can't handle simultaneousread/write?

2007-06-08 Thread Hendrik van Rooyen
dmoore [EMAIL PROTECTED] wrote: 8 --- description of full duplex problem Anybody have any thoughts on this? Do I have my story straight? (the popen variants can't handle this case and there are no other alternatives in the standard python distro) Is there some place

Re: Determinant of Large Matrix

2007-06-08 Thread Hendrik van Rooyen
James Stroud j@mbia.edu wrote: James Stroud wrote: [pointless stuff] OK. Nevermind. I'm rebinding encodings and so taking a sample from the sample and thus getting the sample back. Terribly sorry. There is truly nothing to be sorry about. It takes guts to come right out and say

Re: [pyserial - winXP] Serial port stop receiving data after a few hours, raise no error

2007-06-07 Thread Hendrik van Rooyen
[EMAIL PROTECTED] wrote: Hello, My soft passively listen to a device sending +- 300 bytes of data each second. After several hours of work, the soft abruptly stops receiving data without any error, (while the device sends properly, of course) and I need to restart it (the python soft) to

Re: ftplib error- Large file

2007-06-07 Thread Hendrik van Rooyen
[EMAIL PROTECTED] wrote: Hi all, I'm using ftplib to transfer large files to remote sites. The process seems to work perfectly with small files, but when the file gets to large ~20GB I begin getting errors that sometimes seem to be non- fatal, and other times the transfer does not

Re: MoinMoin configuration

2007-06-07 Thread Hendrik van Rooyen
Eric S. Johansson [EMAIL PROTECTED] wrote: (currently beating my head against flash memory and grub problems). So if you come up with a solution, feel free to e-mail me directly or if you have any other questions, also, feel free to send me mail. Might not know the answer but at least we

Re: Who uses Python?

2007-06-06 Thread Hendrik van Rooyen
Stef Mientki [EMAIL PROTECTED] wrote: I use Python as a replacement for MatLab, and intend to use it as replacement for Delphi, AutoIt, PHP, VB. And I'ld love to use it as a replacement for micro controller programming. If you have a little sub - 64k micro this is not really practical.

Re: Python for industrial control (was: Who uses Python?)

2007-06-06 Thread Hendrik van Rooyen
Cameron Laird [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED], Hendrik van Rooyen [EMAIL PROTECTED] wrote: walterbyrd [EMAIL PROTECTED] wrote: Anything else? Finance? Web-analytics? SEO? Digital art? Industrial control and alarm annunciation . . . Python can be *great

Re: Who uses Python?

2007-06-05 Thread Hendrik van Rooyen
walterbyrd [EMAIL PROTECTED] wrote: Anything else? Finance? Web-analytics? SEO? Digital art? Industrial control and alarm annunciation - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: subexpressions (OT: math)

2007-06-03 Thread Hendrik van Rooyen
Steve Howell sh[EMAIL PROTECTED] wrote: --- Steven D'Aprano [EMAIL PROTECTED] wrote: Angles are real numbers (in the maths sense), so sqrt(pi/4) radians is just as reasonable an angle as pi/4 radians. Both are irrational numbers (that is, can't be written exactly as the

Re: Python rocks

2007-06-03 Thread Hendrik van Rooyen
Mark Carter [EMAIL PROTECTED] wrote: Josiah Carlson wrote: What kind of scoping did you desire? Well, I had in mind so that if you defined a function, but wanted to access a global var, that you didn't have to use the global keyword. Not much of a biggie, I guess. You can access them

Re: Python Pop Quiz

2007-06-02 Thread Hendrik van Rooyen
[EMAIL PROTECTED] wrote: 7. How many Z80 assembly language programmers does it take to equal one Python guru? About one tenth of an assembly language programmer? I suppose it depends on how you define equal. As for the bar room people - they are all people clinging to weird belief

Re: Is PEP-8 a Code or More of a Guideline?

2007-06-01 Thread Hendrik van Rooyen
Tim Roberts [EMAIL PROTECTED] wrote: Carl Banks [EMAIL PROTECTED] wrote: Identifiers should just allow spaces. first element.get item(selected value) This is not a joke. I don't mean Python should necessarily do this (though it could be done without any ambiguity or backward

Re: Tkinter Listbox - Different Text colors in one listbox

2007-05-31 Thread Hendrik van Rooyen
[EMAIL PROTECTED] wrote: On May 29, 2:02 pm, [EMAIL PROTECTED] wrote: Hi, Is it possible to havedifferentitems in alistboxindifferentcolors? Or is it justonecolor for all items in alistbox? Thanks Rahul from Tkinter import * root = Tk() l = Listbox(root) l.pack() for x in

Re: Is PEP-8 a Code or More of a Guideline?

2007-05-31 Thread Hendrik van Rooyen
projecktzero [EMAIL PROTECTED] wrote: On May 30, 12:36 am, Hendrik van Rooyen [EMAIL PROTECTED] wrote: Maric Michaud [EMAIL PROTECTED] wrote: Typist is fine, although MCP that I am, I tend to think of typist as female... - Hendrik What does being a Microsoft Certified

Re: file reading by record separator (not line by line)

2007-05-31 Thread Hendrik van Rooyen
Lee Sander [EMAIL PROTECTED]wrote: I wanted to also say that this file is really huge, so I cannot just do a read() and then split on to get a record thanks lee On May 31, 1:26 pm, Lee Sander [EMAIL PROTECTED] wrote: Dear all, I would like toreada really hugefilethat looks like

Re: Tkinter Listbox - Different Text colors in one listbox

2007-05-30 Thread Hendrik van Rooyen
[EMAIL PROTECTED] wrote: Hi, Is it possible to have different items in a listbox in different colors? Or is it just one color for all items in a listbox? Thanks Rahul You specify text and foreground colour when you make the box, so I don't think its possible. - Hendrik --

Re: Is PEP-8 a Code or More of a Guideline?

2007-05-30 Thread Hendrik van Rooyen
Maric Michaud [EMAIL PROTECTED] wrote: Is typist ok ? It's the google's translation for dactylo. Typist is fine, although MCP that I am, I tend to think of typist as female... I would call a male one a typer, but I dont think it is correct English. - Hendrik --

Re: Ancient projectiles (was: Muzzle Velocity (was: High resolution sleep(Linux))

2007-05-27 Thread Hendrik van Rooyen
Cameron Laird [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED], Dennis Lee Bieber [EMAIL PROTECTED] wrote: . . . Did you know that the first military smokeless powder round was for the French Lebel? - It threw a bronze ball, and could punch through a single brick wall.

Re: Muzzle Velocity (was: High resolution sleep (Linux)

2007-05-27 Thread Hendrik van Rooyen
Cameron Laird [EMAIL PROTECTED] wrote: . . Ha! It's interesting, especially for computerists, to consider how some technologies plateau: steam car speeds, fresco paint- ing, dry-stone walls, ... From what I remember from my reading, the Stanley Steamer had a reputation as a Hot Rod

Re: Newsgroups and mailing lists (was Re: Slightly OT: Why all thespam?)

2007-05-26 Thread Hendrik van Rooyen
Steve Holden [EMAIL PROTECTED] wrote: I *did* try to explain all this a week or two ago. Did I not make myself clear? Aah ! This makes a couple of assumptions, none of which are necessarily based on fact, namely: 1) That the people involved read what you wrote. 2) That they understood it.

Re: Reading a file and resuming reading.

2007-05-26 Thread Hendrik van Rooyen
Karim Ali k,,[EMAIL PROTECTED] wrote: Hi, Simple question. Is it possible in python to write code of the type: - while not eof - really want the EOF and not just an empty line! readline() reads to the next newline - an empty line *is* EOF - a blank line

Re: Lists vs tuples (newbie)

2007-05-25 Thread Hendrik van Rooyen
Neil Cerutti [EMAIL PROTECTED] wrote: On 2007-05-22, Duncan Booth [EMAIL PROTECTED] wrote: Hendrik van Rooyen [EMAIL PROTECTED] wrote: Aside from the hashing issue, there is nothing that a tuple can do that can't be done as well or better by a list. There are a few other cases

Re: Shared Memory Space - Accross Apps Network

2007-05-25 Thread Hendrik van Rooyen
From: D.Hering v gmail.com wrote: On May 23, 4:04 am, Tim Golden [EMAIL PROTECTED] wrote: Robert Rawlins - Think Blue wrote: I did not see the original post either :-( ... I've got an application that runs on an embedded system, the application uses a whole bunch or dicts and

Re: Lists vs tuples (newbie)

2007-05-24 Thread Hendrik van Rooyen
Duncan Booth [EMAIL PROTECTED] wrote: Hendrik van Rooyen [EMAIL PROTECTED] wrote: Aside from the hashing issue, there is nothing that a tuple can do that can't be done as well or better by a list. There are a few other cases where you have to use a tuple, for example in a try..except

Re: Lists vs tuples (newbie)

2007-05-22 Thread Hendrik van Rooyen
Szabolcs [EMAIL PROTECTED] wrote: I was wondering about why are there both tuples and lists? Is there anything I can do with a tuple that I cannot do with a list? In what circumstances is it advantageous to use tuples instead of lists? Is there a difference in performance? I am still

Re: tkinter button state = DISABLED

2007-05-22 Thread Hendrik van Rooyen
Hamilton, William [EMAIL PROTECTED] wrote: From: Eric Brunel On Thu, 17 May 2007 09:30:57 +0200, Hendrik van Rooyen [EMAIL PROTECTED] wrote: Gabriel Genellina [EMAIL PROTECTED] wrote: En Wed, 16 May 2007 03:22:17 -0300, Hendrik van Rooyen I have never seen this working

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-18 Thread Hendrik van Rooyen
Hendrik van Rooyen [EMAIL PROTECTED] wrote: Now look me in the eye and tell me that you find the mix of proper German and English keywords beautiful. I can't admit that, but I find that using German class and method names is beautiful. The rest around it (keywords and names

Re: Python-URL! - weekly Python news and links (May 16)

2007-05-18 Thread Hendrik van Rooyen
Beliavsky [EMAIL PROTECTED] wrote: On May 16, 2:45 pm, Cameron Laird [EMAIL PROTECTED] wrote: QOTW: Sometimes you just have to take the path of least distaste. - Grant Edwards I want to choose my words carefully here, so I'm not misunderstood. rest snipped I think Cameron Laird

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-18 Thread Hendrik van Rooyen
Sion Arrowsmith [EMAIL PROTECTED] wrote: Hvr: Would not like it at all, for the same reason I don't like re's - It looks like random samples out of alphabet soup to me. What I meant was, would the use of foreign identifiers look so horrible to you if the core language had fewer English keywords?

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-17 Thread Hendrik van Rooyen
Sion Arrowsmith [EMAIL PROTECTED] wrote: Hendrik van Rooyen wrote: I still don't like the thought of the horrible mix of foreign identifiers and English keywords, coupled with the English sentence construction. How do you think you'd feel if Python had less in the way of (conventionally used

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-17 Thread Hendrik van Rooyen
Gregor Horvath [EMAIL PROTECTED] wrote: Hendrik van Rooyen schrieb: It is not so much for technical reasons as for aesthetic ones - I find reading a mix of languages horrible, and I am kind of surprised by the strength of my own reaction. This is a matter of taste. I agree

Re: tkinter button state = DISABLED

2007-05-17 Thread Hendrik van Rooyen
Gabriel Genellina [EMAIL PROTECTED] wrote: En Wed, 16 May 2007 03:22:17 -0300, Hendrik van Rooyen [EMAIL PROTECTED] escribió: Gabriel Genellina [EMAIL PROTECTED] wrote: Maybe there is a confusion here. You code above means that, when the event The leftmost MOUSE BUTTON was released

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-17 Thread Hendrik van Rooyen
Now look me in the eye and tell me that you find the mix of proper German and English keywords beautiful. I can't admit that, but I find that using German class and method names is beautiful. The rest around it (keywords and names from the standard library) are not English - they are

Re: tkinter button state = DISABLED

2007-05-16 Thread Hendrik van Rooyen
Gabriel Genellina [EMAIL PROTECTED] wrote: Maybe there is a confusion here. You code above means that, when the event The leftmost MOUSE BUTTON was released happens over your BUTTON WIDGET b, your function will be called. I have never seen this working in Tkinter, unless the button was pressed

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Hendrik van Rooyen
Michael Yanowitz [EMAIL PROTECTED] wrote; Let me guess - the next step will be to restrict the identifiers to be at most 6 characters long. No that is way too restrictive - you need at least eight, but they must be from the first 80 in the ASCII set - i.e. - capitals only Caps lock on,

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Hendrik van Rooyen
Méta-MCI [EMAIL PROTECTED] wrote: Hi! - should non-ASCII identifiers be supported? why? - would you use them if it was possible to do so? in what cases? Yes. JScript can use letters with accents in identifiers XML (1.1) can use letters with accents in tags C# can use letters with

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Hendrik van Rooyen
Eric Brunel [EMAIL PROTECTED] wrote: So what? Does it mean that it's acceptable for the standard library and keywords to be in English only, but the very same restriction on user-defined identifiers is out of the question? Why? If I can use my own language in my identifiers, why can't I write:

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Hendrik van Rooyen
Stefan Behnel [EMAIL PROTECTED] wrote: .:) This is not about technical English, this is about domain specific English. How big is your knowledge about, say, biological terms or banking terms in English? Would you say you're capable of modelling an application from the domain of biology, well

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Hendrik van Rooyen
[EMAIL PROTECTED] wrote: Hendrik van Rooyen [EMAIL PROTECTED],,,.co.za wrote in message news:[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: [I fixed the broken attribution in your quote] Sorry about that - I deliberately fudge email addys... First while is a keyword and will remain

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Hendrik van Rooyen
HYRY [EMAIL PROTECTED] wrote: If non-ASCII identifiers becomes true, I think it will be the best gift for Children who donot know English. How do you feel about the mix of English keywords and Chinese? How does the English - like sentences look to a Chinese? Would you support the extension

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Hendrik van Rooyen
Stefan Behnel [EMAIL PROTECTED] wrote: Hendrik van Rooyen wrote: Beautiful is better than ugly Good point. Today's transliteration of German words into ASCII identifiers definitely looks ugly. Time for this PEP to be accepted. Nice out of context quote. :-) Now look me in the eye

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread Hendrik van Rooyen
Anders J. Munch wrote: Hendrik van Rooyen wrote: And we have been through the Macro thingy here, and the consensus seemed to be that we don't want people to write their own dialects. Macros create dialects that are understood only by the three people in your project group. It's

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread Hendrik van Rooyen
r,,,[EMAIL PROTECTED],,,.com wrote: (2) Several posters have claimed non-native english speaker status to bolster their position, but since they are clearly at or near native-speaker levels of fluency, that english is not their native language is really irrelevant. I dispute the irrelevance

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-14 Thread Hendrik van Rooyen
Bruno Desthuilliers [EMAIL PROTECTED] wrote: Martin v. Löwis a écrit : So, please provide feedback, e.g. perhaps by answering these questions: - should non-ASCII identifiers be supported? No. Agreed - I also do not think it is a good idea why? Because it will definitivly make

Re: Change serial timeout per read

2007-05-11 Thread Hendrik van Rooyen
[EMAIL PROTECTED] wrote: What I actually want to do is to respond immediately if the expected string comes in, but not raise a timeout unless it takes longer than the maximum time. So if the device I'm communicating with usually responds in a second, but _can_ take up to 20 seconds, I

Re: SEO - Search Engine Optimization - Seo Consulting

2007-05-10 Thread Hendrik van Rooyen
Steve Holden [EMAIL PROTECTED] wrote: Steven D'Aprano wrote: On Wed, 02 May 2007 19:47:28 -0700, Huck Phin wrote: [a request for peace, love and understanding, concluding with] We all should be a little more considerate of each other. And if the hippy hug fest fails to stop spamming,

Re: Towards faster Python implementations - theory

2007-05-10 Thread Hendrik van Rooyen
Terry Reedy [EMAIL PROTECTED],,.edu wrote: Hendrik van Rooyen [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] | I am relatively new on this turf, and from what I have seen so far, it | would not bother me at all to tie a name's type to its first use, so that | the name can only

Re: Change serial timeout per read

2007-05-10 Thread Hendrik van Rooyen
[EMAIL PROTECTED] wrote: I'm writing a driver in Python for an old fashioned piece of serial equipment. Currently I'm using the USPP serial module. From what I can see all the serial modules seem to set the timeout when you open a serial port. This is not what I want to do. I need to change

Re: Towards faster Python implementations - theory

2007-05-10 Thread Hendrik van Rooyen
John Nagle [EMAIL PROTECTED] wrote: Paul Boddie wrote: On 9 May, 08:09, Hendrik van Rooyen [EMAIL PROTECTED] wrote: I am relatively new on this turf, and from what I have seen so far, it would not bother me at all to tie a name's type to its first use, so that the name can only be bound

Re: Towards faster Python implementations - theory

2007-05-09 Thread Hendrik van Rooyen
John Nagle [EMAIL PROTECTED] wrote: 8 summary of existing work and thinking -- The point here is that we don't need language changes or declarations to make Python much faster. All we need are a few restrictions that insure that, when you're doing

Re: Muzzle Velocity (was: High resolution sleep (Linux)

2007-05-08 Thread Hendrik van Rooyen
Dennis Lee Bieber [EMAIL PROTECTED],..m.com wrote: On Sun, 6 May 2007 10:15:26 +0200, Hendrik van Rooyen [EMAIL PROTECTED] declaimed the following in comp.lang.python: A rifle bullet can travel at around 5000 feet per second. You've got some fast rifles over there... LOL - true - I

Re: High resolution sleep (Linux)

2007-05-07 Thread Hendrik van Rooyen
Tim Roberts [EMAIL PROTECTED] wrote Consider what you're asking here. The operating system can only age the timer list and re-evaluate process ready states when a process goes into kernel mode, either by releasing the CPU or hitting the end of its time slice. In order to know that a

Re: 32 OS on 64-bit machine

2007-05-04 Thread Hendrik van Rooyen
SamG [EMAIL PROTECTED] wrote: If anyone has a x86_64 machine and is running a 32bit OS on top of that could you tell me what output would you get for the following program #== import platform print platform.processor() print platform.architecture()

Re: Python un-plugging the Interpreter

2007-05-03 Thread Hendrik van Rooyen
Jorgen Grahn [EMAIL PROTECTED] wrote: On Wed, 25 Apr 2007 08:05:01 +0200, Hendrik van Rooyen [EMAIL PROTECTED] wrote: Jorgen Grahn [EMAIL PROTECTED] wrote: ... I doubt it. (But I admit that I am a bit negative towards thread programming in general, and I have whined about this before

Re: Now()

2007-04-29 Thread Hendrik van Rooyen
Carsten Haese [EMAIL PROTECTED] wrote: On Thu, 2007-04-26 at 08:42 +0200, Hendrik van Rooyen wrote: Robert Rawlins - Think Blue wrote: With time depicted to the nearest second, from my background in ColdFusion development we used to have a datetimeformat() function that I could use

Re: Memory addressing

2007-04-29 Thread Hendrik van Rooyen
Steven D'Aprano [EMAIL PROTECTED] wrote: On Fri, 27 Apr 2007 16:07:57 -0700, castironpi wrote: That's what we need: a CopyMemory() routine. What we _really_ need are Poke() and Peek() routines. Yeah right! - we also need macros, then an assembler johnny like me can hack his own

Re: Now()

2007-04-26 Thread Hendrik van Rooyen
Robert Rawlins - Think Blue wrote: With time depicted to the nearest second, from my background in ColdFusion development we used to have a datetimeformat() function that I could use as DateTimeFormat(now(), “-mm-dd HH:mm:ss”) Which would give the current time a mask. Here is a hack that

Re: Python un-plugging the Interpreter

2007-04-25 Thread Hendrik van Rooyen
Jorgen Grahn [EMAIL PROTECTED] wrote: On Thu, 19 Apr 2007 20:39:57 -0700, Alex Martelli [EMAIL PROTECTED] wrote: Steve Holden [EMAIL PROTECTED] wrote: A long time ago Greg Stein produced a patch that removed the need for the GIL, but nobody seemed to want to pay the penalty it extracted

Re: Would You Write Python Articles or Screencasts for Money?

2007-04-25 Thread Hendrik van Rooyen
Steve Holden [EMAIL PROTECTED] wrote: Jeff Rush wrote: There is discussion by the Python Software Foundation of offering cash bounties or perhaps periodic awards to the best of for magazine articles, video/screencast clips and such. If YOU would be swayed to get involved in producing

Re: Do other Python GUI toolkits require this? (OT)

2007-04-21 Thread Hendrik van Rooyen
Roel Schroeven [EMAIL PROTECTED] wrote: Hendrik van Rooyen schreef: Steve Holden [EMAIL PROTECTED] wrote: Perhaps in Belgium they prefer climbing mountains over walking up and down gentle hills? Mountains ? Hills ? In Belgium ?? Its not called the battlefield

Re: comparison with None

2007-04-20 Thread Hendrik van Rooyen
Steve Holden [EMAIL PROTECTED] wrote: PS: Revision question: How many objects of type NoneType are there? You ask the damnesd Questions. There must be millions of the little buggers out there, with the population shifting incessantly as instances of the interpreter are started, and die.. I

Re: List of Objects

2007-04-20 Thread Hendrik van Rooyen
Steve Holden s,,[EMAIL PROTECTED] wrote: Steven D'Aprano wrote: [...] Forth method: create identical gazelles, then modify them: list_of_beasties = [Gazelle(defaults) for i in xrange(1000)] for i, beastie in enumerate(xrange(1000)): list_of_beasties[i] = modify(beastie)

Re: Do other Python GUI toolkits require this? (OT)

2007-04-20 Thread Hendrik van Rooyen
Steve Holden [EMAIL PROTECTED] wrote: Perhaps in Belgium they prefer climbing mountains over walking up and down gentle hills? Mountains ? Hills ? In Belgium ?? Its not called the battlefield of Europe for nothing... - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: The smallest and largest values of numeric types

2007-04-18 Thread Hendrik van Rooyen
Michael Hoffman [EMAIL PROTECTED] wrote: 20859248300531693115643211913059311997417115606882000504639505780471641693377296 50765802242049L Of course performance decreases for longer longs. I once made a thing that tried to find the limit of longs and stopped when I had two or three

Re: script for seconds in given month?

2007-04-17 Thread Hendrik van Rooyen
Paul McGuire [EMAIL PROTECTED] wrote: On Apr 16, 11:22 am, edfialk [EMAIL PROTECTED] wrote: Hi, does anyone happen to know of a script that would return the number of seconds in a month if I give it a month and a year? My python is a little weak, but if anyone could offer some

Re: Queue enhancement suggestion

2007-04-17 Thread Hendrik van Rooyen
Antoon Pardon [EMAIL PROTECTED] wrote: On 2007-04-17, Hendrik van Rooyen [EMAIL PROTECTED] wrote: Antoon Pardon [EMAIL PROTECTED] wrote: The problem is this doesn't work well if you have multiple producers. One producer can be finished while the other is still putting values

Re: Queue enhancement suggestion

2007-04-17 Thread Hendrik van Rooyen
Antoon Pardon [EMAIL PROTECTED] wrote: The problem is that sometimes the gui thread has something to show too. With the added problem that the code wanting to show something doesn't know when it is executing the gui thread or an other. So it is very difficult to avoid the gui thread putting

Re: Queue enhancement suggestion

2007-04-16 Thread Hendrik van Rooyen
Antoon Pardon [EMAIL PROTECTED] wrote: The problem is this doesn't work well if you have multiple producers. One producer can be finished while the other is still putting values on the queue. The solution I have been thinking on is the following. Add an open and close operation. Only

Re: Lists and Tuples and Much More

2007-04-15 Thread Hendrik van Rooyen
James Stroud [EMAIL PROTECTED] wrote: Hendrik van Rooyen wrote: But if you limit it to one thing and its inverse, its quite useful, and it would be nice to have one doubledict that can be accessed as speedily from either end... Sort of an internally linked list of mixed hashed

Re: tuples, index method, Python's design

2007-04-14 Thread Hendrik van Rooyen
Carsten Haese [EMAIL PROTECTED] wrote: 8 sense in its context. Nobody seems to be complaining about + behaving inconsistently depending on whether you're adding numbers or sequences. I would If I thought it would do some good - the plus sign as a joiner was, I think, a bad

Re: tuples, index method, Python's design

2007-04-14 Thread Hendrik van Rooyen
Donn Cave [EMAIL PROTECTED] wrote: Well, yes - consider for example the tm tuple returned from time.localtime() - it's all integers, but heterogeneous as could be - tm[0] is Year, tm[1] is Month, etc., and it turns out that not one of them is alike. The point is exactly that we can't

Re: Lists and Tuples and Much More

2007-04-14 Thread Hendrik van Rooyen
7stud [EMAIL PROTECTED] wrote: .. But using a tuple as a key in a dictionary is probably something you will never do. Yikes! I do this all the time... Think of an address in any one town. It has a Street, and a number (could be more complex, like a sub number for an apartment

Re: Append data to a list within a dict

2007-04-14 Thread Hendrik van Rooyen
Tina I ti,,[EMAIL PROTECTED] wrote: Hello group, Say I have the following dictionary: ListDict = { 'one' : ['oneone' , 'onetwo' , 'onethree'], 'two' : ['twoone' , 'twotwo', 'twothree'], 'three' : ['threeone' , 'threetwo', threethree']} Now I want to append 'twofour' to the list of

Re: tuples, index method, Python's design

2007-04-14 Thread Hendrik van Rooyen
Martin v. Löwis [EMAIL PROTECTED] wrote: So to increase consistency, the .index method should be removed from lists, as well, IMO. If you find yourself doing a linear search, something is wrong. I agree. You should at the very least make it a binary search. To do that you have to sort the

Re: tuples, index method, Python's design

2007-04-11 Thread Hendrik van Rooyen
Carsten Haese [EMAIL PROTECTED] wrote: I'm just a user with no influence on the development of Python itself, but in my humble opinion, the non-existence of tuple.index is more pythonic than its existence would be. I really cannot follow the logic behind this statement. I can write: L =

Re: Database in memory

2007-04-10 Thread Hendrik van Rooyen
Jeremy Sanders [EMAIL PROTECTED] wrote: Dictionaries are one of the most useful things in Python. Make sure you know how to take adavantage of them... +1 for QOTW - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: [offtopic?] problem with UDP broadcast on Windows XP

2007-04-10 Thread Hendrik van Rooyen
Irmen de Jong [EMAIL PROTECTED] wrote: Gabriel Genellina wrote: Try running the service impersonating another user (not LOCAL_SERVICE, the default). You can change that from the service control panel. Alas, that didn't change anything. I made it run as a user account that has

Re: Why NOT only one class per file?

2007-04-07 Thread Hendrik van Rooyen
Bart Willems [EMAIL PROTECTED] wrote: Steven D'Aprano wrote: On Wed, 04 Apr 2007 14:23:19 -0700, Chris Lasher wrote: A friend of mine with a programming background in Java and Perl places each class in its own separate file in . I informed him that keeping all related classes

Re: how to remove multiple occurrences of a string within a list?

2007-04-05 Thread Hendrik van Rooyen
On Apr 3, 3:53 pm, bahoo [EMAIL PROTECTED] wrote: My first submission handles duplicates, but not triplicates and more. Here is one that seems a bit more bulletproof: duplist = [1, 2, 3, 4, 'haha', 1, 2, 3, 4, 5, 1,2,3,4,6,7,7,7,7,7] copylist = duplist[:] fullset = set(duplist) for x in

Re: Why NOT only one class per file?

2007-04-05 Thread Hendrik van Rooyen
Terry Reedy [EMAIL PROTECTED] wrote: Ask him why he does not wear a straightjacket all the time. It is great for one's posture ;-) No it isn't - those funny arms give you round shoulders.. - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: how to remove multiple occurrences of a string within a list?

2007-04-04 Thread Hendrik van Rooyen
bahoo [EMAIL PROTECTED] wrote: On Apr 3, 2:31 pm, Matimus [EMAIL PROTECTED] wrote: It depends on your application, but a 'set' might really be what you want, as opposed to a list. s = set([0024,haha,0024]) s set([0024,haha]) s.remove(0024) s set([haha]) This sounds

Re: socket read timeout

2007-04-03 Thread Hendrik van Rooyen
Steve Holden [EMAIL PROTECTED] wrote: Right, but collisions are *so* twentieth-century, aren't they. With a properly-implemented switched infrastructure Ethernet interfaces can transmit and receive at the same time. This is true, while A and B are not simultaneously trying to address C -

Re: Mastering Python (OT)

2007-04-03 Thread Hendrik van Rooyen
Steve Holden [EMAIL PROTECTED] wrote: Speaking of which, here's a limerick To read it you need to know not only that Hampshire is colloquially know as Hants, but also that Salisbury's ancient Roman name is Sarum. There once was a young man of Salisbury Whose manners were most

Re: Question about text in Python

2007-04-03 Thread Hendrik van Rooyen
Steven D'Aprano [EMAIL PROTECTED] wrote: 8 This is not a call to turn a blind eye for plagiarism, or to do students homework for them. It's a plea for common-sense. We're not bound by university guidelines, or universities' over-broad definition of plagiarism, and we don't have to

Re: socket read timeout

2007-04-02 Thread Hendrik van Rooyen
Bryan Olson [EMAIL PROTECTED] wrote: Steve Holden wrote: Hendrik van Rooyen wrote: Are sockets full duplex? Yes. But you have to use non-blocking calls in your application to use them as full-duplex in your code. Hmmm... I'm missing something. Suppose I have one thread

Re: Mastering Python (OT)

2007-04-01 Thread Hendrik van Rooyen
Steve Holden [EMAIL PROTECTED] wrote: Hendrik van Rooyen wrote: It comes out something like Chum-lee, with the ch like chicken... (that's what I have heard - but who knows - It may have been a regional dialect, a case of the blind leading the blind, or someone pulling the piss

Re: socket read timeout

2007-04-01 Thread Hendrik van Rooyen
Steve Holden [EMAIL PROTECTED] Hendrik van Rooyen wrote: [EMAIL PROTECTED] wrote: hg My issue with that is the effect on write: I only want a timeout on hg read ... but anyway ... So set a long timeout when you want to write and short timeout when you want to read

Re: with timeout(...):

2007-03-30 Thread Hendrik van Rooyen
Nick Craig-Wood [EMAIL PROTECTED] wrote: I'd like there to be something which works well enough for day to day use. Ie doesn't ever wreck the internals of python. It could have some caveats like may not timeout during C functions which haven't released the GIL and that would still make it

<    1   2   3   4   5   6   7   8   9   >