Python TNEF (winmail.dat attachment access) library?

  • Thread starter Petri Savolainen
  • Start date
P

Petri Savolainen

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|15

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
 
L

Larry Bates

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
 
S

Steven D'Aprano

Larry said:
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.

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,264
Messages
2,571,323
Members
48,007
Latest member
Elvis60357

Latest Threads

Top