Read and write binary data

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mars creature

    Read and write binary data

    Hi guys,
    I am new to Python, and thinking about migrating to it from matlab
    as it is a really cool language. Right now, I am trying to figure out
    how to control read and write binary data, like
    'formatted','st ream','big-endian','little-edian' etc.. as in fortran.
    I googled, but can not find a clear answer. Anyone has clue where can
    I learn it? Thanks!!
    Jinbo
  • Patrick Maupin

    #2
    Re: Read and write binary data

    On Sep 7, 5:41 pm, Mars creature <jin...@gmail.c omwrote:
    Hi guys,
      I am new to Python, and thinking about migrating to it from matlab
    as it is a really cool language. Right now, I am trying to figure out
    how to control read and write binary data, like
    'formatted','st ream','big-endian','little-edian' etc.. as in fortran.
    I googled, but can not find a clear answer. Anyone has clue where can
    I learn it? Thanks!!
    Jinbo
    Start by looking at the array module.

    Regards,
    Pat

    Comment

    • Mars creature

      #3
      Re: Read and write binary data

      On Sep 7, 8:55 pm, Patrick Maupin <pmau...@gmail. comwrote:
      On Sep 7, 5:41 pm, Mars creature <jin...@gmail.c omwrote:
      >
      Hi guys,
      I am new to Python, and thinking about migrating to it from matlab
      as it is a really cool language. Right now, I am trying to figure out
      how to control read and write binary data, like
      'formatted','st ream','big-endian','little-edian' etc.. as in fortran.
      I googled, but can not find a clear answer. Anyone has clue where can
      I learn it? Thanks!!
      Jinbo
      >
      Start by looking at the array module.
      >
      Regards,
      Pat
      Thanks!!

      Comment

      • Kurt Smith

        #4
        Re: Read and write binary data

        On Sun, Sep 7, 2008 at 5:41 PM, Mars creature <jinbow@gmail.c omwrote:
        Hi guys,
        I am new to Python, and thinking about migrating to it from matlab
        as it is a really cool language. Right now, I am trying to figure out
        If you're trying to migrate from matlab to python I'd take a look at numpy:



        And scipy which is built on top of numpy:

        Why SciPy? Fundamental algorithms. Broadly applicable. Foundational. Interoperable. Performant. Open source.


        There is a plotting/numerical computation package known as matplotlib
        that does its best to parallel matlab commands:

        Download matplotlib for free. Matplotlib is a python library for making publication quality plots using a syntax familiar to MATLAB users. Matplotlib uses numpy for numerics.


        There is support for reading and writing binary data, even fortran records.

        And last but not least, you can always take a look at the scipy and
        numpy mailing lists.

        Good luck,

        Kurt
        how to control read and write binary data, like
        'formatted','st ream','big-endian','little-edian' etc.. as in fortran.
        I googled, but can not find a clear answer. Anyone has clue where can
        I learn it? Thanks!!
        Jinbo
        --

        >

        Comment

        • Mohamed Yousef

          #5
          Re: Read and write binary data

          I don't know if this is going to help you
          but a free&open alternative to Matlap is FreeMat just search for it

          Comment

          • Michael Palmer

            #6
            Re: Read and write binary data

            On Sep 7, 6:41 pm, Mars creature <jin...@gmail.c omwrote:
            Hi guys,
            I am new to Python, and thinking about migrating to it from matlab
            as it is a really cool language. Right now, I am trying to figure out
            how to control read and write binary data, like
            'formatted','st ream','big-endian','little-edian' etc.. as in fortran.
            I googled, but can not find a clear answer. Anyone has clue where can
            I learn it? Thanks!!
            Jinbo
            the struct module should be useful

            Comment

            Working...