Re: Is it possible to use python to get True Full Duplex on a Serial port?

2009-08-14 Thread Hendrik van Rooyen
On Friday 14 August 2009 14:13:46 greg wrote: You can't read and write with the same stdio file object at the same time. Odd things tend to happen if you try. You need to open *two* file objects, one for reading and one for writing: fr = open(/dev/ttyS0,rb,0) fw =

Re: Social problems of Python doc [was Re: Python docs disappointing]

2009-08-12 Thread Hendrik van Rooyen
On Tuesday 11 August 2009 19:53:16 Steven D'Aprano wrote: You want community input into the docs, but you're not willing to give that input except to bitch and moan and sook that the tracker is no good. wtf does the verb sook mean? I find: sook   /sʊk/ Show Spelled Pronunciation [sook] Show

Re: Need cleanup advice for multiline string

2009-08-12 Thread Hendrik van Rooyen
On Tuesday 11 August 2009 22:52:34 Robert Dailey wrote: On Aug 11, 3:40 pm, Bearophile bearophileh...@lycos.com wrote: Robert Dailey: This breaks the flow of scope. Would you guys solve this problem by moving failMsg into global scope? Perhaps through some other type of syntax?

Re: Serial port access

2009-08-09 Thread Hendrik van Rooyen
On Sunday 09 August 2009 03:20:12 nipun batra wrote: On Sun, Aug 9, 2009 at 2:11 AM, Chris Rebert c...@rebertia.com wrote: On Sat, Aug 8, 2009 at 12:34 PM, nipun batranipunredde...@gmail.com wrote: Hi, How can we access serial port using usb-serial converters,using python in linux.

Re: Parsing Binary Structures; Is there a better way / What is your way?

2009-08-07 Thread Hendrik van Rooyen
On Thursday 06 August 2009 20:50:30 Martin P. Hellwig wrote: Thanks all for your insights and suggestions. It seems to me that there are a couple of ways to this bit manipulation and a couple of foreign modules to assist you with that. Would it be worth the while to do a PEP on this?

Re: help with threads

2009-08-07 Thread Hendrik van Rooyen
On Friday 07 August 2009 05:02:10 Michael Mossey wrote: Hello, My problem is that in some cases, the network thread appears to stop, while the main thread is doing a long computation. Is this computation done in pure python or are you calling some underlying thing in C? I would be surprised

Re: Datetime with float seconds

2009-08-06 Thread Hendrik van Rooyen
On Wednesday 05 August 2009 14:50:04 kpal wrote: Hello Everybody, The standard datetime has 1 microsecond granularity. My application needs finer time resolution, preferably float seconds. Is there an alternative to the out-of-the-box datetime? Timezone support is not essential. I am

Re: Parsing Binary Structures; Is there a better way / What is your way?

2009-08-06 Thread Hendrik van Rooyen
On Wednesday 05 August 2009 16:46:13 Martin P. Hellwig wrote: Hi List, On several occasions I have needed (and build) a parser that reads a binary piece of data with custom structure. For example (bogus one): BE +-+-+-+-+--++ | Version |

Re: Parsing Binary Structures; Is there a better way / What is your way?

2009-08-06 Thread Hendrik van Rooyen
On Wednesday 05 August 2009 20:12:05 Paul Rubin wrote: Martin P. Hellwig martin.hell...@dcuktec.org writes: what I usually do is read the packet in binary mode, convert the output to a concatenated 'binary string'(i.e. '0101011000110') and Something wrong with reading the data words as an

Re: Parsing Binary Structures; Is there a better way / What is your way?

2009-08-06 Thread Hendrik van Rooyen
On Wednesday 05 August 2009 21:41:26 Martin P. Hellwig wrote: Yes you are (of course) right, my 'dream' solution would be something that accepts slice indeces on bit level. Your reasoning did reveal some flaws in my approach though ;-) This is the first time I have been compared to the

Re: Using Python to automate builds

2009-08-05 Thread Hendrik van Rooyen
On Tuesday 04 August 2009 21:13:10 Kosta wrote: I am a Python newbie, tasked with automating (researching) building Windows drivers using the WDK build environment. I've been looking into Python for this (instead of writing a bunch of batch files). Why do you not use make and a makefile - it

Re: Using Python to automate builds

2009-08-05 Thread Hendrik van Rooyen
On Wednesday 05 August 2009 14:08:18 David Cournapeau wrote: On Wed, Aug 5, 2009 at 4:56 PM, Hendrik van Rooyenhend...@microcorp.co.za wrote: On Tuesday 04 August 2009 21:13:10 Kosta wrote: I am a Python newbie, tasked with automating (researching) building Windows drivers using the WDK

Re: Which GUI framework to use?

2009-08-04 Thread Hendrik van Rooyen
On Tuesday 04 August 2009 06:09:05 koranthala wrote: Hi, I am creating a very minimal application (a networking app). I have written the application using Twisted. Now, I need to put a GUI wrapper on the application. The application needs a login screen and also it needs to be

Re: If Scheme is so good why MIT drops it?

2009-07-31 Thread Hendrik van Rooyen
On Thursday 30 July 2009 03:09:14 greg wrote: Hendrik van Rooyen wrote: And if code is data, where is Pythons ALTER statement? class Duck: def quack(self): print Quack! def moo(): print Moo! def ALTER(obj, name, TO_PROCEED_TO): setattr(obj, name, TO_PROCEED_TO) d

Re: Does python have the capability for driver development ?

2009-07-31 Thread Hendrik van Rooyen
On Thursday 30 July 2009 15:20:45 Dave Angel wrote: As far as I know, nobody has yet built a microcode implementation of a Python VM (Virtual Machine). Nor have I seen one for the Java VM. Atmel has made an ARM that has support for Java Bytecode. AT91SAM9X512 and friends (smaller versions)

Re: file comparison

2009-07-31 Thread Hendrik van Rooyen
On Friday 31 July 2009 11:25:17 learner learner wrote: Hi all, I want to compare two text files line by line and eliminate the matching/repeated line and store the unmatched/leftout lines into a third file or overwrite into one of them. This is not as simple as it seems. You will probably

Re: If Scheme is so good why MIT drops it?

2009-07-29 Thread Hendrik van Rooyen
On Tuesday 28 July 2009 17:11:02 MRAB wrote: If you were a COBOL programmer, would you want to shout about it? :-) Hey don't knock it! - at the time, it was either COBOL or FORTRAN or some assembler or coding in hex or octal. And if code is data, where is Pythons ALTER statement? *Ducks* :-)

Re: If Scheme is so good why MIT drops it?

2009-07-28 Thread Hendrik van Rooyen
On Monday 27 July 2009 16:49:25 Aahz wrote: In article mailman.3765.1248685391.8015.python-l...@python.org, Hendrik van Rooyen hend...@microcorp.co.za wrote: On Sunday 26 July 2009 21:26:46 David Robinow wrote: I'm a mediocre programmer. Does this mean I should switch to PHP? I have

Re: If Scheme is so good why MIT drops it?

2009-07-27 Thread Hendrik van Rooyen
On Sunday 26 July 2009 21:26:46 David Robinow wrote: I'm a mediocre programmer. Does this mean I should switch to PHP? I have searched, but I can find nothing about this mediocre language. Could you tell us more? - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: Distinguishing active generators from exhausted ones

2009-07-26 Thread Hendrik van Rooyen
On Saturday 25 July 2009 20:30:54 Michal Kwiatkowski wrote: Hi, Is there a way to tell if a generator has been exhausted using pure Python code? I've looked at CPython sources and it seems that something like active/exhausted attribute on genobject is missing from the API. For the time being

Re: len() should always return something

2009-07-25 Thread Hendrik van Rooyen
On Friday 24 July 2009 16:45:40 Mark Dickinson wrote: On Jul 24, 3:11 pm, Rhodri James rho...@wildebst.demon.co.uk wrote: Which doesn't make your point less valid.  In fact I'd go so far as to argue that what len() gives you is the number of items in a container, so len(7) should return

Re: Help understanding the decisions *behind* python?

2009-07-25 Thread Hendrik van Rooyen
On Friday 24 July 2009 17:07:30 Inky 788 wrote: On Jul 23, 3:42 am, Hendrik van Rooyen hend...@microcorp.co.za wrote: 8 Steven showed why you cannot have a mutable thing as a key in a dict. if you think it is contrived, then please consider how you would keep

Re: len() should always return something

2009-07-25 Thread Hendrik van Rooyen
On Friday 24 July 2009 21:04:55 Roy Smith wrote: Compressing strings to a single bit is easy. It's the uncompressing that's tricky. Not really - all you have to do is to apply the EXACT same sequence of operations that compressed it, in reverse. The unfortunate part is that this information

Re: len() should always return something

2009-07-25 Thread Hendrik van Rooyen
On Friday 24 July 2009 22:09:15 Marcus Wanner wrote: First one to correctly decompress the value 0 into an ASCII character wins the title of the world's most capable hacker :p that is easy. the xor of 0 and 1 is 1, which is ASCII soh, if I remember right. soh is start of header. Burroughs

Re: len() should always return something

2009-07-25 Thread Hendrik van Rooyen
On Saturday 25 July 2009 14:59:43 Steven D'Aprano wrote: On Sat, 25 Jul 2009 10:03:58 +0200, Piet van Oostrum wrote: S And there's nothing ambiguous about len(42). len(42) should be 7.5 million. And I don't understand your reasoning.upper() should be Millennium Hand and Shrimp!. That

Re: Gedcom and Genealogy

2009-07-24 Thread Hendrik van Rooyen
On Friday 24 July 2009 00:14:19 Gordon wrote: We have many small libraries in JAVA or Ruby that need to be ported to Python. Actually it's so simple a rewrite is possible too. Is this: 1 - A question? 2 - A job offer? 3 - A piece of random news? - Hendrik --

Re: binary literal

2009-07-23 Thread Hendrik van Rooyen
On Wednesday 22 July 2009 12:03:44 superpollo wrote: can i do something like the above, but using a *binary* number? (e.g. 00101101 instead of 45) ? 00101101 is not hex 45. hex 45 is 01000101 chr(int('01000101',2)) 'E' - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: Help understanding the decisions *behind* python?

2009-07-23 Thread Hendrik van Rooyen
On Wednesday 22 July 2009 16:36:51 Inky 788 wrote: On Jul 22, 2:36 am, Hendrik van Rooyen hend...@microcorp.co.za wrote: The good reason is the immutability, which lets you use a tuple as a dict key.   Thanks for the reply Hendrik (and Steven (other reply)). Perhaps I'm just

Re: Help understanding the decisions *behind* python?

2009-07-22 Thread Hendrik van Rooyen
On Tuesday 21 July 2009 15:49:59 Inky 788 wrote: On Jul 20, 12:27 pm, Phillip B Oldham phillip.old...@gmail.com wrote: [snip] We understand that lists are mutable and tuples are not, but we're a little lost as to why the two were kept separate from the start. They both perform a very

Re: Help understanding the decisions *behind* python?

2009-07-21 Thread Hendrik van Rooyen
On Monday 20 July 2009 21:26:07 Phillip B Oldham wrote: On Jul 20, 6:08 pm, Duncan Booth duncan.bo...@invalid.invalid wrote: The main reason why you need both lists and tuples is that because a tuple of immutable objects is itself immutable you can use it as a dictionary key. Really? That

Re: How to receive a data file of unknown length using a python socket?

2009-07-19 Thread Hendrik van Rooyen
On Sunday 19 July 2009 02:12:32 John Machin wrote: Apologies in advance for my ignorance -- the last time I dipped my toe in that kind of water, protocols like zmodem and Kermit were all the rage -- but I would have thought there would have been an off-the- shelf library for peer-to-peer file

Re: How to receive a data file of unknown length using a python socket?

2009-07-19 Thread Hendrik van Rooyen
On Sunday 19 July 2009 15:18:21 pyt...@bdurham.com wrote: Hi Hendrik, If anybody is interested I will attach the code here. It is not a big module. I am interested in seeing your code and would be grateful if you shared it with this list. All right here it is. Hope it helps - Hendrik

Re: missing 'xor' Boolean operator

2009-07-16 Thread Hendrik van Rooyen
Hrvoje Niksic hnik...@x..s.org wrote: Note that in Python A or B is in fact not equivalent to not(not A and not B). De Morgan would turn in his grave. - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: tough-to-explain Python

2009-07-11 Thread Hendrik van Rooyen
Steven D'Aprano st...@remove-this-cyb.ce.com.au wrote: On Fri, 10 Jul 2009 12:54:21 +0200, Hendrik van Rooyen wrote: Steven D'Aprano st...@remove-this-cye.com.au wrote: On Wed, 08 Jul 2009 22:05:57 -0700, Simon Forman wrote: persistent idea out there that programming is a very

Re: tough-to-explain Python

2009-07-11 Thread Hendrik van Rooyen
pdpi pd...@gmail.com wrote; I've always found cooking an apt metaphor for programming. No this is wrong. Writing a recipe or a cookbook is like programming. Cooking, following a recipe, is like running a program. - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: tough-to-explain Python

2009-07-11 Thread Hendrik van Rooyen
D'Arcy J.M. Cain d...@druid.net One might also argue that divorcing the design from the code is the problem in a lot of legacy code. See Agile Programming methods. Now you could say that there is a design step still in talking to the client and making a plan in your head or in some notes

Re: tough-to-explain Python

2009-07-11 Thread Hendrik van Rooyen
John O'Hagan wrote: The drawings produced by an architect, the script of a play, the score of a piece of music, and the draft of a piece of legislation are all examples of other things which are useless until they are interpreted in some way. Granted. But... There are countless human

Re: tough-to-explain Python

2009-07-10 Thread Hendrik van Rooyen
Steven D'Aprano st...@remove-this-cye.com.au wrote: On Wed, 08 Jul 2009 22:05:57 -0700, Simon Forman wrote: persistent idea out there that programming is a very accessible skill, like cooking or gardening, anyone can do it, and even profit from it, monetarily or otherwise, etc., and to

Re: Remoting over SSH

2009-07-08 Thread Hendrik van Rooyen
Hussein B hubaghd...@gmail.com wrote: Hey, I want to perform commands on a remote server over SSH. What do I need? Thanks. Access privileges for the remote machine. - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: A Bug By Any Other Name ...

2009-07-06 Thread Hendrik van Rooyen
Terry Reedy t@..el.edu wrote: Gabriel Genellina wrote: In this case, a note in the documentation warning about the potential confusion would be fine. How would that help someone who does not read the doc? It obviously won't. All it will do, is that it will enable people on this

Re: Code that ought to run fast, but can't due to Python limitations.

2009-07-06 Thread Hendrik van Rooyen
Jean-Michel Pichavant jeanmic...@sns.com wrote: Woot ! I'll keep this one in my mind, while I may not be that concerned by speed unlike the OP, I still find this way of doing very simple and so intuitive (one will successfully argue how I was not figuring this out by myself if it was

Re: Code that ought to run fast, but can't due to Python limitations.

2009-07-05 Thread Hendrik van Rooyen
John Nagle na...@...ats.com wrote: Python doesn't have a switch or case statement, and when you need a state machine with many states, that makes for painful, slow code. There's a comment in the code that it would be useful to run a few billion lines of HTML through an instrumented version

Re: Code that ought to run fast, but can't due to Python limitations.

2009-07-05 Thread Hendrik van Rooyen
Steven D'Aprano st...@remove-this-cy..e.com.au wrote: On Sun, 05 Jul 2009 10:12:54 +0200, Hendrik van Rooyen wrote: Python is not C. John Nagle is an old hand at Python. He's perfectly aware of this, and I'm sure he's not trying to program C in Python. I'm not entirely sure *what* he

Re: Code that ought to run fast, but can't due to Python limitations.

2009-07-05 Thread Hendrik van Rooyen
Paul Rubin http://phr...@nospam.invalid wrote: The series of tests is written that way because there is no case statement available. It is essentially switching on a bunch of character constants and then doing some additional tests in each branch. It could be that using ord(c) as an index

Re: The Python Way for module configuration?

2009-06-28 Thread Hendrik van Rooyen
kj no.em...@please.post wrote: I want to write a module that serves as a Python front-end to a database. This database can be either in the form of tab-delimited flat files, XML files, or a PostgreSQL server. The module is meant to hide these database implementation details from its users.

Re: Beginning with Python; the right choice?

2009-06-27 Thread Hendrik van Rooyen
Terry Reedy tjre...@...l.edu wrote: I consider Python the Basic of the 21st century. Oh Dear. Was it not Dijkstra who said that learning basic rotted your brain, or words more or less to that effect? And here I am, feeling rather dull lately... :-) To the OP: - Learning Python

Fw: Meta question: disappearing posts (was Re: calculating aself.value, self.randomnum = normalvariate(x, y))

2009-06-25 Thread Hendrik van Rooyen
Below is one that just disappeared, without any feedback: (unless I just missed it) - Hendrik - Original Message - From: Hendrik van Rooyen m...@microcorp.co.za To: Aahz a...@pythoncraft.com; python-list@python.org Sent: Wednesday, June 24, 2009 10:08 AM Subject: Re: Meta question

Re: Measuring Fractal Dimension ?

2009-06-24 Thread Hendrik van Rooyen
Steven D'Aprano ste...@remove.this.c...com.au wrote: On Mon, 22 Jun 2009 13:43:19 -0500, David C. Ullrich wrote: In my universe the standard definition of log is different froim what log means in a calculus class Now I'm curious what the difference is. Maybe he is a lumberjack, and quite

Re: Status of Python threading support (GIL removal)?

2009-06-22 Thread Hendrik van Rooyen
Paul Rubin http://phr...@nospam.invalid wrote: Hendrik van Rooyen m...@microcorp.co.za writes: I think that this is because (like your link has shown) the problem is really not trivial, and also because the model that can bring sanity to the party (independent threads/processes

Re: Developing GUI applications

2009-06-21 Thread Hendrik van Rooyen
Grant Ito grant_...@shaw.ca wrote: Hi everyone. I'm looking to find out what people are using for an open source wysiwyg GUI developer. I'm running both Linux and Windows but prefer to do my development in Linux. I've got the most experience with Tkinter but am willing to look at

Re: Status of Python threading support (GIL removal)?

2009-06-21 Thread Hendrik van Rooyen
Kay Schluehr k...@fiber-space.de wrote: This implies that people stay defensive concerning concurrency ( like me right now ) and do not embrace it like e.g. Erlang does. Sometimes there is a radical change in the way we design applications and a language is the appropriate medium to express

Re: question about a command like 'goto ' in Python's bytecode orit's just a compiler optimization?

2009-06-17 Thread Hendrik van Rooyen
Diez B. Roggisch d...@n...m.web.de wrote: Getting a depression because of a compiler is a bit strong... However, yes, bytecode is similar to assembler, and in that respect higher-level control-structures are created using (conditional) jumps. The same is true for other bytecode-languages,

Re: Tool for browsing python code

2009-06-17 Thread Hendrik van Rooyen
Horace Blegg wrote: I've heard from my cousin that his former high school classmate's uncle did a research on a large statistical sample of programmers and found that emacs users' brains are about 12% smaller than vi users' :) I'm afraid it's the other way around, really. You see, emacs

Re: xmlrpclib and generators

2009-06-10 Thread Hendrik van Rooyen
Ken Seehart wrote: 8 implementation -- The practical constraints of my specific application are: 1. The rpc server is a highly specialized slave system that does heavy duty work. 2. The rpc client is itself a web server that dispatches work requests to the rpc

Function/method returning list of chars in string?

2009-06-09 Thread Hendrik van Rooyen
One can go from lb = ['b','a','n','a','n','a'] to s = banana by using s = .join(lb) Is there a way to go the reverse route? I have not been able to find one. It is obviously easy to write a for char in s loop or list comprehension, but there seems to be no function or string method to return a

Re: Function/method returning list of chars in string?

2009-06-09 Thread Hendrik van Rooyen
jon vs. python wrote: Sorry, I didn't realize that you already proposed list comprehension. There is some kind of asymmetry in several areas.I guess that's somehow related to this post: http://www.zedshaw.com/blog/2009-05-29.html Thanks for the link - I am not quite as rabid, but it would

Re: SPAM-LOW: Re: Function/method returning list of chars in string?

2009-06-09 Thread Hendrik van Rooyen
Chris Rebert c...@ria.com wrote: lb = list(banana) Aaargh! I should have known - you use a string method to get a list of words, but you have to go to the list to get a list of characters from a string. There is no string method to do it, which is what I am complaining about. Is there a

Re: Function/method returning list of chars in string?

2009-06-09 Thread Hendrik van Rooyen
Diez B. Roggisch d...@nam.web.de wrote: I think lb = list(s) is good enough. It does the job, of course, but it is not a string method. - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: Winter Madness - Passing Python objects as Strings

2009-06-06 Thread Hendrik van Rooyen
Gabriel Genellina g-...@yahoo.com.ar wrote: From your description of the problem, it seems you are acting upon messages received from a serial port. You have to process the message *before* the next one arrives -- but you gain nothing doing that much faster. In other words, even with a

Re: Winter Madness - Passing Python objects as Strings

2009-06-06 Thread Hendrik van Rooyen
Scott David Daniels s@acm.org wrote: I can think of use cases for can, and from that use an alternate construct. The use case is passing a reference out over a wire (TCP port?) that will be used later. This will work, provided the thing is still alive and in the same place when the can

Re: Winter Madness - Passing Python objects as Strings

2009-06-06 Thread Hendrik van Rooyen
Miles Kaufmann m...@umich.edu wrote: On Jun 4, 2009, at 3:25 AM, Hendrik van Rooyen wrote: A can is like a pickle, in that it is a string, but anything can be canned. Unlike a pickle, a can cannot leave the process, though, unless the object it points to lives in shared memory

Re: Winter Madness - Passing Python objects as Strings

2009-06-05 Thread Hendrik van Rooyen
s...@pobox.com wrote: Got some use cases? plural cases - no. I did it for the reason already described. to elucidate, the code looks something like this: rec = input_q.get() # === this has its origen in a socket, as a netstring. reclist = rec.split(',') if reclist[0] == 'A': do

Re: Winter Madness - Passing Python objects as Strings

2009-06-05 Thread Hendrik van Rooyen
Nigel Rantor wi...@wiggly.org wrote: It just smells to me that you've created this elaborate and brittle hack to work around the fact that you couldn't think of any other way of getting the thread to change it's behaviour whilst waiting on input. I am beginning to think that you are a

Re: Winter Madness - Passing Python objects as Strings

2009-06-05 Thread Hendrik van Rooyen
Jean-Paul Calderone exar...@divmod.com wrote: So, do you mind sharing your current problem? Maybe then it'll make more sense why one might want to do this. Please see my reply to Skip that came in and was answered by email. - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: Winter Madness - Passing Python objects as Strings

2009-06-05 Thread Hendrik van Rooyen
Terry Reedy t...@udel.edu wrote: If I understand correctly, your problem and solution was this: You have multiple threads within a long running process. One thread repeatedly reads a socket. Yes and it puts what it finds on a queue. - it is a pre defined simple comma delimited record.

Re: Winter Madness - Passing Python objects as Strings

2009-06-05 Thread Hendrik van Rooyen
Gabriel Genellina ga@yahoo.com.ar wrote: Ah... I had the same impression as Mr. Reedy, that you were directly reading from a socket and processing right there, so you *had* to use strings for everything. not had to - chose to - to keep the most used path as short as I could. But if

Re: fastest way to test file for string?

2009-06-05 Thread Hendrik van Rooyen
kj no.em...@please.post wrote: Hi. I need to implement, within a Python script, the same functionality as that of Unix's grep -rl some_string some_directory I.e. find all the files under some_directory that contain the string some_string. I imagine that I can always resort to the

Re: Winter Madness - Passing Python objects as Strings

2009-06-05 Thread Hendrik van Rooyen
Nigel Rantor w...@wiggly.org wrote: Well, why not have a look at Gabriel's response. I have, and have responded at some length, further explaining what I am doing, and why. That seems like a much more portable way of doing it if nothing else. There is nothing portable in what I am doing -

Winter Madness - Passing Python objects as Strings

2009-06-04 Thread Hendrik van Rooyen
When the days get colder and the nights longer, then evil things are hatched. A can is like a pickle, in that it is a string, but anything can be canned. Unlike a pickle, a can cannot leave the process, though, unless the object it points to lives in shared memory. Here is the output of a test

Re: Winter Madness - Passing Python objects as Strings

2009-06-04 Thread Hendrik van Rooyen
Nigel Rantor wi...@wiggly.org wrote: Hendrik van Rooyen wrote: If you have any interest, contact me and I will send you the source. Maybe you could tell people what the point is... Well its a long story, but you did ask... I am working on an i/o system, running in an ebox

Re: Winter Madness - Passing Python objects as Strings

2009-06-04 Thread Hendrik van Rooyen
Nigel Rantor wi...@wiggly.org wrote: Hendrik van Rooyen wrote: Nigel Rantor wi...@wiggly.org wrote: Hendrik van Rooyen wrote: If you have any interest, contact me and I will send you the source. Maybe you could tell people what the point is... Well its a long story, but you

Re: What text editor is everyone using for Python

2009-05-30 Thread Hendrik van Rooyen
Lie Ryan lie..@gmail.com wrote: norseman wrote: Suggestion: Take a look at the top two most used OS you use and learn the default (most often available) text editors that come with them. Which means Notepad on Windows? you could live dangerously and use WordPad... - Hendrik --

Re: Tkinter file dialog

2009-05-29 Thread Hendrik van Rooyen
Ronn Ross wrote: I'm using Tkinter file selector to get a direcotry path. I'm using: self.file = tkFileDialog.askdirectory(title=Please select your directory) print file but all it prints out is: type 'file' How would I print the directory path? try doing: self.filename =

Re: What text editor is everyone using for Python

2009-05-26 Thread Hendrik van Rooyen
Steven D'Aprano stev...@source.com.au wrote: I use kwrite when on a GUI. When I can't avoid editing files remotely over ssh, I use nano. Why? I dislike Gnome's user-interface, and I find gedit slightly too underpowered and dumbed down for my taste. (Although it has a couple of nice features.) Of

Re: What text editor is everyone using for Python

2009-05-26 Thread Hendrik van Rooyen
Lawrence D'Oliveiro l...@geeknew_zealand wrote: In message pan.2009.05.26.06.39...@remove.this.cybersource.com.au, Steven D'Aprano wrote: On Tue, 26 May 2009 18:31:56 +1200, Lawrence D'Oliveiro wrote: In message d6d05d39-98e7-4c28- b201-4b2445732...@v35g2000pro.googlegroups.com,

Re: 4 hundred quadrillonth?

2009-05-25 Thread Hendrik van Rooyen
Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Sun, 24 May 2009 22:47:51 +1200, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand declaimed the following in gmane.comp.python.general: As for exactitude in physics, Gregory Chaitin among others has been trying to rework physics

Re: Problems with sys.stout.flush()

2009-05-24 Thread Hendrik van Rooyen
Joel Ross jo...@cognyx.com To: python-list@python.org Sent: Sunday, May 24, 2009 4:32 AM Subject: Re: Problems with sys.stout.flush() Mel wrote: Joel Ross wrote: Rhodri James wrote: [ ... ] Except that you still have the interesting issue that your environment isn't responding to '\r'

Re: Tkinter, Trouble with Message,Label widget

2009-05-05 Thread Hendrik van Rooyen
norseman norse...@hughes.net wrote: Hendrik van Rooyen mentioned the textvar too. Thanks Hendrik Yeah - and also omitted to mention the set method. With friends like that, who needs enemies? - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter, Trouble with Message,Label widget

2009-05-04 Thread Hendrik van Rooyen
norseman n...@hughes.net wrote: There has to be some way of using a Message or Label (or some) widget as a simple posting board. There is - look at textvariable - an instance of StringVar that is associated with the widget. If all else fails, you can always use configure to change the

Re: Multiprocessing.Queue - I want to end.

2009-05-04 Thread Hendrik van Rooyen
Luis Alberto Zarrabeitia Gomez ky...@uh.cu wrote: Quoting Hendrik van Rooyen m...@microcorp.co.za: In fact I happen to believe that anything that does any work needs one and only one input queue and nothing else, but I am peculiar that way. Well, I also need some output. In my case

Re: Multiprocessing.Queue - I want to end.

2009-05-02 Thread Hendrik van Rooyen
: Roel Schroeven rschroev_nospam...@fastmail.fm wrote: Hendrik van Rooyen schreef: I have always wondered why people do the one queue many getters thing. Because IMO it's the simplest and most elegant solution. That is fair enough... Given that the stuff you pass is homogenous

Re: Multiprocessing.Queue - I want to end.

2009-05-01 Thread Hendrik van Rooyen
Luis Zarrabeitia akaky...@uh.cu wrote: 8 ---explanation and example of one producer, 8 ---more consumers and one queue As you can see, I'm sending one 'None' per consumer, and hoping that no consumer will read more than one None. While this particular

Re: Why bool( object )?

2009-05-01 Thread Hendrik van Rooyen
Paul Rubin http://phr...@nospam.invalid wrote: Steven D'Aprano s...@source.com.au writes: for x in a or b or c: do_something_with(x) Ugh for x in [a,b,c]: if len(x) 0: do_something_with(x) break Ugh for x in [a,b,c]: if x:

Re: Is there a programming language that is combination ofPythonandBasic?

2009-04-20 Thread Hendrik van Rooyen
Chris Jones cjns1...@gmail.com wrote: Intellectually, assembler programming is the less demanding since its level of abstraction does not go any further than mapping a few binary numbers to a small set of usually well-chosen mnemonics. This is the surface complexity - it is true that when you

Re: Is there a programming language that is combination of Python andBasic?

2009-04-19 Thread Hendrik van Rooyen
Steven D'Aprano steveource.com.au wrote: COMEFROM on the other hand is just the purest evil imaginable. *grin* - I expect you say this because it is a bit like COBOL's alter - you cannot *see* it in place when you read the code, and the effect is only apparent at run time after the distant

Re: Is there a programming language that is combination of Python andBasic?

2009-04-19 Thread Hendrik van Rooyen
Aaron Brady casti.@gmail.com wrote: On Apr 18, 4:44 am, Hendrik van Rooyen m...@microcorp.co.za wrote: to untangle some spaghetti code. He did not mention if the spaghetti was actually doing it's job, bug free, which IMO is the only rational test for the quality of a piece I don't use

Re: Is there a programming language that is combination of Python andBasic?

2009-04-19 Thread Hendrik van Rooyen
BJörn Lindqvist b...@gmail.com wrote: I can somewhat sympathise with the op, neither python nor any other mainstream language can still do this: SCREEN 13 PSET 160,100,255 Oh come on! Don't be like that! Tell us what it does, please. - Hendrik --

Re: Is there a programming language that is combination of PythonandBasic?

2009-04-19 Thread Hendrik van Rooyen
Brian Blais wrote: On Apr 18, 2009, at 5:44 , Hendrik van Rooyen wrote: to untangle some spaghetti code. He did not mention if the spaghetti was actually doing it's job, bug free, which IMO is the only rational test for the quality of a piece of code, because it is the reason for its

Re: Is there a programming language that is combination of Python andBasic?

2009-04-19 Thread Hendrik van Rooyen
Mensanator mens...@aol.com wrote: 8 -- description of bugs in spaghetti --- Looks like that design really needed sorting out! A programmer once said to me Why should I run it, I know how it works, I wrote it. Are you serious? In my opinion, anybody who says this is not a

Re: Is there a programming language that is combination of Python andBasic?

2009-04-18 Thread Hendrik van Rooyen
baykus b..@gmail.com wrote: I guess I did not articulate myself well enough. I was just looking for a toy to play around. I never suggested that Python+Basic would be better than Python and everyone should use it. Python is Python and Basic is Basic. I am not comparing them at all. I

Re: Python 3.0 online docs broken

2009-04-08 Thread Hendrik van Rooyen
Jim Garrison j...@acm.org Jim Garrison wrote: Ye Liu wrote: On Apr 6, 6:33 pm, Jim Garrison j...@acm.org wrote: I notice the online docs (at docs.python.org/3.0/index.html) were updated today. It seems some of the top-level pages, like Tutorial, Using Python, Language Reference are

Re: Need advise about an application

2009-04-06 Thread Hendrik van Rooyen
azrael jura.gr...mail.com wrote: I guess that this is not an option because of the case that the calculation of the needed statistics takes not always the same time nad I am afraid tht using sleep() would after a couple of time periods skip a meassurement. If I understand correctly what you

Re: Pythoner,Wish me luck!

2009-04-04 Thread Hendrik van Rooyen
barisa bbaj...@gmail.com wrote: Hi, I'm also begginer in python; i did few basic programs about graph etc.. my question is : what benefit is using interactive intrepreter ? i come from java backround, so I use eclipse for python as well. I start my program, it does it's job, and that's it.

Re: Hash of None varies per-machine

2009-04-04 Thread Hendrik van Rooyen
Steven D'Aprano st...@remove..urce.com.au wrote: On Fri, 03 Apr 2009 10:50:08 -0700, ben.taylor wrote: 2. Should the hash of None vary per-machine? I can't think why you'd write code that would rely on the value of the hash of None, but you might I guess. The value of hash(None) appears to

Re: is there a way to collect twitts with python?

2009-04-04 Thread Hendrik van Rooyen
Dennis Lee Bieber wlfr...@ix.netcom.com wrote: Given the subject line -- my first thought was Depends on the density of the twitt population, and how hungry the python is G I see that everybody is politically correctly maintaining the three t twitt spelling, instead of yielding to the obvious

Re: Hash of None varies per-machine

2009-04-04 Thread Hendrik van Rooyen
Steven D'Aprano st...@r..rsource.com.au wrote: Seems to me you have misunderstood the way pickling works. Yeah right - have you ever looked at the pickle code? Good to hear it just works :-) - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: Pythoner,Wish me luck!

2009-04-03 Thread Hendrik van Rooyen
Matteo tadw.@gmail.com wrote: On Apr 3, 9:05 am, Linuxwell ahqylang...@gmail.com wrote: Starting today I would like to study Python,Wish me luck! Good luck! Don't forget to... print 'Hello World!' This is better advice than what you may think, because the interactive interpreter is

Re: pygame and socket.recv

2009-04-02 Thread Hendrik van Rooyen
Aaron Brady cast...@gmail.com wrote: Hi, I tried writing a small game on a pygame layer. The graphics are fine, and at the moment, it is not graphics intensive. It is multi- player, and for the communication, I am sending a pickle string across a LAN, once per frame. How big is this

Re: pygame and socket.recv

2009-04-02 Thread Hendrik van Rooyen
Aaron Brady cast@gmail.com wrote: On Apr 2, 1:19 am, Hendrik van Rooyen m...@microcorp.co.za wrote: Aaron Brady cast...@gmail.com wrote: 8 stuff showing small packets and adequate bandwidth -- What does some latency mean? - barely visible jitter, or a half second freeze

Re: c.l.py dead, news at 11 (was Re: Mangle function name with decorator?)

2009-03-30 Thread Hendrik van Rooyen
Steven D'Aprano st...@rource.com.au wrote: Oh noes!!! Python will be just like nearly every other language!!! Including Python. There are already at least thirteen implementations (forks) of Python (although some of these are defunct or unmaintained): CPython Jython IronPython Python for

<    1   2   3   4   5   6   7   8   9   >