word wrap on different OS
Sabine Richter
sabine at textraeume.de
Mon Jun 3 06:48:52 EDT 2002
Hello,
I am not sure if I think clear on this subject:
A simple text file has been created for example on MS Dos or MacOS. So
the sign for a word wrap will be "\r\n" on MS Dos or "\r" on MacOS.
Then I save the file on a windows file system. The sign for the word
wrap will be converted to "\n".
If I now read the file content into a string and search for a word wrap
in the string I have to search for "\n". For example with string.split
or with an regular expression.
Is that all right?
And next question:
If I write a script, which uses MyODBC and the odbc-module from win32
extensions to connect to a MySQL-database, it can only be used on
windows. Isn't it?
So, in consequence I don't have to handle different signs for word wraps
in my script?
Or would it make any sense to do so? The purpose of the script is to
update a database structure based on a given dump file.
Thanks in advance for your answers
Sabine
More information about the Python-list
mailing list