#! /bin/sh
python -c import sys;exec(sys.stdin)
I know this isn't your question, but I think you could write that more
cleanly with:
#!/usr/bin/python
import sys
exec(sys.stdin)
--
http://mail.python.org/mailman/listinfo/python-list
I don't remember its name very clear, it may be 'jingle' or not this
program runs on windows and can compile a python program into exe file
without gcc
it has no webspace but is announced on the author's blog when I find it
some times ago.
I can't find the link now. I there anybody else know
I'm writing a program to sort files with arbitrary python code. The
method I'm using for that is to pass sort an anonymous function taken
from the arguments. I'm wondering how to change a raw string into an
anonyous function.
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 29, 11:25 pm, Nathan Seese [EMAIL PROTECTED] wrote:
I'm writing a program to sort files with arbitrary python code. The
method I'm using for that is to pass sort an anonymous function taken
from the arguments. I'm wondering how to change a raw string into an
anonyous function
When I run:
#!/usr/bin/python
lines = list()
while 1:
try:
inLine = raw_input()
lines = lines.append(inLine)
except EOFError:
break
I get:
Traceback (most recent call last):
File ./foobar.py, line 7, in module
lines = lines.append(inLine)
AttributeError:
On Sep 28, 7:13 pm, alex23 [EMAIL PROTECTED] wrote:
The problem is with this:
lines = lines.append(inLine)
The append method of a list modifies the list in-place, it doesn't
return a copy of the list with the new element appended. In fact, it
returns None, which it then attaches