Re: Addressing the last element of a list

2005-11-08 Thread Matt Hammond
, containing the value 6, whereas the 2nd example above modified the list by replacing an element of it. Hope this helps Matt -- | Matt Hammond | RD Engineer, BBC Research Development, Tadworth, Surrey, UK. | http://kamaelia.sf.net/ | http://www.bbc.co.uk/rd/ -- http://mail.python.org/mailman

Re: how to improve this simple block of code

2006-01-11 Thread Matt Hammond
= 132 too. If there'll always be a decimal point, then you can leave off the initial if. Matt -- | Matt Hammond | RD Engineer, BBC Research Development, Tadworth, Surrey, UK. | http://kamaelia.sf.net/ | http://www.bbc.co.uk/rd/ -- http://mail.python.org/mailman/listinfo/python-list

Re: how to improve this simple block of code

2006-01-11 Thread Matt Hammond
(0).rstrip(.) -- | Matt Hammond | RD Engineer, BBC Research Development, Tadworth, Surrey, UK. | http://kamaelia.sf.net/ | http://www.bbc.co.uk/rd/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Bindings for Dirac, (sorta announcement)

2005-09-15 Thread Matt Hammond
the instructions you'll find within comments in the example python program. regards Matt Hammond http://kamaelia.sf.net/ -- | Matt Hammond | RD Engineer, BBC Research and Development, Tadworth, Surrey, UK. -- http://mail.python.org/mailman/listinfo/python-list

Re: Wrapper module for Linux shared lib

2005-09-16 Thread Matt Hammond
/ -- | Matt Hammond | RD Engineer, BBC Research Development, Tadworth, Surrey, UK. | http://kamaelia.sf.net/ | http://www.bbc.co.uk/rd/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Thread's, async_chat and asyncore

2005-10-04 Thread Matt Hammond
about the system. We'd be interested to know what you think, and whether you think you could build your application using it. regards Matt -- | Matt Hammond | RD Engineer, BBC Research Development, Tadworth, Surrey, UK. | http://kamaelia.sf.net/ | http://www.bbc.co.uk/rd/ -- http

Re: What is executed when in a generator

2005-10-04 Thread Matt Hammond
- stack frames etc are not having to be set up fully. Instead they are (presumably) set aside between calls to s.next() Hope this helps Matt -- | Matt Hammond | RD Engineer, BBC Research Development, Tadworth, Surrey, UK. | http://kamaelia.sf.net/ | http://www.bbc.co.uk/rd/ -- http

Re: Advanced concurrancy

2005-08-04 Thread Matt Hammond
Hi Stefan, It seems as though all components basically have to do busy waiting now. You are right - components are, for the most part, busy-waiting. Which is not a good thing! So do you plan on including a kind of scheduler-aware blocking communication (like the `channels` of the `tasklets`

Re: ANN: Kamaelia 0.2.0 released!

2005-08-08 Thread Matt Hammond
Hammond -- | Matt Hammond | RD Engineer, BBC Research and Development, Tadworth, Surrey, UK. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is this?

2005-08-10 Thread Matt Hammond
as it could be! Matt -- | Matt Hammond | RD Engineer, BBC Research and Development, Tadworth, Surrey, UK. -- http://mail.python.org/mailman/listinfo/python-list

Re: performance of recursive generator

2005-08-11 Thread Matt Hammond
) ... but AFAIK there isn't :-( so I guess you'll have to avoid recursive generators for this app! Matt -- | Matt Hammond | RD Engineer, BBC Research and Development, Tadworth, Surrey, UK. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is this?

2005-08-12 Thread Matt Hammond
and pasting, but it seems I was a little overzealous with my editing! I've still got that in my terminal's history buffer, and it does indeed read: [[], []] is [[]]*2 False -- | Matt Hammond | RD Engineer, BBC Research and Development, Tadworth, Surrey, UK. -- http://mail.python.org

Re: Permutation Generator

2005-08-15 Thread Matt Hammond
absent from this list are [2, 1, 3] and [2, 3, 1]. The problem gets worse with longer lists. The basic problem is that x needs to be able to occur in ALL positions, not just the beginning and the end. Cheers, -M -- | Matt Hammond | RD Engineer, BBC Research and Development, Tadworth

Problem (or even bug?) with Tkinter

2005-08-19 Thread Matt Hammond
() -- | Matt Hammond | RD Engineer, BBC Research and Development, Tadworth, Surrey, UK. -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem (or even bug?) with Tkinter

2005-08-19 Thread Matt Hammond
it to the file script.tcl and type in a shell: wish script.tcl -- | Matt Hammond | RD Engineer, BBC Research and Development, Tadworth, Surrey, UK. -- http://mail.python.org/mailman/listinfo/python-list

Re: passing arguments from scale widget to function

2005-08-22 Thread Matt Hammond
programmer and do not wish to get involved in classes and objects If you're using Tcl/Tk you're already using them ... what do you think your Slider widget is? :-) Hope this helps! regards Matt -- | Matt Hammond | RD Engineer, BBC Research and Development, Tadworth, Surrey, UK. -- http

Re: Problem (or even bug?) with Tkinter

2005-08-22 Thread Matt Hammond
better with SCIM. As a workaround for SUSE Linux 10.0 I might just unset XMODIFIERS during Tk's startup, so that at least typing ASCII will work. /quote Altering the XMODIFIERS environment variable as he suggested solved the problem. -- | Matt Hammond | RD Engineer, BBC Research and Development

Re: passing arguments from scale widget to function

2005-08-22 Thread Matt Hammond
that we're passing Calc (the function itself), not Calc(...) (the result of calling the function) regards Matt -- | Matt Hammond | RD Engineer, BBC Research and Development, Tadworth, Surrey, UK. -- http://mail.python.org/mailman/listinfo/python-list

Re: passing arguments from scale widget to function

2005-08-22 Thread Matt Hammond
-- | Matt Hammond | RD Engineer, BBC Research and Development, Tadworth, Surrey, UK. -- http://mail.python.org/mailman/listinfo/python-list

Re: Convert float to string ...

2005-08-23 Thread Matt Hammond
How can i convert a float value into a string value? Try: string_value1 = str(float_value) + ' abc' or: string_value1 = repr(float_value) + ' abc' Type in an interactive python session. help(str) or: help(repr) regards Matt -- | Matt Hammond | RD Engineer, BBC

Re: time.mktime problem

2005-08-30 Thread Matt Hammond
I don't get the same results: import datetime, time ta1=(time.strptime('01', '%H%M%S')) ta2=(time.strptime('230344', '%H%M%S')) t1=time.mktime(ta1) t2=time.mktime(ta2) print t1, t2 -2208988799.0 -2208905776.0 print t1-t2 -83023.0 Suse 9.3, python 2.4 (all 64bit) Matt -- | Matt

Re: Yielding a chain of values

2005-08-31 Thread Matt Hammond
be assigned a list containing the results of the successive yields. Equivalent to: x = [ yield r for r in iterable ] regards Matt -- | Matt Hammond | RD Engineer, BBC Research and Development, Tadworth, Surrey, UK. -- http://mail.python.org/mailman/listinfo/python-list

Re: scroll a frame to display several lines of widgets at a time

2005-09-02 Thread Matt Hammond
the previous 5 or do they have to be explicitly removed first. Thanks. Bill -- | Matt Hammond | RD Engineer, BBC Research and Development, Tadworth, Surrey, UK. -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple questions on use of objects (probably faq)

2006-03-08 Thread Matt Hammond
in the for loop and do something like: yz=[y[:-1].x-y[1:].x] yz = [e.x for e in y] yz.reverse() -- | Matt Hammond | RD Engineer, BBC Research Development, Tadworth, Surrey, UK. | http://kamaelia.sf.net/ | http://www.bbc.co.uk/rd/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple questions on use of objects (probably faq)

2006-03-08 Thread Matt Hammond
On Wed, 08 Mar 2006 11:29:29 -, Steven D'Aprano [EMAIL PROTECTED] wrote: On Wed, 08 Mar 2006 11:00:09 +, Matt Hammond wrote: 4: Can I avoid the dummy counter i in the for loop and do something like: yz=[y[:-1].x-y[1:].x] yz = [e.x for e in y] yz.reverse() I don't think that's

Re: Kamaelia 0.4.0 RELEASED - Faster! More Tools! More Examples! More Docs! ; -)

2006-06-26 Thread Matt Hammond
-- | Matt Hammond | Research Engineer, Tech. Group, BBC, Kingswood Warren, Tadworth, Surrey, UK | http://kamaelia.sf.net/ | http://www.bbc.co.uk/rd/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Broadcast server

2006-08-31 Thread Matt Hammond
in for a chat! Hope this helps! Matt -- | Matt Hammond | Research Engineer, Tech. Group, BBC, Kingswood Warren, Tadworth, Surrey, UK | http://kamaelia.sf.net/ | http://www.bbc.co.uk/rd/ -- http://mail.python.org/mailman/listinfo/python-list