# Unpacking mwk files with Windows

**URL:** https://mworks.discourse.group/t/unpacking-mwk-files-with-windows/285
**Category:** Support
**Created:** [January 4, 2019, 2:40pm UTC](https://mworks.discourse.group/t/unpacking-mwk-files-with-windows/285 "2019-01-04T14:40:57Z")
**Posts on this page:** 5
**Page:** 1

<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: [January 4, 2019, 2:40pm UTC](https://mworks.discourse.group/t/unpacking-mwk-files-with-windows/285/1 "2019-01-04T14:40:57Z")

</div>

Hi Chris,

Hope you had a good holiday season! Elia in our lab is wanting to look at some .mwk files, but he is a member of the Church of Windows And Linux, and does not wish to lay his hands upon a filthy Mac (his words, not mine…but I understand the sentiment). I sent him the matlab script from /Application Support/Mworks/Scripting/Matlab, but he says it relies on a compiled mex file in the mac format and cannot run on his computer. Would it be possible to compile that file in a windows mex format so he can unpack the data files? If not, is there a good way to save an unpacked database so I can unpack it and send it to him?

Thanks,

Simon

---

<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: [January 4, 2019, 2:50pm UTC](https://mworks.discourse.group/t/unpacking-mwk-files-with-windows/285/2 "2019-01-04T14:50:30Z")

</div>

Hi Simon,

> Would it be possible to compile that file in a windows mex format so he can unpack the data files?

No. See [this discussion](https://mworks.tenderapp.com/discussions/questions/562) for more info.

Other folks have developed tools for reading MWorks data files on non-Mac systems, but I can’t provide any support for this. See [this comment](https://mworks.tenderapp.com/discussions/questions/604#comment_37639373) for details.

> If not, is there a good way to save an unpacked database so I can unpack it and send it to him?

If you’re using MATLAB, you could read out all the events with `getEvents`, then write the resulting array to a `.mat` file. If you’re using Python, maybe try [pickle](https://docs.python.org/3/library/pickle.html)?

Cheers,  
Chris

---

<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: [January 4, 2019, 6:21pm UTC](https://mworks.discourse.group/t/unpacking-mwk-files-with-windows/285/3 "2019-01-04T18:21:11Z")

</div>

Ah, too bad but makes sense. Pickling it could work but won’t the pickles  
be really huge? I really only want to send him the eye movements – would  
there be a simple way to unpack just those and save them to a csv?

---

<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: [January 4, 2019, 8:57pm UTC](https://mworks.discourse.group/t/unpacking-mwk-files-with-windows/285/4 "2019-01-04T20:57:38Z")

</div>

> I really only want to send him the eye movements – would there be a simple way to unpack just those and save them to a csv?

Well, you could [extract the events you want](https://mworks.github.io/documentation/latest/guide/data_analysis.html#using-python), then write out their values using [csv.writer](https://docs.python.org/3/library/csv.html#csv.writer). That seems pretty simple.

Chris

---

<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: [July 19, 2022, 9:38pm UTC](https://mworks.discourse.group/t/unpacking-mwk-files-with-windows/285/5 "2022-07-19T21:38:48Z")

</div>


