# Analyze mworks on linux

**URL:** https://mworks.discourse.group/t/analyze-mworks-on-linux/873
**Category:** Support
**Created:** [February 17, 2023, 9:02pm UTC](https://mworks.discourse.group/t/analyze-mworks-on-linux/873 "2023-02-17T21:02:20Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)
#### Post date: [February 17, 2023, 10:24pm UTC](https://mworks.discourse.group/t/analyze-mworks-on-linux/873/4 "2023-02-17T22:24:16Z")

</div>

Hi Yoon,

The timing of your question is very good. Although this has been an [open issue](https://github.com/mworks/mworks-issues/issues/365) for a while now, I very recently added an officially-supported, [pure-Python MWK2 reader](https://raw.githubusercontent.com/mworks/mworks/master/tools/python/Modules/mwk2reader.py) to MWorks. It requires the [msgpack](https://pypi.org/project/msgpack/) package but otherwise has no dependencies outside of the Python standard library.

The module includes an `MWKFile` class that’s designed to be a drop-in replacement for `mworks.MWKFile`, the standard [data analysis tool](https://mworks.github.io/documentation/latest/guide/data_analysis.html#using-python) that, as you note, depends on macOS-only compiled code. If you want your analysis code to be compatible with both versions, import `MWKFile` like this:

```auto
try:
    from mworks.data import MWKFile
except ImportError:
    from mwk2reader import MWKFile

```

While I’d like to add a pure-MATLAB data file reader, too, the prospects for that don’t look so good, so I hope Python will work for you.

Cheers,  
Chris

---

_[View the full topic](https://mworks.discourse.group/t/analyze-mworks-on-linux/873)._
