Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Support LZMA
-
-
Although apparantly this was not included in pythonista,
https://gist.github.com/nmcspadden/5fd60c21a44e74df6a78
looks like it should work.
Turns out ios does come with /usr/lib/liblzma.dylib, and we can load it.
I have not tried this, but it looks like you could copy the existing lzma.py, remove the importerror lines, remove the import _lzma, and instead import all from the above file, which provides the LZMADecompressor class. Not sure if it is a drop in replacement, but seems like should be enough to get started -
Thanks, I'll try today
-
The reason
lzma
is currently not supported is thatliblzma
is automatically flagged as a private API for some reason, even when I build it from source instead of linking the system's (undocumented) version. It did actually work in Pythonista 3.0, but I had to remove it for 3.1 to avoid getting auto-rejected. -
I can't do it work, I think that the line
c_liblzma = CDLL('/usr/lib/liblzma.dylib')
makes my script to crash
Correction: usage of c_liblzma functions crash, I will abandon, too complex for me, sorry and still thanks for your efforts
-
For info: if you want to convert any local or shared file (ex: 7z->zip or rar->zip) and if you agree to do it on-line, thus a non confidential file, try which offers a free user, for 25 conversions per day, and a Python API...and it works 🙂