Showing posts with label osx. Show all posts
Showing posts with label osx. Show all posts

opening winmail.dat attachments in osx

Monday, September 09, 2013

Microsoft. Outlook. It sends attachments in its own weird an wonderful format as a single file called winmail.dat, for those of us fortunate enough not to have Outlook as our email client to unpack them. There's an opensource project, TNEF which provides a tool that unpacks these well

  1. Download the tnef tar
  2. Untar it (tar -xf .., or just double click)
  3. Follow the README steps (note the make install needs to be run with sudo)
It installs into /usr/local/bin as well so now from anywhere you can run:
tnef winmail.dat
And the files will all be unpacked into the current dir. Sweet
As a side note, I tried the LookOut plugin for Thunderbird, but its output files weren't actually valid

python stdio in osx launchd

Monday, August 16, 2010

Running Python scripts via launchd doesn't seem to flush stdout print statements (ie. using the basic 'print' command). This can be confirmed by importing sys and calling sys.stdout.flush() after the print statements to see them actually output.

The solution? Add the -u flag to tell python not to buffer its stdio.

In an OSX launchd plist file, your solution may include:


<key>ProgramArguments</key>
<array>
<string>/usr/bin/python</string>
<string>-u</string>