Python TNEF (winmail.dat attachment access) library?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Petri Savolainen

    #1

    Python TNEF (winmail.dat attachment access) library?

    Hello,

    has anyone seen such a beast? I tried googling, PyPI, Parnassus etc. but
    could not find any pure-python code nor extensions to interface with any
    of the existing implementations .

    I am thinking about taking the Ruby code I found at



    and converting that to Python. I have no experience with Ruby so this
    will be rather interesting...

    I guess another option would be to use CTypes to plug into some tnef
    shared library/DLL. I'd prefer a pure-python route though...

    Any pointers/recommendations appreciated.

    Thanks,

    Petri

  • Larry Bates

    #2
    Re: Python TNEF (winmail.dat attachment access) library?

    Why not write Python class that uses CTypes and make it
    available as a recipe? From a performance standpoint it
    is unlikely you can do better than to call the .dll and
    have it do the work for you. Just a suggestion.

    -Larry Bates

    Petri Savolainen wrote:[color=blue]
    > Hello,
    >
    > has anyone seen such a beast? I tried googling, PyPI, Parnassus etc. but
    > could not find any pure-python code nor extensions to interface with any
    > of the existing implementations .
    >
    > I am thinking about taking the Ruby code I found at
    >
    > http://www.zweknu.org/technical/index.rhtml?s=p%7c15
    >
    > and converting that to Python. I have no experience with Ruby so this
    > will be rather interesting...
    >
    > I guess another option would be to use CTypes to plug into some tnef
    > shared library/DLL. I'd prefer a pure-python route though...
    >
    > Any pointers/recommendations appreciated.
    >
    > Thanks,
    >
    > Petri
    >[/color]

    Comment

    • Steven D'Aprano

      #3
      Re: Python TNEF (winmail.dat attachment access) library?

      Larry Bates wrote:
      [color=blue]
      > Why not write Python class that uses CTypes and make it
      > available as a recipe? From a performance standpoint it
      > is unlikely you can do better than to call the .dll and
      > have it do the work for you. Just a suggestion.[/color]

      A pure Python solution will be cross-platform, while
      calling a Windows DLL will only work under Windows.

      The optimal solution will be to call the DLL when it is
      available, and fall back on pure Python if it is not.


      --
      Steven.

      Comment

      Working...