placid wrote:
> What i need to do is, create a process using subprocess.Popen, where
> the subprocess outputs information on one line (but the info
> continuesly changes and its always on the same line) and read this
> information without blocking, so i can retrieve other data from the
> line i rea
The generator is in its own scope. For proof, try accessing q outside
the generator.
There are two possibilities. The first is that you don't know what
closures are and are complaining that python has them. That would be
amusingly ironic, but I'm guessing you do know (if you don't, google
"make_ad
Using win32 python 2.4.1, I have a minimal test program:
def generate():
raise TypeError('blah')
yield ""
print "\n".join((generate()))
Executing the program gives:
Traceback (most recent call last):
File "", line 5, in ?
TypeError: sequence expected, generator found
replacing TypeEr
kj wrote:
> I am hoping that it may be better this time around. For one thing,
> like Perl, Python was then (and maybe still is) a "work in progress."
> So I figure that Python scoping may have improved since then. Even
> if not, I think that Python is mature enough by now that adequate
> alterna
Srijit Kumar Bhadra wrote:
> However, I wish that there was more documentation of win32all beyond
> existing PyWin32.chm.
I suspect you have already used the "more documentation" -- it's the
MSDN docs.
p
--
http://mail.python.org/mailman/listinfo/python-list
Alex Martelli wrote:
> We should have an Evilly Cool Hack of the Year, and I nominate Paul
du
> Bois's one as the winner for 2004. Do I hear any second...?
Thank you :-)
I am busy writing it up as a recipe. I think I have a pleasing way for
it to be portable, even. Unfortunately, that removes
(warning: pedantic and off-topic response) NP-Complete does not mean
"equivalent to the halting problem." It means "poly-time equivalent to
any other NP-Complete problem".
NP-Complete problems are "only" exponential-time. The halting problem
is much harder! And of course, just the fact that a prob