arokem/python-matlab-bridge — pull request #77 by nzjrs (2014-08-05 13:33:29+00:00)
Title: Unify variable visibility and optionally leave in MATLAB

Based on the original pythonic branch by Hildon Bristow this branch adds more flexibility in how variables returned from functions are handled (576ee23). This is best demonstrated with an example

```python
x,y = mlab.meshgrid(range(1,4),range(10,15),nout=2)
```
returns the two matrices to the python side
```python
placeholder = mlab.meshgrid(range(15,20),range(10,15),nout=2,saveout=('X','Y'))
```
saves the two output variables as X and Y in MATLAB. Subsequently one can do
```python
mlab.run_code('Z=X+Y')
z = mlab.get_variable('Z')
```
and so on. This saves the serialization penality when one wishes to generatively or programatically call MATLAB code from python without necessarily wanting to generate whole matlab m files.

This required a few other changes, such as unifying run_code, run_script and run_function in such a way that they are all executed in the base workspace so variables can be shared (a07604a, 3993679, e315ad0).

I also added logging (cdaded9) and the ability to show MATLAB stdout (3a880cf).

Finally, due to the ambiguity of passing and returning adjacent matrix arguments via textual JSON, all arguments are passed via dictionaries/structures and converted on appropriately (7d38469)

The obvious extension to this work is to extend the ```placeholder``` listed above to be a true proxy type. When this proxy type is passed across the python/MATLAB boundary it would be done only as a reference and the value filled out appropriately on the MATLAB side. Similarly, on the python side any attempt to perform arithemetic with the proxy type would return its true value (e.g. https://pypi.python.org/pypi/ProxyTypes)