Re: updated pre-PEP: The create statement

2006-04-06 Thread Carl Banks
Steven Bethard wrote: > I've updated the PEP based on a number of comments on comp.lang.python. > The most updated versions are still at: > > http://ucsu.colorado.edu/~bethard/py/pep_create_statement.txt > http://ucsu.colorado.edu/~bethard/py/pep_create_statement.html > > In this post, I'

Re: how to make a generator use the last yielded value when it regains control

2006-04-06 Thread John Salerno
Ben Cartwright wrote: > Definitely go for (1). The Morris sequence is a great candidate to > implement as a generator. As a generator, it will be more flexible and > efficient than (2). Actually I was just thinking about this and it seems like, at least for my purpose (to simply return a list

Re: how to make a generator use the last yielded value when it regains control

2006-04-06 Thread Ben Cartwright
John Salerno wrote: > Actually I was just thinking about this and it seems like, at least for > my purpose (to simply return a list of numbers), I don't need a > generator. Yes, if it's just a list of numbers you need, a generator is more flexibility than you need. A generator would only come in

Re: confusing behaviour of os.system

2006-04-06 Thread Ben Finney
"Todd" <[EMAIL PROTECTED]> writes: > Ben Cartwright wrote: > > >>> print '/usr/bin/gnuclient -batch -l htmlize -eval "(htmlize-file> > > >>> \"test.c\")"' > > /usr/bin/gnuclient -batch -l htmlize -eval "(htmlize-file> "test.c")" > > >>> print '/usr/bin/gnuclient -batch -l htmlize -eval "(htmlize-

Re: HTMLParser fragility

2006-04-06 Thread Lawrence D'Oliveiro
In article <[EMAIL PROTECTED]>, Rene Pijlman <[EMAIL PROTECTED]> wrote: >2. Use something more foregiving, like BeautifulSoup. >http://www.crummy.com/software/BeautifulSoup/ That sounds like what I'm after! -- http://mail.python.org/mailman/listinfo/python-list

Re: BIOCHIP --->>> NO GOOD !!

2006-04-06 Thread [EMAIL PROTECTED]
okay wrote: > Hello, > > > http://www.av1611.org/666/biochip.html > > To Archbishop Christodoulos Paraskevaides of the Greek Orthodox Church > in Athens and Greece > Archbishop, > I talked with a Greek Orthodox believer in Australia and he told me two > I'm thinking a list comprehension... -- h

my vote for handy python system admin tool

2006-04-06 Thread [EMAIL PROTECTED]
denyhosts denyhosts.sourceforge.net I used it at a recent contract sys. admin job, and found it so handy I installed it on my home gateway FreeBSD box. It ROCKS!!! I watch the system logs just to snicker when it stops a sshd attack dead in its tracks ;-0 Curtis -- http://mail.python.org/mailma

Re: How to create a tear off menu in TKinter. Help Needed

2006-04-06 Thread Jim Segrave
In article <[EMAIL PROTECTED]>, ishtar2020 <[EMAIL PROTECTED]> wrote: >Hi everybody > >I'd appreciate some help on creating a tear off menu with TkInter. I've >been reading some documentation but still no luck. > >Please don't get confused: when I mean "tear off" menu I don't mean a >drop-down or a

Re: good style guides for python-style documentation ?

2006-04-06 Thread sushant . sirsikar
Fredrik Lundh wrote: > (reposted from doc-sig, which seems to be mostly dead > these days). > > over at the pytut wiki, "carndt" asked: > > Are there any guidelines about conventions concerning > punctuation, text styles and language style (e.g. how > to address the reader)? > > any su

Re: how to make a generator use the last yielded value when it regains control

2006-04-06 Thread Lonnie Princehouse
Here's my take on the thing. It only prints one term, though. http://www.magicpeacefarm.com/lonnie/code/morris.py.html (a bit too long to post) -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode, command-line and idle

2006-04-06 Thread a . serrano
Martin v. Löwis wrote: > [EMAIL PROTECTED] wrote: > > This works if I use the console but gives the following error if I use > > IDLE: > > > > Traceback (most recent call last): > > File "C:\test.py", line 4, in ? > > text2 = unicode(raw_input(), sys.stdin.encoding) > > AttributeError: PyShe

Re: Simple string formatting question

2006-04-06 Thread Fredrik Lundh
Paul McGuire wrote: > Ooops, don't combine the two calls to rstrip(). > > def format(f, width=3): return ("%.*f" % (width, f)).rstrip(".0") > > print format(3.140) > print format(3.000) > print format(3.001) > print format(30.) > print format(30.000) hey, I'm doing test-driven develop

Re: Partially unpacking a sequence

2006-04-06 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > Thank you, everyone, for resolving my question. At one point, while > trying to solve the problem, I typed > > >>> y[1,3] > Traceback (most recent call last): > File "", line 1, in ? > TypeError: list indices must be integers > > The error message gave me no clue as to

Re: Python CGI problem: correct result, but incorrect browser response.

2006-04-06 Thread Tim Roberts
"Sullivan WxPyQtKinter" <[EMAIL PROTECTED]> wrote: > >title:Python CGI problem: correct result, but incorrect browser >response. > >In one of my CGI program,named 'login.py', the script return a HEADER >to web browser: > >Set-Cookie: sessionID=LAABUQLUCZIQJTZDWTFE; >Set-Cookie: username=testuser; >

<    1   2   3