[Tutor] Limit on number of characters in a string?

Jeffery Chin jeff at truedatapartners.com
Sun Sep 21 19:13:22 EDT 2003


Is there a limit on how many characters can be in a string?  I'm using
pythonwin with python 2.3 and there seems to be a limit.

I'm trying to concatenate lines from a file to make one continuous string
and it won't grow beyond a certain length.
I think it cuts it off around 3800 characters, but this was not consistent,
but looking at the screen output, it certainly would not add more to the
string.

script would read in the file and check whether to concatenate the line to
the string:

    elif (record_check == ','):
        interim_list.append(logline_path + entry + '.txt;')

looking at the screen output and what is written to a file, it will not
continue to write to the string after it hits a certain length.  If there
isn't such a limit there must be an error elsewhere, but it seems to work
fine for the shorter strings.

    Jeffery





More information about the Tutor mailing list