Can i use this script as a python evaluator?

Peter Wang peterwang at vip.qq.com
Mon Oct 20 23:22:56 EDT 2008


Nathan Seese <uninverted at lavabit.com> writes:

>> #! /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)
thanks.
What's the difference between this and mine? 

I think what i need actually is a python function like
`file_get_contents' in php:)
> --
> http://mail.python.org/mailman/listinfo/python-list




More information about the Python-list mailing list