It’s not looking good. I still have my fingers crossed
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.

Best posts made by madivad
-
RE: Beta expires in 1 day
-
RE: Time to release a new version to App Store
There really is no need to have this subject raised again. It's been brought up before (by you) and remains unanswered (here. The fact there is a beta program and it was recently re-released means there is a developer involved, and it means that one day a product will most likely be released. Until that day, be satisfied with the community resources that have been made available here and on/off line in the app.
Given the amazing Pythonista is, the detailed documentation, the ease of the IDE and tools, and the available community resources, it is something the developer has obviously spent a lot of time getting right. There's no need to bug them and tell the current version being 17 months old. It's running Python 3.6, (considering 3.7 was only in beta when Pythonista was released, I think that's pretty good).
I do admit, I would like to see some sort of update from them giving something away, but this is the current paradigm of developers today; you rarely hear about new features in most operating systems, phones and devices, other development suites, just about everything today, that is until it is released.
If you'd like to be a part of the beta and have the latest features, follow the information in the [New Beta for Pythonista 3.3] (https://forum.omz-software.com/topic/5295/new-beta-for-pythonista-3-3) post (you only have to download TestFlight and click on a link in here and the update will be pushed to you if you want it). TBH, it was a little confusing for me when I first signed up, you HAVE to visit that link from the iOS device you wish to have the beta pushed to. I kept doing it from the desktop and couldn't work out why nothing appeared for a few days.
We could all speculate why the developer has gone dark. He use to be around, posting to the community and the occasional tweet, but he hasn't replied in several months to anyone publicly by any means of communication (community, tweets and emails). He must have his reasons. Given the beta is active and has just been renewed, let us be satisfied with that! When the next version is ready it will be released and it will be made available to the community.
(I personally want to believe he has locked himself in a cave and is working hard to make a perfect product for all of us to enjoy!) :D
-
RE: iCloud syncing and pythonista.
I think I may have solved this issue...
I’ve created dozens of files over the last couple of weeks trying to get to the bottom of this. But syncing between the iPad and iPhone has just stopped working for pythonista (only, everything else has been fine)
It IS a shame pythonista doesn’t have a “pull down” refresh option at the top of the iCloud folder, but what I have found is that if I go to the file explorer on the left and go down to “Open External” and then select files (as opposed to folder, it’s not guaranteed to work there), I can see all the files, even newly created files on either device. The iCloud folder in that location is up to date, it’s just that pythonista’s version of it hasn’t refreshed (at least in my case) for whatever reason...
But now, after having done that, it seems this may be fixed! So far so good!
-
RE: Who is running this show? I’m looking for support.
It’s a forum support issue itself. I’m not getting the password reset emails and so I can’t log into the forum with my desired account because for whatever reason the browser decided it didn’t want to remember the password, and I certainly don’t. I have tried resetting the email countless times to no avail.
For one I’d like to know if it’s just me not getting emails, or everyone.
You could try hitting the “forgotten password” link to send the email to yourself, you don’t need to actually click the link and change your password, but I’d like to know if it’s just not hitting my server (Gmail) or it is a mis configuration on their part. If the server is running from a personal computer at home it’s likely not to be set up correctly. But I need to rule out issues at googles end first. BTW, this is me on a different device, different browser. ie DaveM = madivad lol
-
RE: Beta expires in 1 day
There are some great people in this world and the Pythonista developer has done an amazing job.
Many people have been trying to contact him, self included, but he's not responding.
BTW: Julian Assange was arrested a month ago and no-one has heard from him either!!!!
Latest posts made by madivad
-
RE: 3D rotations in a UImage
TLDR; I have been researching this for hours and in checking out the image.transform options I can see that I think the transforms I need are already within pythonista, but I had chosen the wrong one initially and had never thought to look at the others. I feel quite stupid about now and am going back to the drawing board. I'm going to leave this post here because I've thought about and learned a lot and this has kind of formed my notes and I want to take the time to thank @JonB and @cvp for their time. I might revisit this code as an ObjC wrapper if I'm wrong, because I feel like I'm close to nailing it, but there is no NEED to reinvent the wheel.
I have to revisit the sample code I pasted at the origin because that was just plucked from SE and now I want to work out how I want to apply it. What I pasted isn't actually the code, I'm working on that part now. This is more about the learning for me at the moment and I am trying to get my head around the terminology for the transforms and matrixes. The maths is really beyond me and I'm starting to confuse a lot of these terms.
Looking at what @jonb has put together is based on some mistakes I think I have misstated.
This is where I'm thinking atm:
The code I pasted in the OT was from a SE site and not exactly right for my application. In learning the terms (mostly tonight) I need to MAKE the translation. At least, that's what I think I want.
I want the 3D equiv to CGAffineTransform, which doesn't take in the original instance (hence why I think I need the create/make version).
CATransform3DMakeRotation vs
CATransform3DRotate vs
CGAffineTransform <-- the 2D version
I think I need to use first one over the second.I'm still confused by the
c.CATrans....
where does thec
come from in JonB's code?Swapping out
ctypes.Structure
for justStructure
workedCATransform3DMakeTranslation declaration:
CATransform3D CATransform3DMakeTranslation(CGFloat tx, CGFloat ty, CGFloat tz);
CATranform3DMakeRotation declaration
CATransform3D CATransform3DMakeRotation(CGFloat angle, CGFloat x, CGFloat y, CGFloat z);
They are both of type: CATransform3D, declared here:
typedef struct CATransform3D { ... } CATransform3D;
Based on the code you guys have posted, I believe this is going to translate to:
class CATransform3D (Structure): ### NOTE 3D _fields_ = [('m11', c_float),('m12', c_float),('m13', c_float),('m14', c_float),('m21', c_float),('m22', c_float),('m23', c_float),('m24', c_float), ('m31', c_float),('m32', c_float),('m33', c_float),('m34', c_float), ('m41', c_float),('m42', c_float),('m43', c_float),('m44', c_float)]
Now I have got it crashing too, and I think it's to do with the returned 3DTransform, I need to convert it back to Affine... which means I think I would need to take the original image and trying to 3DRotate it. It's the image from a
ui.ImageView
which is..... it was at this point he knew he'd stuffed upI'll post more when I recover.
I'll be back. :)
-
RE: 3D rotations in a UImage
@JonB said in 3D rotations in a UImage:
CATransform3DMakeTranslation = c.CATransform3DMakeTranslation
CATransform3DMakeTranslation.argtypes = [c_float, c_float, c_float]
CATransform3DMakeTranslation.restype = CATransformCATransform3DRotate = c.CATransform3DRotate
CATransform3DRotate.restype = CATransform3D
CATransform3DRotate.argtypes = [CATransform c_float, c_float, c_float, c_float]identity= CATransform3DMakeTranslation(0,0,0)
identity.m34 = -1/500
rot = CATransform3DRotate(identity, math.radians(45), 0,1,0)I'm looking through the above code and I want to understand it. This is what was going wrong when I looked at the "wrapper how to" page, it makes little sense to me.
For starters:
- the 1st and 4th lines above:
CATransform3DMakeTranslation = c.CATransform3DMakeTranslation
CATransform3DRotate = c.CATransform3DRotate
where does the "c." come from?- How are the inputs of
CATransform3DRotate
andCATransform3DMakeTranslation
defined? Are those functions a part of the struct? I was thinking I'd need wrappers for each and every function but I'm starting to see (but not yet understand) some of it. - I am getting an error at
ctypes.Structure
with the carrot pointed to the dot in between. invalid syntax. weird, probably a conflict with other code in the module? import wrong? I'll post full code tonight. - this line:
CATransform3DRotate.argtypes = [CATransform c_float, c_float, c_float, c_float]
should there by a comma between the first arguments, or is the first argument not required?
I am getting an error about argtypes item 1 not having a from type.
Looking through what you've done there and cursory look at the docs, I've become confused re CATransform and CATransform3D and the relationship between them all. I'll focus on it tonight. Thanks for your inputs gents. cheers. -
RE: 3D rotations in a UImage
@cvp said in 3D rotations in a UImage:
you can always add a scene as a subview of an ui.View
I'm sorry, but this is exactly the sort of "stupid" (from me) that drives me nuts. I did not think of that, I made an assumption that it was ui or scenekit, I didn't realise you could mix and match like that. That's awesome and I'll definitely play with that idea tonight.
@JonB excellent, that a great place for me to start. I'll definitely give that a go too, hopefully report back tonight.
Thanks guys, cheers.
-
3D rotations in a UImage
G'day guys, it's been a while since I've played with Pythonista and I was stoked today when I opened up the forums and found a beta out there. That's great!
I have some UI ImageViews that I would like to transform the images in, about one of the 3D axis. The image has the silhouette of a phone in it and I want it to be representative of the orientation the phone is being held.
We have access to CGAffineTransform the transforms of which cover rotation, translation, skew and scale, but I can't get it to rotate about the axis I'd like because they're 2D related.
I have started looking at how to write the wrapper function and would seriously like some help to do it :)
This example code:
CATransform3D transform = CATransform3DIdentity; transform.m34 = 1.0 / -500; transform = CATransform3DRotate(transform, 45.0f * M_PI / 180.0f, 0, 1, 0.0f); _bgView.layer.transform = transform;
I believe that gives the rotation I am after (at this point I'm only doing a single axis, not the whole device, however I may do that later).
I've opened up https://omz-software.com/pythonista/docs/ios/objc_util.html
and now I'm here.If someone can point me into the right direction for researching the transform I actually need, I'd appreciate that. I've had my head stuck in CGAffineTransform for the last few days and I've skewed my own searching results and I just don't have the right terminology under my belt.
This page has a lot of information that is WAY beyond my knowledge, mathematically, practically and programmatically. I realise I have NO idea which one or where to start. But if the above function is a good place to start and I need any others later, I can always extend the code and include more of the other functions myself (hopefully).
https://developer.apple.com/documentation/quartzcore/transforms
Any help appreciated.
I have read that this is easy enough to achieve in scenekit(?) but I'm designing a GUI style app. It's a page of data with some icons, one of which I want to display an orientation. I don't think that scenekit wouldn't fit my needs.
edit: I had to remove all of the links except the one I really wanted as this question got flagged as spam. I have done the research, I'm just confused about what it is I actually need.
Thanks.
-
RE: Setting and Using Environment Variables with Pythonista
Good point re local decreyption key and storing it in the cloud.
TBH, it's more an exercise in "how" to do it, mostly because I've never worried too much because it is only me. But I'm looking to want to do more interesting stuff with APIs that are potentially dangerous (very limited financial access) and also "play" with the idea of using git a bit more (I am aware of .gitignore and will be using it).
No github login credentials or deliberate sharing of any ssh keys or anything like that, certainly not intentional.
With "the cloud: it's not so much a concern of a targeted attack or anything like that, but just a leaking of information, say through an app that may have too much privilege or a little more scope than what I intended. And just about learning better practices.
For the time being I have independent files on the devices, but this project is going to get bigger (hopefully) and so I might move development to an actual computer as I am always hampered by doing real coding on the ipad. I DO do it, but it's just never great.
For the time being I just have a single
import
which has the credentials on the device itself, ie not in the cloud. It's probably better that way :) -
RE: Setting and Using Environment Variables with Pythonista
ahh no worries then.
What's the best way to "secure" these keys to be used by multiple devices?
Obviously importing them from another file from the cloud means they are "on the cloud".
Can python scripts in the Cloud data area access scripts on your device area?
I think I'll probably just include a key script file on each device, I'm guessing that's the norm? I don't plan to distribute that file off my device, should I be concerned about encrypting it?
-
Setting and Using Environment Variables with Pythonista
What’s the best way to use environment variables for Pythonista? And how do I set them in the first place? I’m looking to not store an api key in a file if I can avoid it. I’ve been all through the settings and I nothing jumped out at me.
I do realise I could import keys from an external file but I’m surprised I haven’t seen anything specific for Pythonista since we don’t have that level of customisation with our (i)OS :)
-
RE: Problem with arrays
@bennr01 That is a brilliant and well constructed reply. Great work.
-
RE: Examples for dialogs.form_dialog() ?
I’d forgotten about your repos!
I ended up working it out, for me it’s the custom dialog where the control is misaligned, with the inbuilt control it aligns correctly
Edit: just confirmed, I downloaded that git, comment out line 89 (and join 90 back to the end of 89) and then edit the 'diag' at the end of the doc from:
diag = dialogs.form_dialog(title = 'Form Dialog', sections=form_list_of_sections)
To
diag = my_form_dialog(title = 'Form Dialog', sections=form_list_of_sections)
And run that on a smaller screen
-
RE: iCloud syncing and pythonista.
I think I may have solved this issue...
I’ve created dozens of files over the last couple of weeks trying to get to the bottom of this. But syncing between the iPad and iPhone has just stopped working for pythonista (only, everything else has been fine)
It IS a shame pythonista doesn’t have a “pull down” refresh option at the top of the iCloud folder, but what I have found is that if I go to the file explorer on the left and go down to “Open External” and then select files (as opposed to folder, it’s not guaranteed to work there), I can see all the files, even newly created files on either device. The iCloud folder in that location is up to date, it’s just that pythonista’s version of it hasn’t refreshed (at least in my case) for whatever reason...
But now, after having done that, it seems this may be fixed! So far so good!