Re: time.sleep() and Tkinter after()?

2008-12-04 Thread Hendrik van Rooyen
Davy [EMAIL PROTECTED] wrote: Although I don't understand your explanation very well(I guess maybe .after() re-schedule is better than .sleep unresponsive in GUI application?)I will take it as a golden rule. I did not in fact try to explain it - I was trying to get you to think a bit wider, as

Re: Please fix your clock [was Re: Multiple equates]

2008-12-04 Thread Hendrik van Rooyen
Steven D'Aprano stev..urce.com.au wrote: Hendrik, I think your PC's clock is wrong. You seem to be posting from the future. I always knew I was more advanced than other people... :-) Well spotted! Thanks - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: Python advocacy ... HELP!

2008-12-04 Thread Hendrik van Rooyen
Tim Rowe [EMAIL PROTECTED] wrote: Try asking Are we teaching computer science, so that the students will be able to cope with whatever they meet once they graduate, or are we teaching computer programming, in a couple of specific languages, so that the students will be completely unprepared

Re: Please fix your clock [was Re: Multiple equates]

2008-12-04 Thread Hendrik van Rooyen
Andreas Waldenburger [EMAIL PROTECTED] On 04 Dec 2008 15:53:21 GMT Steven D'Aprano [EMAIL PROTECTED] wrote: Hendrik, I think your PC's clock is wrong. You seem to be posting from the future. So? Maybe he is. What's your problem? It was probably playing hob with his threading

Re: Thread Tkinter problem

2008-12-03 Thread Hendrik van Rooyen
Davy [EMAIL PROTECTED] wrote: while(data_queue.full() == False): This will fill the queue and stop. Use while true and if queue not full... - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: Mathematica 7 compares to other languages

2008-12-03 Thread Hendrik van Rooyen
Xah Lee [EMAIL PROTECTED] wrote: Chances are, $10 is not enough for me to take the trouble of disappearing from the face of this earth. What a pity. It would be cheap at the price. - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: time.sleep() and Tkinter after()?

2008-12-03 Thread Hendrik van Rooyen
Davy [EMAIL PROTECTED] wrote: I have used Tkinter after() to do loop update GUI in my previous post. And I tried to change after() to time.sleep(), but it seems doesn't work at all, the Queue send and receive data properly, but the GUI didn't even appear? //-code changed- def

Re: Thread Tkinter problem

2008-12-03 Thread Hendrik van Rooyen
Davy [EMAIL PROTECTED] wrote: def gen_board_thread(): print 'enter here' gen_flip = 1 while(True): You don't need the brackets: while True: is good enough time.sleep(0.3) if (data_queue.full() == False): write: if not data_queue.full(): , and lose the brackets here

Re: Multiple equates

2008-12-03 Thread Hendrik van Rooyen
Cameron Laird [EMAIL PROTECTED] wrote: There's a realm within Pythonia that favors lambdalessness. And who, may I ask, Is the King of this realm? - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter and asyncronous socket

2008-11-28 Thread Hendrik van Rooyen
Eric Brunel [EMAIL PROTECTED] wrote You don't need to in fact: from the secondary thread, it seems to be safe to post a user-defined event in the GUI event loop on which you can set a binding in the GUI thread. This allows a thread switch without having to do a periodical check. 8

Re: Getting in to metaprogramming

2008-11-27 Thread Hendrik van Rooyen
Aaron Brady [EMAIL PROTECTED] wrote: On Nov 26, 10:41 pm, Hendrik van Rooyen [EMAIL PROTECTED] wrote: Steven D'Aprano steau wrote: Well, I don't know about any problem. And it's not so much about whether metaprograms can solve problems that can't be solved by anything else, as whether

Re: Tkinter and asyncronous socket

2008-11-27 Thread Hendrik van Rooyen
[EMAIL PROTECTED] wrote: On 26 Nov, 13:42, Steve Holden [EMAIL PROTECTED] wrote: One approach would be to run the socket code in blocking mode in a separate thread started by the (main program) GUI thread at program startup, and communicating results back via a Queue.Queue or similar to

Re: Getting in to metaprogramming

2008-11-27 Thread Hendrik van Rooyen
Steven D'Aprano [EMAIL PROTECTED] GUI designer. You write a program to let the user create code by clicking buttons, dragging objects, drawing lines, etc. The GUI designer may use classes, but the purpose of those classes is to generate source code. Yikes, this is getting hairy- If the

Re: Getting in to metaprogramming

2008-11-27 Thread Hendrik van Rooyen
Kay Schluehr [EMAIL PROTECTED] wrote: I just noticed that corepy 1.0 [1] has been released. Corepy is an embedded DSL for synthesizing machine code from chaining Python commands. This means it provides objects and exploits control structures used to create machine code that can finally

Re: Getting in to metaprogramming

2008-11-27 Thread Hendrik van Rooyen
Michele Simionato [EMAIL PROTECTED] wrote: The namedtuple recipe by Raymond Hettinger (http:// code.activestate.com/recipes/500261) is an interesting example of code generation. My own decorator module use a similar trick. Here code generation (plus eval/exec) is needed since you need control on

Re: Getting in to metaprogramming

2008-11-27 Thread Hendrik van Rooyen
Terry Reedy [EMAIL PROTECTED] wrote: Hendrik van Rooyen wrote: I am using the term in the restricted sense of Python writing Python source. Given that, can anybody think of an example that you could not do with a class? (excepting the stored procedure aspect) I am not sure I

Re: Getting in to metaprogramming

2008-11-26 Thread Hendrik van Rooyen
Aaron Brady [EMAIL PROTECTED] wrote: I don't know a clean, reliable way to structure a metaprogram though. Mine always turn out messy. Yes. Then another thing - it strikes me that any problem that can be solved by metaprogramming, can be solved by putting similar code into a class and

Re: what's so difficult about namespace?

2008-11-26 Thread Hendrik van Rooyen
Steve Holden [EMAIL PROTECTED] wrote: And before anyone bothers to point it out, yes, I know PHO now (finally) has namespaces. I cannot resist oulling the oiss... Its not the first time... :-) - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting in to metaprogramming

2008-11-26 Thread Hendrik van Rooyen
Steven D'Aprano steau wrote: Well, I don't know about any problem. And it's not so much about whether metaprograms can solve problems that can't be solved by anything else, as whether metaprograms can solve problems more effectively than other techniques. If you include factory

Re: Official definition of call-by-value (Re: Finding the instancereference...)

2008-11-17 Thread Hendrik van Rooyen
Terry Reedy [EMAIL PROTECTED] wrote: I think the important point is this. In Python, objects are self-identifying bundles of information, which is to say, the bundle includes knowledge of the which universe of possible bundles the object comes from, where the universe includes a set of

Re: Official definition of call-by-value (Re: Finding the instancereference...)

2008-11-16 Thread Hendrik van Rooyen
Steve Holden [EMAIL PROTECTED] wrote: There's also the question, if you say that an object is different from its value, of determining what the value's value is ... This one is easy - its obviously the value that is returned when the value is returned when you call for the value that you are

Re: Finding the instance reference of an object

2008-11-05 Thread Hendrik van Rooyen
Joe Strout [EMAIL PROTECTED] wrote: 4. You now see how a mutating an object within a function tells you NOTHING about how the reference to that object was passed. 5. You see that the first three languages above are passing a reference by value and using that to mutate and object, yet for

Re: Finding the instance reference of an object

2008-11-04 Thread Hendrik van Rooyen
Aaron Brady [EMAIL PROTECTED] wrote: I think we can conclude that Python passes by reference, since a function can modify objects that were passed in to it. Sort of - if the modification is by side effect - so you can append to a list, for instance. However, if you use the passed param name on

Re: False and 0 in the same dictionary

2008-11-04 Thread Hendrik van Rooyen
Prateek [EMAIL PROTECTED] wrote: b = {0:'xyz', False:'abc'} b {0: 'abc'} # Am I the only one who thinks this is weird? No. This was discussed before on this list, and that discussion referenced (if I recall correctly) the discussion on python-dev at the time the decision was taken. If

Re: dictionary

2008-10-28 Thread Hendrik van Rooyen
Steve Holden [EMAIL PROTECTED] wrote: I don't ever remember programming to cope with equipment failure, however. Did you make that bit up? Not at the bit level in my case - but I do remember doing silly things like multiplying after a divide (all integer arithmetic) to make sure the

Re:: 2.6, 3.0, and truly independent intepreters

2008-10-26 Thread Hendrik van Rooyen
Andy O'Meara Wrote: Um... So let's say you have a opaque object ref from the OS that represents hundreds of megs of data (e.g. memory-resident video). How do you get that back to the parent process without serialization and IPC? What should really happen is just use the same address space so

Re: dictionary

2008-10-25 Thread Hendrik van Rooyen
Steven D'Aprano ste...-this-cybersource.com.au wrote: On Fri, 24 Oct 2008 14:53:19 +, Peter Pearson wrote: On 24 Oct 2008 13:17:45 GMT, Steven D'Aprano wrote: What are programmers coming to these days? When I was their age, we were expected to *read* the error messages our compilers

Re: Help with Iteration

2008-10-19 Thread Hendrik van Rooyen
Aaron Brady cast...pigmail.com wrote: while 1: calculate_stuff( ) if stuff 0.5: break The thought police will come and get you. You are doing things by side effect! You are using a global called stuff! You are relying on an implementation detail! While their cudgels are

Re: Efficient Bit addressing in Python.

2008-10-12 Thread Hendrik van Rooyen
Ross Ridge rrid...lub.uwaterloo.ca wrote: Unfortunately from your other posts you do seem to be working on a single byte a time, so my technique probably won't be efficient. Its a bit more - the hardware allows for 64 lines in and 64 lines out. You probably want just want to be using

Re: Efficient Bit addressing in Python.

2008-10-11 Thread Hendrik van Rooyen
Aaron \Castironpi\ Brady wrote: This is tolerable. Â If you've got a better 'clear' operation than 'xor', you're welcome to it. *grin* xor is a toggle bit fuction, and I did not like the recursive call in your code. so here is a module bsed on your BitSet: (I hope my tabs survive the journey)

Re: Efficient Bit addressing in Python.

2008-10-11 Thread Hendrik van Rooyen
Ross Ridge wrote: This is the code I use to convert large bit arrays to byte strings and back: import string import binascii import array 8--- examples -- I don't think you can do anything faster with standard modules, although it might not be efficient if

Re: Efficient Bit addressing in Python.

2008-10-11 Thread Hendrik van Rooyen
Lie Li...mail.com wrote: This of course means that there has to be another thread active to actually do the i/o on a periodic basis, gathering the outputs and writing them out, and reading the inputs and scattering them to the various named input bits Not necessarily. You've mentioned two

Re: Efficient Bit addressing in Python.

2008-10-10 Thread Hendrik van Rooyen
Tino Wildenhain wrote: byte1 byte2? this does not look very practical to me. In the simplest form of storing your values in a text string, you could just use ord() to get the byte value and operate on it with 10 11 13 and so on. If you want, put a module in which defines the

Re: Efficient Bit addressing in Python.

2008-10-10 Thread Hendrik van Rooyen
George Sakkis wrote: I don't know of a canonical way (bit hacking is not really common in Python) but pehaps BitPacket [1] comes close to what you're after. George [1] http://hacks-galore.org/aleix/BitPacket/ Thanks for the link - I will check it out - Hendrik --

Re: Efficient Bit addressing in Python.

2008-10-10 Thread Hendrik van Rooyen
Mensanator wrote: I use the gmpy module for all my bit related work and have been very satisfied with the results. 8--- gmpy function list --- Thanks. All of this looks good. Will check out gmpy too. - Hendrik --

Re: Efficient Bit addressing in Python.

2008-10-10 Thread Hendrik van Rooyen
Lie Ryan wrote: You'll find that in most cases, using integer or Boolean is enough. There are some edge cases, which requires bit addressing for speed or memory optimizations, in python, the usual response to that kind of optimization requirement is to move that part of the code to C. If, for

Re: Efficient Bit addressing in Python.

2008-10-10 Thread Hendrik van Rooyen
Tino Wildenhain wrote: Hendrik van Rooyen wrote: Tino Wildenhain wrote: 8 Sure, one could for instance make a list of eight-entry lists: io = [[b0,b1,b2,b3,b4,b5,b6,b7],] what should that represent? Which byte order do you have in mind etc? Each

Re: Reading from stdin

2008-10-09 Thread Hendrik van Rooyen
Luis Zarrabeitia wrote: But it doesn't say how to put the file object in non-blocking mode. (I was trying to put the file object in non-blocking mode to test next()'s behavior). ??Ideas? # Some magic to make a file non blocking - from the internet def unblock(f): Given file 'f', sets its

Efficient Bit addressing in Python.

2008-10-09 Thread Hendrik van Rooyen
Is there a canonical way to address the bits in a structure like an array or string or struct? Or alternatively, is there a good way to combine eight ints that represent bits into one of the bytes in some array or string or whatever? It seems to me that there is a dilemma here : if you can

Re: re : do something in time interval

2008-10-09 Thread Hendrik van Rooyen
Lawrence D'Oliveiro wrote: Hendrik van Rooyen wrote: import time while True: end_time = time.time() + 5 while time.time() end_time: do_the_in_between_stuff() do_the_every_five_second_stuff() Maybe I'm dense, but ... where do you stop the busy

re : do something in time interval

2008-10-07 Thread Hendrik van Rooyen
Petr Jakeš [EMAIL PROTECTED] wrote: Leon Zhang [EMAIL PROTECTED] wrote: I am not an expert, but why not to use time.sleep(5)? If you are using wxPython, you may also try wx.Timer, in which you could set its interval. Thanks for your reply. During the 5s period my script has to do some

re: HARD REAL TIME PYTHON

2008-10-07 Thread Hendrik van Rooyen
Blubaugh, David A. dblubelcan.com wrote: I have done some additional research into the possibility of utilizing Python for hard real time development. I have seen on various websites where this has been discussed before on the internet. However, I was wondering as to how successful anyone

Ascii Menu I/O redirection

2008-09-20 Thread Hendrik van Rooyen
I am writing a small application with a simple ascii based menu. The menu is used to test individual functions, and to change some timings. Otherwise the application just runs automatically, depending on command line options. I want to be able to redirect the menu. The console, a serial port,

Re: Ascii Menu I/O redirection

2008-09-20 Thread Hendrik van Rooyen
Steven D'Aprano [EMAIL PROTECTED] wrote: I'm not sure that closing stdin and stout are a good idea. This could have side-effects for other parts of your program, and will almost certainly end badly if you're running in the interactive interpreter. Its a very simple thingy - there will only

Re: dict slice in python (translating perl to python}

2008-09-12 Thread Hendrik van Rooyen
MRAB googlarnett.plus.com wrote: On Sep 11, 6:11 pm, Fredrik Lundh [EMAIL PROTECTED] wrote: [snip] (the next step towards true Pythonicness would be to store your data in 8--- Surely the word is Pythonicity? :-) When faced with the choice between Pythonicness and

Re: max(), sum(), next()

2008-09-06 Thread Hendrik van Rooyen
David C. Ullrich dullr...rynet.com wrote: Think about all the previously elected female or black presidents of the US. Which one was the tallest? The current King of France? - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: atomic section in code

2008-09-06 Thread Hendrik van Rooyen
Fredrik Lundh fredr...ware.com wrote: sounds like he wants/needs non-cooperative, mandatory locking. Could one get there using ctypes to disable interrupts? Cross Platform? I can think of lots of hassles, starting with permissions to use the privileged instructions. - Hendrik --

Re: How to write verbose scripts

2008-09-03 Thread Hendrik van Rooyen
Steven D'Aprano stev...bersource.com.au wrote: Is there a better way of doing this than the way I am going about it? Not sure if its better, but I would keep the messages in a table or dict and have different tables or dicts for different levels of verbosity, and write a displayer that knows

Re: Date Comparison and Manipulation Functions?

2008-08-30 Thread Hendrik van Rooyen
John Machin sj..con.net wrote: On Aug 30, 10:41 am, W. eWatson notvalcglobal.net wrote: What I'm trying to do is adjust date-time stamped file names for date and time errors. The software program collects through a period that roughly coincides with night hours every day and according to

Re: Python String Immutability Broken!

2008-08-26 Thread Hendrik van Rooyen
Simon Brunning: You can indeed use ctypes to modify the value of a string - see http://tinyurl.com/5hcnwl. You can use it to crash the OS, too. My advice - don't. Thanks for the link. Any advice on what to do or use as an I/O structure for dissemination? Ken Seehart: 8--- using

Re: Python Strinh Immutability Broken!

2008-08-26 Thread Hendrik van Rooyen
Gabriel Genellina: To avoid altering the equilibrium of the whole universe, use ctypes.create_string_buffer: http://python.net/crew/theller/ctypes/tutorial.html#fundamental-data-types Thanks Gabriel – looks like I really have to spend more time with that excellent document. Patrick Maupin:

Re: Python String Immutability Broken!

2008-08-25 Thread Hendrik van Rooyen
Patrick Maupin pmauail.com wrote: Very entertaining. Thanks. Nice to see that there is still some sense of humour left somewhere - its all been so serious here lately - people seem to forget that hacking is fun! But let me get this straight: Are you just complaining that if you pass a

Python String Immutability Broken!

2008-08-24 Thread Hendrik van Rooyen
South Africa. Sunday 24th August 2008. Our South African correspondent, Waffling Swiftly, reports the discovery of a corpse in the local cyberspace. It is reputed to belong to a programmer who was flayed alive by the C.L.P. group, because he had violated the immutability of a python string.

Re: Cross Compiler for Python?

2008-07-09 Thread Hendrik van Rooyen
norseman nor...ghes.net wrote: 8 - dreaded Yep! I know the feeling. Got lots of those T-Shirts. ;) I re-read your original post. I got the feeling the eBox is running a stripped down Linux. Is that so? If it is, then:

Re: Cross Compiler for Python?

2008-07-08 Thread Hendrik van Rooyen
Jorgen Grahn wrote: This is a special case of a more general, non-Python problem which you will have to address if you want to build an industrial controller. If your target has no C compiler[1], you have to set up a cross-compiling environment. I'd be surprised if the eBox doesn't come with

Re: Cross Compiler for Python?

2008-07-08 Thread Hendrik van Rooyen
norseman wrote: == In case all else fails: This is not a cookbook answer, but: 1) gnu's gcc will compile to 16,32 or 64 bit intel architectures OK, the 32 bit version compiles to 16 or 32 the 64 should. The 64 will

Cross Compiler for Python?

2008-07-07 Thread Hendrik van Rooyen
Up to now, I have been innocently using the vanilla python that comes with the Linux distribution (Suse in my case). For the past few days, I have been playing with a little device called an eBox - it is basically a 486 with 128Mb memory, and a 1Gig pcmcia flash drive. We want to try to use this

re: Cross Comiler for Python?

2008-07-07 Thread Hendrik van Rooyen
Diez wrote: Look at the gumstix project, they do have a cross-compiled python in there. You should be able to get an idea on how to do that yourself. It involves (or at least did back then) a bit of trickery as the build-process of python uses the freshly created interpreter to pre-compile

Re: Cross Compiler for Python

2008-07-07 Thread Hendrik van Rooyen
Dan Upton wrote: If you don't have a 32 bit system to build it on, you could always set up a VMWare machine... but that might be more effort than necessary. You can probably just run configure on your normal machine and then edit the makefile to add -m32 to the compiler or linker flags--that will

Re: Why prefer != over for Python 3.0?

2008-04-02 Thread Hendrik van Rooyen
John J. Lee wrote: How did programmers manage back then in 32k? Some of the answers, in no particular sequence, are: Tight, small operating systems that did the minimum. Assembler. Sequential Processing: - small tasks with multiple passes on tape ( like the concept of Unix pipes )

Re: Serial port error statistics - any comparable data?

2008-03-30 Thread Hendrik van Rooyen
Diez B. Roggisch wrote: RS232 is unfortunately as bad as a protocol as it can get. I've used it for communication with a microcontroller for just a few bytes every second. And it failed miserably, so I needed to implement a protocol on top of it. We normally do this anyway, except for stuff

Re: Serial port error statistics - any comparable data?

2008-03-30 Thread Hendrik van Rooyen
On Sunday 30 March 2008 12:19:58 Bjoern Schliessmann wrote: Diez B. Roggisch wrote: if you have the chance, try attach a machine with legacy rs232 port, and see if the errors still remain. Additionally, what kind of buffers does your device have? I'm using pyserial to control a very

Re; finding euclidean distance,better code?

2008-03-29 Thread Hendrik van Rooyen
On Saturday 29 March 2008 03:09:46 Steven D'Aprano wrote: On Fri, 28 Mar 2008 16:59:59 +0100, Robert Bossy wrote: Gabriel Genellina wrote: That's what I said in another paragraph. sum of coordinates is using a different distance definition; it's the way you measure distance in a city with

Serial port error statistics - any comparable data?

2008-03-29 Thread Hendrik van Rooyen
Hi, I have been doing some tests on a device that we are thinking of incorporating into a product, and I have seen that reception on a serial port at 115200 baud over about six metres of RS-232 cable makes mistakes, to the order of 125 lines with errors in them out of approximately 18.4 million

Re: List mutation method gotcha - How well known?

2008-03-15 Thread Hendrik van Rooyen
On Thu, Mar 13, 2008 at 8:36 AM, Hendrik van Rooyen [EMAIL PROTECTED] wrote: foo = [1,2,3,4] x = foo.append(5) print x What will be the output (choose one): 1) [1,2,3,4] 2) [1,2,3,4,5] 3) That famous picture of Albert Einstein sticking out his tongue 4) Nothing - no output

List mutation method gotcha - How well known?

2008-03-13 Thread Hendrik van Rooyen
Hi, I am surprised that it took me so long to bloody my nose on this one. It must be well known - and I would like to find out how well known. So here is a CLOSED BOOK multiple choice question - no RTFM, no playing at the interactive prompt: Given the following three lines of code at the

Re: Using a dict as if it were a module namespace.

2008-01-28 Thread Hendrik van Rooyen
On Sunday 27 January 2008 09:45, Steven D'Aprano wrote: I have a problem which I think could be solved by using a dict as a namespace, in a similar way that exec and eval do. When using the timeit module, it is very inconvenient to have to define functions as strings. A good

Re: Interesting Thread Gotcha

2008-01-18 Thread Hendrik van Rooyen
Dan ther,,,ail.com wrote: Would it be possible to have pychecker (or some such) warn that there is an insufficient parameter count to start_new_thread? I guess that would require knowing the type of thread. . . I think this is the hub of the thing - its not only start_new_thread, but the

Re: Interesting Thread Gotcha

2008-01-17 Thread Hendrik van Rooyen
Bjoern Schliessmann usenet-ourmet.com wrote: Hendrik van Rooyen wrote: Absolutely! - well spotted! This is no threading problem at all; not even a syntax problem. If you don't know exactly what start_new_thread and kbd_driver functions do it's impossible to tell if your code does what

Re: Interesting Thread Gotcha

2008-01-17 Thread Hendrik van Rooyen
Duncan Booth dunc...d.invalid wrote: Given that the start_new_thread function never actually got called, what code exactly do you expect to complain about the absence of a tuple? I don't understand this assertion. I thought that start_new_thread was called with a missing comma in its

Re: Interesting Thread Gotcha

2008-01-17 Thread Hendrik van Rooyen
Diez B. Roggisch dee,,eb.de wrote: Hendrik van Rooyen wrote: It would have been nice, however, to have gotten something like: TypeError - This routine needs a tuple. instead of the silent in line calling of the routine in question, while failing actually to start a new thread

Interesting Thread Gotcha

2008-01-15 Thread Hendrik van Rooyen
I thought I would share this nasty little gotcha with the group. Consider the following code fragment: start print 'starting kbd thread' keyboard_thread = thread.start_new_thread(kbd_driver (port_q,kbd_q)) print 'starting main loop' error = Mainloop(s,port_q,active_q_list) end It produces, as

Re: Interesting Thread Gotcha

2008-01-15 Thread Hendrik van Rooyen
Dan the,,,ail.com wrote: keyboard_thread = thread.start_new_thread(kbd_driver (port_q,kbd_q)) Needs to be keyboard_thread = thread.start_new_thread(kbd_driver, (port_q,kbd_q)) Commas are important! -Dan Absolutely! - well spotted! As the first correct respondent, you win the

Re: [Kamaelia] TCPClient: How to sense connection failure?

2008-01-12 Thread Hendrik van Rooyen
Bjoern Schliessmann usenet-mail,,...m wrote: I'm currently trying to implement a simulation program with Kamaelia and need a reliable TCP connection to a data server. From Twisted, I know that a method is called if the connection fails by whatever reason. I tried to get the same results with

Re: Push to Make (Single Pole) Button running a loop

2007-12-30 Thread Hendrik van Rooyen
Jon Todd jo...en.co.uk wrote: I'd like to have a button that when pressed executes a loop (this could be a thread) and then stops execution when it's released (Push to Make - Single Pole in electronics terms). I've tried the regular way of associating the procedure with a callback and tried

Re: Happy Christmas Pythoneers

2007-12-27 Thread Hendrik van Rooyen
Steven D'Aprano steve... ce.com.au wrote: On Thu, 27 Dec 2007 09:09:49 +0200, Hendrik van Rooyen wrote: Zentrader zent...ail.com wrote: And if you're not a Christian it would be Type Error bug. Anyway, happy New Years as well to all in the group. Followers of Shushla celebrate

Re: Happy Christmas Pythoneers

2007-12-26 Thread Hendrik van Rooyen
Zentrader zent...ail.com wrote: And if you're not a Christian it would be Type Error bug. Anyway, happy New Years as well to all in the group. Followers of Shushla celebrate the new year at the time of the spring equinox. This has been the cause of bloody wars between the Northern and

Re: Inter-process communication, how? Part 2

2007-12-24 Thread Hendrik van Rooyen
[EMAIL PROTECTED] wrote: What I don't like about FIFO, is that on Unix they are persistent files. So whatever happens to Manager they would stay there... I was just wondering if there's another way of doing the above and if not, I would probably go with FIFO. Thanks! The persistence bit is

Re: Passing by reference

2007-12-22 Thread Hendrik van Rooyen
MartinRinehart Wrote: More seriously, I can and do use lots of globals. In the tokenizer I'm writing, for example, all the token types(COMMENT_EOL = 0, CONSTANT_INTEGER = 1, ...) are global constants. The text to be tokenized is a global variable. (Actually, the text is unchanging once the

Re: How to handle multi-line quotes

2007-12-22 Thread Hendrik van Rooyen
MartinRinehart wrote: Thinking about unclosed multi-line quotes. When you open a multi-line quote (type '') what does your editor do? Does it color the remainder of your text as a quote, or does it color the line with the open quote as a quote and leave the rest of your code alone? What

Re: Best way to protect my new commercial software.

2007-12-22 Thread Hendrik van Rooyen
Dennis Lee Bieber ...netcom.com wrote: SD declaimed the following in comp.lang.python: At 15-35 lines, it is short enough for people to copy it down on paper, or even memorize it, then take it home and work on finding a vulnerability in it. heh I'd actually been thinking of the

Re: Finite State Machine GUI editor in python?

2007-12-17 Thread Hendrik van Rooyen
Alexander Schliep schllgen.mpg.de wrote: In case nothing better comes up and you want to code it yourself: Our Hidden Markov Model library GHMM (http://ghmm.org) has a graphical editor with XML output. Maybe http://networkx.lanl.gov/ or other general Python graph packages have what

Re: int vs long

2007-12-17 Thread Hendrik van Rooyen
Nick Craig-Wood nic...od.com wrote: So you might see longs returned when you expected ints if the result was = 0x800. did you mean 0x8000 ? ;-) - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: Finite State Machine GUI editor in python?

2007-12-16 Thread Hendrik van Rooyen
kib [EMAIL PROTECTED] wrote: Hi Hendrik, I've bookmarked these ones : http://www.univ-paris12.fr/lacl/pommereau/tlf/index.html [in French] http://www.ncc.up.pt/~nam/ [look at the FAdo project] http://www.cs.usfca.edu/~jbovet/vas.html [written in Java] Thanks I will check them out - at least

Finite State Machine GUI editor in python?

2007-12-15 Thread Hendrik van Rooyen
I have spent some time googling and on wiki and came up with pyFSA in python. It may end up being useful, but it is not directly what I am looking for, as there is no GUI that I can see. I know about SMC, but it is not Python, and I can't find the gui. This looks good, but it seems to be in a

Re: how to convert 3 byte to float

2007-12-09 Thread Hendrik van Rooyen
Mario M. Mueller [EMAIL PROTECTED] wrote: I uploaded a short sample data file under http://www.FastShare.org/download/test.bin - maybe one can give me another hint... In a full data example max value is 1179760 (in case one looks only at the eye-cathing 65535+- values). I clicked on the

Re: how to convert 3 byte to float

2007-12-08 Thread Hendrik van Rooyen
Tommy Nordgren [EMAIL PROTECTED] wrote: On 8 dec 2007, at 12.52, Mario M. Mueller wrote: Bjoern Schliessmann wrote: [...] BTW, who in his mind designs three byte floats? Memory isn't that expensive anymore. Even C bool is four bytes long. It's output of a digitizer (but not that

Re: Python is not a good name, should rename to Athon

2007-12-05 Thread Hendrik van Rooyen
Gabriel Genellina [EMAIL PROTECTED] wrote: En Tue, 04 Dec 2007 14:49:36 -0300, Dennis Lee Bieber [EMAIL PROTECTED] escribió: How about the cognate: Kulkukan? You meant Kukulkan. If you got it wrong from Apocalypto (Mel Gibson), well, it's just one of many errors in the film... Either way its

Re: Python is not a good name, should rename to Athon

2007-12-05 Thread Hendrik van Rooyen
Dennis Lee Bieber [EMAIL PROTECTED] wrote: Euler? (most non-tech types would probably think that's a reference to someone who squirts lubricants into the workings of a steam engine) You have just destroyed a long held image in my mind with this horrible homophone - I used to conjure up images

Re: Python is not a good name, should rename to Athon

2007-12-03 Thread Hendrik van Rooyen
Dotan Cohen dotanail.com wrote: Newton was the bridge between science and superstition. Without him, we would not have science. For that he is notable. He is both magician and scientist. It was Newton's belief in the occult that led to his discovery of gravity: the fact that distant

Re: Python is not a good name, should rename to Athon

2007-12-01 Thread Hendrik van Rooyen
John Machin [EMAIL PROTECTED] wrote: On Dec 1, 5:14 pm, Hendrik van Rooyen [EMAIL PROTECTED] wrote: John Machin sj...exicon.net wrote: Pythons are good snakes; they hypnotise the meaninglessly chattering bandarlog and eat them. Beware! What is a bandarlog - I know

Re: Python is not a good name, should rename to Athon

2007-12-01 Thread Hendrik van Rooyen
Russ P. Ru...gmail.com wrote: I am surprised to see that Newton is not taken. I urge Guido to take it while it is still available. Sir Isaac certainly deserves the honor. Does he? Are you aware of how he treated Hooke? He was a great technician, but as a person, you would not have had him

Re: Python is not a good name, should rename to Athon

2007-11-30 Thread Hendrik van Rooyen
John Machin sj...exicon.net wrote: Pythons are good snakes; they hypnotise the meaninglessly chattering bandarlog and eat them. Beware! What is a bandarlog - I know the bandersnatch and the boojum, but bandarlog? If it is something you can knit - If I get you the wool, will you make me one?

Re: How to Teach Python Variables

2007-11-29 Thread Hendrik van Rooyen
J. Clifford Dyer jc...nestar.org wrote: This thread is bleedin' demised. No, you have stunned it. Delicate threads stun easily. To get back to the original question, namely how to teach the concept of a python variable, I would probably take a harder look at the wandering names analogy. I

Re: Next float?

2007-11-23 Thread Hendrik van Rooyen
Steven D'Aprano steve..IS.cybersource.com.au wrote: Damn, I don't remember writing that! It is caused by drinking too much Alzheimer's Light. : - ) - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: Clean way to get one's network IP address?

2007-11-23 Thread Hendrik van Rooyen
Steven D'Aprano ste..HIS-cybersource.com.au wrote: On Sat, 24 Nov 2007 00:05:13 +, Steven D'Aprano wrote: ... you're absolutely write ... Okay, I now officially have no more credibility left. Time for me to get a Hotmail email address and open a MySpace page and spend all my time

Re: eof

2007-11-22 Thread Hendrik van Rooyen
braver [EMAIL PROTECTED] wrote: Well folks compare scripting languages all the time, and surely Ruby is closer to Python than C++. Since Ruby can do f.eof, which is easily found in its references, and Python can't, or its EOF can't easily be found -- the one *equivalent* to a semantically

Re: Troubleshooting garbage collection issues

2007-11-18 Thread Hendrik van Rooyen
dave..mail.com (Dave) wrote: 8- description of horrible problem -- Faced with this, I would: 1 - identify the modules that import gc to separate the sheep from the goats. 2 - do my best to change gc importing goats back to sheep. 3 - amongst the remaining goats,

Re: which Python ? asks beginner

2007-11-18 Thread Hendrik van Rooyen
Donn Ingle don..il.com wrote: plans are afoot You know, I've always wanted ask; if plans are afoot, what are hands? :D Sorry, it's late. The answer, seeing as it's late, is that whisky is at hand. - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: Populating a dictionary, fast [SOLVED SOLVED]

2007-11-17 Thread Hendrik van Rooyen
Michael Bacarella mb...opper.comwrote: I am so sorry to have ruined the decorum. Oh dear! I confidently predict that this thread will now degenerate to include such things as dignitas and gravitas. - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

<    1   2   3   4   5   6   7   8   9   >