[Tutor] How to Compare rpm version using Python Script
David L Neil
PyTutor at DancesWithMice.info
Sat Nov 30 02:59:37 EST 2019
On 30/11/19 3:07 PM, David wrote:
> On Sat, 30 Nov 2019 at 12:01, Alan Gauld via Tutor <tutor at python.org> wrote:
>
>> I used to work beside a data processing team who spent their lives
>> creating reports from old COBOL based systems. They used to write
>> their processed (ie pre-report) data extracts into CSV format files
>> but instead of commas they used the cedilla character(รง), as it
>> was hardly ever found in real world data (at least not in our area,
>> maybe in Romance based language areas that might not hold good).
>> But the point was to use a character that you will not actually
>> find in the text as a separator.
>
> Years ago I noticed that ASCII contains several control characters that
> are specifically intended as data separators:
> https://en.wikipedia.org/wiki/Control_character#Data_structuring
>
> I sometimes use them in my shell scripting where appropriate, due to
> the limited data structures available there, but I've never seen them used
> or advocated anywhere else.
>
> Are there reasons why they are not used more widely by programmers
> to solve simple textual data separation problems?
>
> I assume that they would still work with utf8, although I've not tested
> that.
Many of the "control characters" had specific purposes, perhaps in
certain situations or in relation to particular devices, eg xOA is still
used as printer/screen/etc LineFeed to this day. So, need to be careful
in case the output is ever printed (for example).
In ASCII there were official "separator" characters (x1C-1F), to which
users could assign their own particular meaning, even though they were
assigned names, eg "Record Separator".
These (latter) have carried-through to UTF-8, eg "INFORMATION SEPARATOR
ONE" through "...FOUR", and seem quite appropriate to the OP's application.
--
Regards =dn
More information about the Tutor
mailing list