Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #98630

Re: using binary in python

Subject Re: using binary in python
Newsgroups comp.lang.python
References <mailman.164.1447060794.16136.python-list@python.org> <HbGdndTOtKc3EdzLnZ2dnUU7-YnOydjZ@giganews.com> <mailman.214.1447186467.16136.python-list@python.org>
From Larry Hudson <orgnut@yahoo.com>
Date 2015-11-10 19:53 -0800
Message-ID <Gq2dne_GjoQtJt_LnZ2dnUU7-e-dnZ2d@giganews.com> (permalink)

Show all headers | View raw


On 11/10/2015 12:14 PM, Dennis Lee Bieber wrote:
> On Mon, 9 Nov 2015 22:20:25 -0800, Larry Hudson via Python-list
> <python-list@python.org> declaimed the following:
>
>> Of course it can.  The only difference a text file and a binary file is the way it's opened.
>> Text files are opened with 'r' or 'w', while binary files are opened with 'rb' or 'wb'.  Being
>> different modes, the reading/writing is handled differently.  One obvious difference, the lines
>> of a text file are marked by ending them with a newline character, so it's easy to read/write
>> the text line-by-line.  But the data in a binary file is completely arbitrary and is much
>
> 	To be strict -- a text file has <some> system defined means of marking
> line endings. UNIX/Linux uses just a <LF> character; Windows uses the pair
> <CR><LF>. TRS-DOS used just <CR> for end of line. Some operating systems
> may have used count-delimited formats (and then there is the VMS FORTRAN
> segmented records with start and end segment bits).
>
The main purpose of my message was to get across the idea of separating the actual data (as 
binary values) and the way this data is displayed (to the user/programmer).  They are two 
entirely different concepts, and the OP was obviously confused about this.  But of course, 
you're right -- I was careless/imprecise in some of my descriptions.

      -=- Larry -=-

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

using binary in python kent nyberg <kent@z-sverige.nu> - 2015-11-08 16:27 -0500
  Re: using binary in python Jussi Piitulainen <harvesting@makes.email.invalid> - 2015-11-09 11:58 +0200
  Re: using binary in python Larry Hudson <orgnut@yahoo.com> - 2015-11-09 22:20 -0800
    Re: using binary in python Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-11-10 15:14 -0500
      Re: using binary in python mm0fmf <none@mailinator.com> - 2015-11-10 20:36 +0000
        Re: using binary in python Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-11-10 16:02 -0500
          OT: Re: using binary in python mm0fmf <none@mailinator.com> - 2015-11-10 22:17 +0000
        Re: using binary in python Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-11-10 21:22 +0000
        Re: using binary in python Random832 <random832@fastmail.com> - 2015-11-10 19:03 -0500
        Re: using binary in python Random832 <random832@fastmail.com> - 2015-11-10 19:04 -0500
      Re: using binary in python Larry Hudson <orgnut@yahoo.com> - 2015-11-10 19:53 -0800
    Re: using binary in python Random832 <random832@fastmail.com> - 2015-11-10 15:44 -0500
    Re: using binary in python kent nyberg <kent@z-sverige.nu> - 2015-11-10 16:29 -0500
      Re: using binary in python Christian Gollwitzer <auriocus@gmx.de> - 2015-11-11 22:32 +0100
    Re: using binary in python Michael Torrie <torriem@gmail.com> - 2015-11-10 17:19 -0700

csiph-web