Micro-threading PEP proposal announcement

2008-08-25 Thread Bruce Frederiksen
I wanted to make everybody aware that I've posted a (rather long and involved) PEP proposal for adding micro-threading to Python on python-ideas for feedback and review. In a nutshell, this proposal implements the Twisted Deferred/Reactor at the C level so that the Python programmer gets the advan

Re: Agnostic fetching

2008-08-01 Thread Bruce Frederiksen
On Fri, 01 Aug 2008 17:05:00 -0700, jorpheus wrote: > OK, that sounds stupid. Anyway, I've been learning Python for some > time now, and am currently having fun with the urllib and urllib2 > modules, but have run into a problem(?) - is there any way to fetch > (urllib.retrieve) files from a server

Re: problem when reading file

2008-07-31 Thread Bruce Frederiksen
On Thu, 31 Jul 2008 23:44:33 +1000, shrimpy wrote: > hi every one, i am new to python, > and coz i want to write a handy command for my linux machine, to find > a word in all the files which are under the current folder. > > the code is half done, but when i run it, it complain, and i don`t know

Re: Non Continuous Subsequences

2008-07-31 Thread Bruce Frederiksen
On Wed, 30 Jul 2008 09:32:25 -0700, bearophileHUGS wrote: > This post is not about practical stuff, so if you have little time, > you may ignore it. > > This is a task of the rosettacode.org site: > http://www.rosettacode.org/wiki/Non_Continuous_Subsequences > > A subsequence contains some subse

Re: Defunct when using subprocess.Popen

2008-07-30 Thread Bruce Frederiksen
On Wed, 30 Jul 2008 01:56:28 -0300, Gabriel Genellina wrote: > You should call os.waitpid() after killing the child process, to let the > OS free the resources allocated to it. > The subprocess.Popen object supports a 'wait' method directly. -- http://mail.python.org/mailman/listinfo/python-lis

Re: static variables in Python?

2008-07-29 Thread Bruce Frederiksen
On Tue, 29 Jul 2008 21:31:01 +, kj wrote: > In <[EMAIL PROTECTED]> Larry Bates <[EMAIL PROTECTED]> writes: > > [snip] > > Maybe it's easier to see what I mean with JavaScript: > > function foo() { > if (foo.x === undefined) foo.x = expensive_call(); > return do_stuff_with(foo.x); > } de