victorlei/smop — pull request #22 by perimosocordiae (2014-01-17 21:31:24+00:00)
Title: detect docstrings and treat them as such

This checks for the first unbroken line of comments
directly following a function declaration,
and hoists them into a docstring.

For example, with the input file `test.m`:
```matlab
function y = test(x)
% This is a test function.
%
% Usage:
% y = test(x);

y = x; % magic
```

We get:
```python
# Autogenerated with SMOP version 0.23
# smop/main.py test/test.m -o test/test.py
from __future__ import division
import numpy as np
from scipy.io import loadmat,savemat
import os

def test(x):
"""This is a test function.

Usage:
y = test(x);
"""
y = x
# magic
return y
```