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.
Pythonistia in built resources (fonts, images , sounds,etc)
-
@omz, I am not sure when you started programming. Not sure if you remember the days of the resource fork in mac files. But it was so easy. You could get a handle/ref to resources by index, name or item.
It would be great if you could reference the built in Pythonista resources in the same way. Of course you need to handle len etc...
I guess the idea of the resource fork went out the door when Steve jobs brought the NEXT OS back to apple. Such a shame. -
The resource fork is handled nicely now by just "bundling" resources into various parts of the application binary file structure. That's what I think the NSBundle API is all about. This API has some nice features, but the biggest surprise was that you can add things into the bundle dynamically which is what is enabling us to access lots of frameworks prviously unavailable to us. Maybe someone else can explain this better. I am guessing that there are other useful things that can be done with this.
-
@wradcliffe , thanks for the info. I am still a long way with playing with the Native API. I struggle with simple stuff in Python at the moment. But when I was reasonable coder in c a million years ago, I loved the resource manager. If I am not mistaken, back in those days it was limited to a signed 16 bit int. but that's 32k++ entries per resource. Could also make your own custom resources, with a limited ui also. It as so convienient and easy to use. I made a whole product publishing suite based on it. Because the software was sponsored by big banks and corporations, in that time it was the largest distribution of software in Australia. Every line of code was C, but it was not portable. Only ran on macs. It was still good.