Re: Can i use this script as a python evaluator?

2008-10-20 Thread Nathan Seese
#! /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

Re: search for a python compiler program whose name is jingle

2008-10-20 Thread Nathan Seese
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

Converting a strng to an anonymous function

2008-09-29 Thread Nathan Seese
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

Re: Converting a strng to an anonymous function

2008-09-29 Thread Nathan Seese
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

Odd Errors

2008-09-28 Thread Nathan Seese
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:

Re: Odd Errors

2008-09-28 Thread Nathan Seese
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