Re: Comparison operators in Python

2011-06-02 Thread Michael Sparks
On Jun 2, 1:44 am, harrismh777 wrote: .. >     Just another example (excluding  print  1/2  and  unicode) where 3.x > seems to be completely compatible with 2.x/   (tongue-in-cheek) One of the key purposes of the 3.x line of code is to get rid of warts in the language. As a result, if someone is

Re: Extending classes __init__behavior for newbies

2011-02-14 Thread Michael Sparks
On Feb 14, 7:15 pm, rantingrick wrote: > On Feb 14, 11:55 am, Michael Sparks wrote: > > > It can be broken if someone tries to use the class as is - that is > > treating the class as a model - to drive a display of the ship. If > > it was written using super() then th

Re: Extending classes __init__behavior for newbies

2011-02-14 Thread Michael Sparks
It can be broken if someone tries to use the class as is - that is treating the class as a model - to drive a display of the ship. If it was written using super() then that wouldn't be a problem. For example, I could write a display mixin that I'd like to use like this: class VisibleShip(ship, sp

Re: Namespaces

2011-01-21 Thread Michael Sparks
On Jan 21, 10:39 am, sl33k_ wrote: > What is namespace? And what is built-in namespace? tl;dr - Namespaces are sets that contain names. You can think of namespaces as being /like/ boxes. A namespace is therefore an organisational tool, forming a similar purpose to human names & surnames - to iden

Re: Nested Scopes unintended behaviour ?

2010-03-18 Thread Michael Sparks
On Mar 17, 8:29 pm, Terry Reedy wrote: > On 3/17/2010 11:44 AM, Emile van Sebille wrote: > > > On 3/17/2010 8:16 AM Michael Sparks said... > >> Hi, > > >> Is the following behaviour expected ? > > > In short, yes. Assignment within a function forces the v

Nested Scopes unintended behaviour ?

2010-03-17 Thread Michael Sparks
Hi, Is the following behaviour expected ? Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15) [GCC 4.4.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> def Toggler(F, B): ... print F("Hello") ... print F("Hello") ... print F("Hello") ... print

Re: Interesting talk on Python vs. Ruby and how he would like Python to have just a bit more syntactic flexibility.

2010-02-20 Thread Michael Sparks
On Feb 18, 4:15 pm, Steve Howell wrote: ... >     def print_numbers() >         [1, 2, 3, 4, 5, 6].map { |n| >             [n * n, n * n * n] >         }.reject { |square, cube| >             square == 25 || cube == 64 >         }.map { |square, cube| >             cube >         }.each { |n| >  

Re: Modifying Class Object

2010-02-13 Thread Michael Sparks
Hi Alf, On Feb 12, 8:22 pm, "Alf P. Steinbach" wrote: > Thanks for the effort at non-flaming discussion, it *is* > appreciated. I would appreciate it if you tried to be non-flaming yourself, since you can see I am not flaming you. I was seeking to educate you on a simple matter which you seem

Re: Modifying Class Object

2010-02-12 Thread Michael Sparks
Hi Alf, Before I start, note we're talking about semantics, not implementation. That distinction is very important. On Feb 11, 4:49 am, "Alf P. Steinbach" wrote: > > *The* standard general language independent definition? [ of pointer ] > Yes. > > > As defined where? > > For example, as I use

Re: 2.6, 3.0, and truly independent intepreters

2008-10-28 Thread Michael Sparks
Philip Semanchuk wrote: > On Oct 25, 2008, at 7:53 AM, Michael Sparks wrote: >> Glenn Linderman wrote: >>> In the module multiprocessing environment could you not use shared >>> memory, then, for the large shared data items? >> >> If the poshmodule had a b

Re: Python suitable for Midi ?

2008-10-28 Thread Michael Sparks
Protocol wrote: > Is Python suitable for building a multi-track midi sequencer (with a > gui), that would run on windows / mac ? I fail to find sufficient > information on this, being a newbie and all. We had a Google Summer of Code student working on this sort of thing this year (This clearly p

Re: 2.6, 3.0, and truly independent intepreters

2008-10-28 Thread Michael Sparks
Glenn Linderman wrote: > so a 3rd party library might be called to decompress the stream into a > set of independently allocated chunks, each containing one frame (each > possibly consisting of several allocations of memory for associated > metadata) that is independent of other frames We use a c

Re: Do I need a lock here?

2008-10-27 Thread Michael Sparks
jasiu85 wrote: > Do I need a lock to protect the COMMON_DICT dictionary? AFAIK bytecode > operations are atomic and in each thread there's only one crucial > bytecode op: STORE_NAME in the first thread and LOAD_NAME in the > second one. So I suspect that everything will work just fine. Am I > righ

Re: 2.6, 3.0, and truly independent intepreters

2008-10-25 Thread Michael Sparks
Jesse Noller wrote: > http://www.kamaelia.org/Home Thanks for the mention :) I don't think it's a good fit for the original poster's question, but a solution to the original poster's question would be generally useful IMO, _especially_ on python implementations without a GIL (where threads are t

Re: 2.6, 3.0, and truly independent intepreters

2008-10-25 Thread Michael Sparks
Andy O'Meara wrote: > basically, it seems that we're talking about the > "embarrassingly parallel" scenario raised in that paper We build applications in Kamaelia and then discover afterwards that they're embarrassingly parallel and just work. (we have an introspector that can look inside running

Re: 2.6, 3.0, and truly independent intepreters

2008-10-25 Thread Michael Sparks
Glenn Linderman wrote: > In the module multiprocessing environment could you not use shared > memory, then, for the large shared data items? If the poshmodule had a bit of TLC, it would be extremely useful for this, since it does (surprisingly) still work with python 2.5, but does need a bit of T

Re: 2.6, 3.0, and truly independent intepreters

2008-10-25 Thread Michael Sparks
Andy O'Meara wrote: > Yeah, that's the idea--let the highest levels run and coordinate the > show. Yes, this works really well in python and it's lots of fun. We've found so far you need at minimum the following parts to a co-ordination little language: Pipeline Graphline Carousel

Re: 2.6, 3.0, and truly independent intepreters

2008-10-25 Thread Michael Sparks
Hi Andy, Andy wrote: > However, we require true thread/interpreter > independence so python 2 has been frustrating at time, to say the > least.  Please don't start with "but really, python supports multiple > interpreters" because I've been there many many times with people. > And, yes, I'm awar

Re: Best way to spawn process on back end computer

2008-10-22 Thread Michael Sparks
sophie_newbie wrote: > Hi, > > I'm running a python cgi script on a frontend web server and I want it > to spawn another script (that takes a long time to run) on a backend > number crunching server thats connected to the same network. What do > you think is the best way to do this? I have a few

ANN: Kamaelia 0.6.0, Axon 1.6.0 - New Release

2008-10-22 Thread Michael Sparks
niAxon Presentations:     http://www.slideshare.net/kamaelian Get involved:     http://www.kamaelia.org/Developers/     http://groups.google.com/group/kamaelia *CHANGED MAILING LIST*     http://code.google.com/p/kamaelia/ Licensing = Kamaelia is released under the Mozilla tri-license scheme (

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

2008-01-14 Thread Michael Sparks
Bjoern Schliessmann wrote: > Whoops, the TCP client does in fact quit if the server closes > connection :) Great - so it wasn't a problem with the TCPClient after all :-) > For some reason, my Listener doesn't quit. I thought > it's sufficient to exit the main method in some way to quit a > co

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

2008-01-12 Thread Michael Sparks
Bjoern Schliessmann wrote: > Hello, > > I'm currently trying to implement a simulation program with Kamaelia > and need a reliable TCP connection to a data server. The behaviour you're seeing sounds odd (which is hopefully encouraging :-), but it's not clear from the description whether its a bug

Re: cloud computing (and python)?

2008-01-02 Thread Michael Sparks
Aaron Watters wrote: (from a gmail account) > So cloud computing is java diskless workstations warmed over but less > flexible? > > I'm having trouble understanding why people would want > to buy in to this. Why do you like gmail - since you appear to use it? (I can think of several possibilities

Re: fiber(cooperative multi-threading)

2007-12-28 Thread Michael Sparks
Duncan Booth wrote: > There are also problems where full blown coroutines are appropriate. The > example I quoted earlier of turning a parser from one which generates a > lot of callbacks to one which 'yields' tokens is the usual example given. For completeness, I looked at the other half of the

Re: fiber(cooperative multi-threading)

2007-12-28 Thread Michael Sparks
Bjoern Schliessmann wrote: > Michael Sparks wrote: > >> All that said, my personal primary aim for kamaelia is to try and >> make it into a general toolkit for making concurrency easy & >> natural (as well as efficient) to work with. If full blown >> coroutines

Re: fiber(cooperative multi-threading)

2007-12-24 Thread Michael Sparks
Duncan Booth wrote: [ snip sections about why the single layer aspect can be helpful ] > I'm happy with generators as they are: they're a great solution to a > problem that most of us didn't realise we had until the solution came > along. That doesn't mean that I wouldn't also like to have a separ

ANN: Axon.STM 1.0.1 (release) Minimalistic Software Transactional Memory (with examples)

2007-12-24 Thread Michael Sparks
o to Richard Taylor for detailed feedback and discussion regarding locking and for pointing me at MASCOT which made me think of doing the dining philosophers this way :-) Future == This will be merged onto the mainline of Kamaelia with some auxillary functions , as another feather aimed at making concurrency easy to work with :-) Best Regards, Michael. -- Michael Sparks, Kamaelia Project http://kamaelia.sourceforge.net/Developers/ http://yeoldeclue.com/blog -- http://mail.python.org/mailman/listinfo/python-list

Re: fiber(cooperative multi-threading)

2007-12-23 Thread Michael Sparks
Duncan Booth wrote: > Michael Sparks <[EMAIL PROTECTED]> wrote: > >> Duncan Booth wrote: >> >>> Unfortunately generators only save a single level of stack-frame, so >>> they are not really a replacement for fibers/coroutines. The OP >>> should

Re: fiber(cooperative multi-threading)

2007-12-23 Thread Michael Sparks
Hi, > It just works, but using native Python threads for non-preemptive > threading is not cost-effective. Python has generator instead but it > seemed to be very restricted for general scripting. I wish I could > write nested (generator) functions easily at least. > > Is there any plan of imple

Re: fiber(cooperative multi-threading)

2007-12-23 Thread Michael Sparks
Duncan Booth wrote: > Unfortunately generators only save a single level of stack-frame, so they > are not really a replacement for fibers/coroutines. The OP should perhaps > look at Stackless Python or Greenlets. See On the surface of things, the single level aspect *LOOKS* like a problem, but in

Re: Passing by reference

2007-12-20 Thread Michael Sparks
[EMAIL PROTECTED] wrote: > ... the first element of the list to which x refers is a reference to > the new string and back outside foo, the first element of the list to > which x refers will be a reference to the new string. I'd rephrase that as: * Both the global context and the inside of foo

Re: state machine and a global variable

2007-12-16 Thread Michael Sparks
[EMAIL PROTECTED] wrote: > Basically, I agree that often the local state is much more useful. It > just seems to me that for some application it's an overkill. Like say, > for Turtle [1] (no jokes, please :) or PostScript [2]. Sounds also a bit similar to what happens under the hood in Open GL an

ANN: Axon.STM 1.0.0 (beta) Minimalistic Software Transactional Memory

2007-12-09 Thread Michael Sparks
logical errors is particularly welcome. (hopefully there aren't any - but it's always hard to spot your own) Thanks == Many thanks to Fuzzyman, Duncan Booth, John J Lee & Sylvain Hellegouarch for feedback whilst I was prototyping this. Best Regards, Michael. -- Michael Sparks, Kamaelia Project http://kamaelia.sourceforge.net/Developers/ http://yeoldeclue.com/blog -- http://mail.python.org/mailman/listinfo/python-list

Re: Minimalistic Software Transactional Memory

2007-12-09 Thread Michael Sparks
John J. Lee wrote: > Durus might be worth a look too (though I doubt it's suitable for your > situation): > > http://www.mems-exchange.org/software/durus/ > > The link to their paper about it seems to be broken, but I think it > was based somewhat on ZODB, but is simpler (67k tarball :-). Much

Re: Minimalistic Software Transactional Memory

2007-12-09 Thread Michael Sparks
Fuzzyman wrote: >> STM seems more in >> keeping with Kamaelia being generally lock-free. > > STM isn't lock free - it just abstracts the locks away from the > 'user'. You still need to lock around committing the transaction. > I perhaps phrased what I meant too tersely. Kamaelia isn't lock fre

Re: Minimalistic Software Transactional Memory

2007-12-09 Thread Michael Sparks
Duncan Booth wrote: > Michael Sparks <[EMAIL PROTECTED]> wrote: > >> I'm interested in writing a simple, minimalistic, non persistent (at >> this stage) software transactional memory (STM) module. The idea being >> it should be possible to write suc

Re: Minimalistic Software Transactional Memory

2007-12-08 Thread Michael Sparks
d S.dump() print "Committed", D.value["myaccount"] Fails as follows: accounts : Value(1, {'account_two': 100, 'myaccount': 0, 'account_one': 50}) accounts : Value(2, {'account_two': 100, 'myaccount': -100, 'account_one': 100}) Traceback (most recent call last): File "./NewSTM.py", line 70, in D.commit() # Third File "./NewSTM.py", line 20, in commit self.store.set(self.key, self) File "./NewSTM.py", line 37, in set raise ConcurrentUpdate __main__.ConcurrentUpdate (which is of course the error wanted - since we want to be able to detect failure) It's probably useful to know for the more general approach you suggest. Thanks! Michael. -- Michael Sparks, Kamaelia Project Lead http://kamaelia.sourceforge.net/Developers/ http://yeoldeclue.com/blog -- http://mail.python.org/mailman/listinfo/python-list

Minimalistic Software Transactional Memory

2007-12-08 Thread Michael Sparks
a pretty complete minimalistic thing, which does seem to work OK, but I'm interested in the three points I mention above - if anyone is willing to comment - specifcally: * Does the API look simple enough? * Are there any glaring mistakes in the code ? (It's always harder to se

Multiple Windows in Pygame, using true concurrency in python via Kamaelia

2007-12-01 Thread Michael Sparks
Hi, Just thought some people may be interested to hear that I've recently been looking at adding true concurrency into Kamaelia, by using Paul Boddie's pprocess as the core mechanism to allow us to run multiple Kamaelia systems in the same app. (Since we have thread based, and co-operative genera

Greylisting with Kamaelia (was Re: Python North-West meeting - 6 november 18.30)

2007-11-25 Thread Michael Sparks
Giacomo Lacava wrote: > New meeting of the Python North-West UK community! > > This month's talk is: > - Michael Sparks on "Greylisting with Kamaelia" - Just a small note that the slides from this are now up here: http://www.slideshare.net/kamaelian/kamaelia-grey

Re: Python component model

2006-10-10 Thread Michael Sparks
.html It's worth bearing in mind though that your description above is one approach for component based design. A survey of different approaches which you might find useful: > Thanks for all the link regarding kamaelia. Probably went a bit overboard there :) However I do agree that a visual system is something important, since not everyone thinks the same way. (I can talk about our system till the cows come home, show people code, but when I show them the visual builder, everyone seems to understand). Regards, Michael. -- Michael Sparks, Kamaelia Dust Puppy http://kamaelia.sf.net/ http://yeoldeclue.com/blog -- http://mail.python.org/mailman/listinfo/python-list

Re: Help me use my Dual Core CPU!

2006-09-18 Thread Michael Sparks
Paul Rubin wrote: > "Ramon Diaz-Uriarte" <[EMAIL PROTECTED]> writes: > > You might also want to check > > http://www.lindaspaces.com/products/NWS_overview.html > > by the guys who "invented" Linda. > > Cool, I guess. > > > (The Oz language/Mozart system is a good example of a different and > > very

Invitation: Kamaelia Open Space, Brussels, Sept 22 2006

2006-09-14 Thread Michael Sparks
e kamaelia mailing list: [EMAIL PROTECTED] If you know someone who you think is interested in the theme, could benefit from coming - for example someone interested in making practical concurrency safer and easier to use in future - please don't hesitate to forward this invitation to them. H

Re: beta.python.org content

2006-02-02 Thread Michael Sparks
Kay Schluehr wrote: > The new Python site is incredibly boring. Sorry to say this. The old > site is/was amateurish but engaged. Now after ~15 years of existence > Pythons looks like it wants to be popular among directors of a german > job centers. It aims to do everything right but what could be

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-04 Thread Michael Sparks
On Wednesday 28 Dec 2005 17:58:33, Robert Kern wrote: > ... Sorry to reply to the thread so late in the day, but I noticed (via QOTW :-( ) that Anton got worked up at me suggesting that congratulating someone with a new job was a nice idea (surprised me too - all the Google employees I've met have

Python on GP2X (Linux Based Handheld Console)

2005-12-15 Thread Michael Sparks
Hi, I hadn't seen any announcements regarding this, but there's a little device recently released called a GP2X which is a small dual CPU (2x200Mhz) device which runs Linux. Anyway, I thought there might be someone in here interested to hear that python AND pygame have both been ported to it alr

ANN: Kamaelia 0.3.0 released!

2005-10-11 Thread Michael Sparks
Kamaelia 0.3.0 has been released! Introduction Kamaelia is a networking/communications infrastructure for innovative multimedia systems. Kamaelia uses a component architecture designed to simplify creation and testing of new protocols and large scale media delivery systems. A subset

Re: Crypto.Cipher.ARC4, bust or me doing something wrong?

2005-09-21 Thread Michael Sparks
Paul Rubin wrote: > Michael Sparks <[EMAIL PROTECTED]> writes: >> Rather than re-inventing wheels I thought I'd pick a library sit down >> and see how pycrypt's meant to be used before actually going anyway. >> (Amongst other reasons, this is why I sus

Re: Free seminar on domain-specific modeling

2005-09-21 Thread Michael Sparks
Martijn Iseger wrote: ... > I believe the point being made by the organization is that during > computing history the most successful shifts in productivity were > achieved by similar shifts in raising the abstraction level on which > developers specify solutions. The alternate point is that durin

Re: Crypto.Cipher.ARC4, bust or me doing something wrong?

2005-09-21 Thread Michael Sparks
Paul Rubin wrote: > Michael Sparks <[EMAIL PROTECTED]> writes: >> I'm looking at using this library and to familiarise myself writing >> small tests with each of the ciphers. When I hit Crypto.Cipher.ARC4 >> I've found that I can't get it to decode w

Re: Crypto.Cipher.ARC4, bust or me doing something wrong?

2005-09-21 Thread Michael Sparks
Michael J. Fromberger wrote: ... > Since ARC4 is a stream cipher, the keystream changes over time -- with > ARC4, after each character enciphered. To decrypt successfully, you > need to make sure the decrypting keystream exactly matches the > encrypting one. ... from Crypto.Cipher import ARC4

Re: Release of Shed Skin 0.0.2: Easy Windows/OSX Installation

2005-09-20 Thread Michael Sparks
Mark Dufour wrote: > Shed Skin is an experimental Python-to-C++ compiler. Along with > GNU/Linux, version 0.0.2 should now also install easily under Windows > 2000/XP and OSX. Please give it a try and let me know if there are > still some problems. ss.py writes a make file, but unfortunately doesn

Re: Crypto.Cipher.ARC4, bust or me doing something wrong?

2005-09-20 Thread Michael Sparks
Jp Calderone wrote: > On Tue, 20 Sep 2005 16:08:19 +0100, Michael Sparks <[EMAIL PROTECTED]> > wrote: >>Hi, >> >> >>I suspect this is a bug with AMK's Crypto package from >>http://www.amk.ca/python/code/crypto , but want to >>check to see if I

Crypto.Cipher.ARC4, bust or me doing something wrong?

2005-09-20 Thread Michael Sparks
Hi, I suspect this is a bug with AMK's Crypto package from http://www.amk.ca/python/code/crypto , but want to check to see if I'm being dumb before posting a bug report. I'm looking at using this library and to familiarise myself writing small tests with each of the ciphers. When I hit Crypto.Ci

Re: Software bugs aren't inevitable

2005-09-19 Thread Michael Sparks
Giles Brown wrote: > Michael Sparks wrote: >> The problem that these sorts of approaches don't address is the simple >> fact that simple creating a formal spec and implementing it, even if >> you manage to create a way of automating the test suite from the spec >>

Re: Roguelike programmers needed

2005-09-18 Thread Michael Sparks
Robert Kern wrote: > Thomas Jollans wrote: >> what exactly is RPG/roguelike etc ? (what debian package provides an >> example?) > > Google is your friend. Often a fair answer, but I'd suggest that the question was fair, especially given the OP was seeking help :-) After all, I read the subject

Re: Software bugs aren't inevitable

2005-09-16 Thread Michael Sparks
Steven D'Aprano wrote: > On Thu, 15 Sep 2005 18:07:28 +0100, phil hunt wrote: >> On Thu, 15 Sep 2005 21:56:06 +1000, Steven D'Aprano >> <[EMAIL PROTECTED]> wrote: >>> >>>Are you saying that the recursion done by "serious" languages is a fake? >>>That it is actually implemented behind the scenes by

Re: Software bugs aren't inevitable

2005-09-16 Thread Michael Sparks
Paddy wrote: > A work colleague circulated this interesting article about reducing > software bugs by orders of magnitude: The problem that these sorts of approaches don't address is the simple fact that simple creating a formal spec and implementing it, even if you manage to create a way of auto

Re: global interpreter lock

2005-09-15 Thread Michael Sparks
Michele Simionato wrote: > It looks like I am reinventing Twisted and/or Kamaelia. If it's /fun/ , is that a problem ? ;) (Interesting implementation BTW :) FWIW, I've about a year ago it wasn't clear if we would be able to release our stuff, so as part of a presentation I included a minimalisti

Re: global interpreter lock

2005-09-15 Thread Michael Sparks
Stephen Thorne wrote: > On 15/09/05, Michael Sparks <[EMAIL PROTECTED]> wrote: >> At the moment, one option that springs to mind is this: >> yield WaitDataAvailable("inbox") > > Twisted supports this. > > help("twisted.internet.defer.waitForD

Re: global interpreter lock

2005-09-14 Thread Michael Sparks
[ Second time lucky... ] Paul Rubin wrote: ... > I don't see how generators substitute for microthreads. In your example > from another post: I've done some digging and found what you mean by microthreads - specifically I suspect you're referring to the microthreads package for stackless? (I tend

Re: global interpreter lock

2005-09-14 Thread Michael Sparks
arrgh... hit wrong keystroke which caused an early send before I'd finished typing... (skip the message I'm replying to hear for a minute please :-) Michael. -- http://mail.python.org/mailman/listinfo/python-list

Re: global interpreter lock

2005-09-14 Thread Michael Sparks
Paul Rubin wrote: ... > I don't see how generators substitute for microthreads. In your example > from another post: I've done some digging and found what you mean by microthreads - specifically I suspect you're referring to the microthreads package for stackless? (I tend to view an activated gen

Python Bindings for Dirac, (sorta announcement)

2005-09-13 Thread Michael Sparks
Hi, We're in the process of creating python bindings for Dirac. We currently have /decode/ of dirac functioning nicely, so I've packaged up the bindings separately from the rest of the Kamaelia project for those that are interested and would want a play. (Encoding will naturally follow next) To

Re: First release of Shed Skin, a Python-to-C++ compiler.

2005-09-11 Thread Michael Sparks
Paul Boddie wrote: > Michael Sparks wrote: >> Well, you did say you want help with locating problems. One problem with >> this is it doesn't build... > > I found that I needed both the libgc and libgc-dev packages for my > Kubuntu distribution - installing them

Re: Python versus Perl

2005-09-11 Thread Michael Sparks
Terry Reedy wrote: [...] > I am being picky because various people have claimed that Python suffers > in popularity because it is known as an 'interpreted language'. So maybe > advocates should be more careful than we have been to not reinforce the > misunderstanding. I sometimes wonder if it mig

Re: First release of Shed Skin, a Python-to-C++ compiler.

2005-09-11 Thread Michael Sparks
Mark Dufour wrote: > With this initial release, I hope to attract other people to help me > locate remaining problems, Well, you did say you want help with locating problems. One problem with this is it doesn't build... If I try and build (following your instructions), I get presented with a w

Re: Video display, frame rate 640x480 @ 30fps achievable?

2005-09-09 Thread Michael Sparks
Guenter wrote: > Michael Sparks schrieb: >> Yes. >> >> Co-incidentally we've been looking at video playback this week as >> well. We've been using Pygame with an Overlay surface, and it works >> fairly well. > > I guess Pygame was more suitable ove

Re: reading the last line of a file

2005-09-08 Thread Michael Sparks
Xah Lee wrote: > isn't there a way to implement tail in python with the same class of > performance? > > how's tail implemented?: Those crazy open source developers have an implementation here: http://cvs.sourceforge.net/viewcvs.py/mkcdrec/mkcdrec/busybox-0.60.5/Attic/tail.c?rev=1.1&view=markup I

Re: Video display, frame rate 640x480 @ 30fps achievable?

2005-09-08 Thread Michael Sparks
Guenter wrote: > I need to develop an application that displays video 640x480 16-bit per > pixel with 30 fps it is possible to achieve that frame rate and still > have some resources for other processing left? Yes. Co-incidentally we've been looking at video playback this week as well. We

Re: dual processor

2005-09-07 Thread Michael Sparks
Thomas Bellman wrote: > Michael Sparks <[EMAIL PROTECTED]> writes: >> Similarly, from >> a unix command line perspective, the following will automatically take >> advantage of all the CPU's I have available: >>(find |while read i; do md5sum $i; done|cu

Re: dual processor

2005-09-07 Thread Michael Sparks
Jorgen Grahn wrote: > On Tue, 06 Sep 2005 08:57:14 +0100, Michael Sparks <[EMAIL PROTECTED]> > wrote: ... >> Are you so sure? I suspect this is due to you being used to writing code >> that is designed for a single CPU system. What if you're basic model of >>

Re: Python versus Perl

2005-09-07 Thread Michael Sparks
Dieter Vanderelst wrote: > Dear all, > > I'm currently comparing Python versus Perl to use in a project that > involved a lot of text processing. I'm trying to determine what the > most efficient language would be for our purposes. I have to admit > that, although I'm very familiar with Python, I

Re: dual processor

2005-09-06 Thread Michael Sparks
Jeremy Jones wrote: > Michael Sparks wrote: >>Steve Jorgensen wrote: >>>On 05 Sep 2005 10:29:48 GMT, Nick Craig-Wood <[EMAIL PROTECTED]> wrote: >>> >>> >>> >>>>Jeremy Jones <[EMAIL PROTECTED]> wrote: >>>>>

Re: dual processor

2005-09-05 Thread Michael Sparks
Steve Jorgensen wrote: > On 05 Sep 2005 10:29:48 GMT, Nick Craig-Wood <[EMAIL PROTECTED]> wrote: > >>Jeremy Jones <[EMAIL PROTECTED]> wrote: >>> One Python process will only saturate one CPU (at a time) because >>> of the GIL (global interpreter lock). >> >>I'm hoping python won't always be lik

Re: OpenSource documentation problems

2005-09-02 Thread Michael Sparks
Paul Rubin wrote: > Michael Sparks <[EMAIL PROTECTED]> writes: >> > I've submitted a number of doc bugs to sourceforge and the ones >> > that are simple errors and omissions do get fixed. >> >> Cool. > > Better than nothing, but it's onl

Re: OpenSource documentation problems

2005-09-01 Thread Michael Sparks
A.M. Kuchling wrote: > On 1 Sep 2005 05:04:33 -0700, > Paul Boddie <[EMAIL PROTECTED]> wrote: >> Please note that I'm not labelling you as a troll. > > No, he's simply barking mad. I was amused by a rec.arts.sf.written > discussion [1] where Lee complains that Jonathan Swift (1667-1745)'s > writ

Re: OpenSource documentation problems

2005-09-01 Thread Michael Sparks
Hi Paul, Paul Rubin wrote: > Michael Sparks <[EMAIL PROTECTED]> writes: [[[ some random stuff, /intended/ at supporting people who have contributed docs, rather than saying people who offer constructive suggestions are bad. Possibly badly written. ]]] > I've submitted a numb

Re: OpenSource documentation problems

2005-08-31 Thread Michael Sparks
Bryan Olson wrote: > A plausible theory. I have some possibly-illustrative examples > of what I ran into within the last few weeks. Did you take what you learnt, and use that to create better documentation to be posted on python's SF project as a patch? (Not aimed at you, just a preface, and

Re: Release of PyPy 0.7.0

2005-08-30 Thread Michael Sparks
Michael Hudson wrote: ... > The chance of any random module you have written being rpython is more > or less zero, so it's not _that_ interesting for you to try to compile > them with PyPy. I know - the code I use contains LOTS of generators for example, which obviously don't fit the requirements

Re: aproximate a number

2005-08-28 Thread Michael Sparks
billiejoex wrote: > Hi all. I'd need to aproximate a given float number into the next (int) > bigger one. Because of my bad english I try to explain it with some > example: > > 5.7 --> 6 > 52.987 --> 53 > 3.34 --> 4 > 2.1 --> 3 What about 2.0? By your spec that should be rounded to 3 - is that w

Re: Release of PyPy 0.7.0

2005-08-28 Thread Michael Sparks
Valentino Volonghi aka Dialtone wrote: > Michael Sparks <[EMAIL PROTECTED]> wrote: > >> Would it be useful for people to start trying out their modules/code to >> see if they work with this release, and whether they can likewise be >> translated using the C/LLVM b

Re: Release of PyPy 0.7.0

2005-08-28 Thread Michael Sparks
Carl Friedrich Bolz wrote: [[... great news ...]] Would it be useful for people to start trying out their modules/code to see if they work with this release, and whether they can likewise be translated using the C/LLVM backends, or would you say this is too early? (I'm more thinking in terms of it

Re: Socket Troubles

2005-08-28 Thread Michael Sparks
Chris Spencer wrote: > My code's ... at http://deadbeefbabe.org/paste/1525/0 ... > I've written a simple class to manage P2P socket connections. However, > whenever I try to receive data, the socket raises an exception with the > error message (11, 'Resource temporarily unavailable'). At one poin

Re: Network performance

2005-08-23 Thread Michael Sparks
Roland Hedberg wrote: > What the protocol has to accomplish is extremely simple; the client > sends a number of lines (actually a RDF) and the server accepts or > rejects the packet. That's all ! ... > Now, presently I'm using ( why so is a long > history which I will not go into here) and that is

Re: global interpreter lock

2005-08-22 Thread Michael Sparks
Paul Rubin wrote: > Mike Meyer <[EMAIL PROTECTED]> writes: >> Even simpler to program in is the model used by Erlang. It's more CSP >> than threading, though, as it doesn't have shared memory as part of >> the model. But if you can use the simpler model to solve your problem >> - you probably shoul

Re: ANN: Kamaelia 0.2.0 released!

2005-08-04 Thread Michael Sparks
Terry Reedy wrote: > "Michael Sparks" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> def updater(interval, message): >> t = time.time(): >> while 1: >> if time.time() - t > interval: >> print message >

Re: Advanced concurrancy

2005-08-03 Thread Michael Sparks
Peter Tillotson wrote: > I've not yet had a chance to try some examples, but i've looked through > the documentation. It feels quite familiar, It hopefully should. The approach is based essentially on an asynchronous hardware approach, on the recognition that the fundamental reason that hangs to

RE: ANN: Kamaelia 0.2.0 released!

2005-08-03 Thread Michael Sparks
Tim Golden wrote: > I just wanted to say that I find the ideas behind Kamaelia > interesting, and I only wish I had an application for it! > Because I'm not especially into media-streaming, I'm more > interested in it from the point of view of the generator-based > architecture. It's nice to know

Re: ANN: Kamaelia 0.2.0 released!

2005-08-03 Thread Michael Sparks
phil hunt wrote: > On Wed, 03 Aug 2005 16:57:34 +0100, Michael Sparks <[EMAIL PROTECTED]> > wrote: ... >>Which aside from other things means you can't build (say) a video >>& SMIL playback system trivially, yet. > > Isn't SMIL something that'

Re: ANN: Kamaelia 0.2.0 released!

2005-08-03 Thread Michael Sparks
phil hunt wrote: > On Wed, 03 Aug 2005 16:57:34 +0100, Michael Sparks <[EMAIL PROTECTED]> wrote: >>> Is the audience programmers or >>> less technical people? A project that allows non-technical people >>> to build complex network applications is an ambiti

Re: ANN: Kamaelia 0.2.0 released!

2005-08-03 Thread Michael Sparks
I've reordered the q's slightly to avoid repetition... Also by answering this question first, it may put the rest of the answer into context better. phil hunt wrote: > At what stage of completion is it? This is something we deliberately try to reflect in the version number. Yes, you can build n

Re: ANN: Kamaelia 0.2.0 released!

2005-08-02 Thread Michael Sparks
Phil Hunt wrote: > Kamaelia seems it might be an interesting project. However, I don't > think the project is well served by this announcement -- which I > find vague and hard to understand. Which is a shame, because it > means that other people probably don't understand it very well > either, wh

ANN: Kamaelia 0.2.0 released!

2005-08-01 Thread Michael Sparks
Kamaelia 0.2.0 has been released! What is it? === Kamaelia is a collection of Axon components designed for network protocol experimentation in a single threaded, select based environment. Axon components are python generators are augmented by inbox and outbox queues (lists) for communicati

Re: Python language ver 2.4 , development platform 0.4

2005-07-30 Thread Michael Sparks
Dark Cowherd wrote: > The Python language is at ver 2.4 and a thing of beauty. As a > development environment IMHO it is probably 0.4 Have you considered looking at any of the commercial IDEs? Personally I *like* command line based systems, but I do know many people who swear by GUI based IDEs. I

Re: Python-cgi web or Perl-cgi script doubt

2005-07-30 Thread Michael Sparks
praba kar wrote: >I want to know difference between > Python-cgi and Perl-cgi and also I want > to which one is efficient from the performance. Possibly the most important difference between the two is when you're using JUST cgi - ie no mod_perl, no mod_python, etc. With python, if your cg

Re: Advanced concurrancy

2005-07-29 Thread Michael Sparks
y in python aswell ;-) It's getting there - the recent PEP regarding the ability to cause a generator to have an exception thrown inside it provides very similar to Unix signals as provided via "kill", which will be nice when 2.5 is released. Hopefully you find the system useful,

Kamaelia Talk at Open Tech 2005, anyone for sprinting?

2005-07-15 Thread Michael Sparks
Hi, Apologies first to those outside the UK... Open Tech 2005* is a follow on from previous years' NotCon events which are community driven low cost events by geeks & developers for geeks & developers. (Much like Pycon & Europython but much more general in nature) Website: http://www.ukuug.org/e

Re: Python concurrent tasking frameworks?

2005-07-03 Thread Michael Sparks
Chris Stiles wrote: > I was wondering if anyone had a list of the various (presuming more than > one) > Python tasking frameworks? I know of Twisted already, but I'm really > looking > for something along the lines of a task/thread pool type of arrangement. The Kamaelia framework might or might

Re: Assigning to None

2005-07-01 Thread Michael Sparks
Mike Meyer wrote: > Peter Hansen <[EMAIL PROTECTED]> writes: >> Mike Meyer wrote: >>> Yes. I once grabbed an old program that did assignments to None. But >>> that's always been a bad idea. >> What was the use case!? > > Unpacking a tuple. Something like this: > > (foo, bar, None) = gen

  1   2   >