I need to use a Python package in my Xojo app. I only need this package and not a script. I know about making a script into an app but can I do this with a package? Can I unpackage a package? Could I use the package directly? Unfortunately, I read write a couple of lines in Python but the whole classes and packages stuff eludes me. And I’ve forgotten most of the Python stuff since I had to use this language the last time.
Hi Trixie - how is the Python code you’re trying to use packaged? Is it pyc files? Normally, a Python app is just a folder of py scripts or frozen pyc files.
As an aside, have you looked at the Einhugur Python 2/3 plugins?
Good question. I’m trying to use ftfy to fix some really screwed up encodings. See https://github.com/LuminosoInsight/python-ftfy . The problem on my development machine was that I needed sudo to install the packages. Otherwise, I would do this from the app.
At second glance I can’t use the package directly because it needs another package. The Einhugur plugins allow to execute code. Not sure how they could help.
I could write a simple script just reading the input from the package and doing the output.