On Feb 1, 2:28 pm, "Sun" <[EMAIL PROTECTED]> wrote: > as the subject, I 'd like to know how to include a piece of text as input in > the source code so that I do not need to read in data from files. I remember > there is some thing like this in Perl, have no idea if python has the same > thing? > > Thanks.
Heres a pointer to the use of the stringio module used to make text look like a file: http://en.wikipedia.org/wiki/Doctest#Example_3:_unique_words.py - Paddy. -- http://mail.python.org/mailman/listinfo/python-list