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.
Pythonista Clock "Gadget"
-
Code now in my MyPythonista repp at:
https://github.com/ltddev/MyPythonista/tree/master
Feel free to improve it in any way you like.
-
Awesome!
-
In my hands, the original gist version did not display the webvew, only the "X". The repo version's pyui file (which has been "pretty printed") does not load. I'm on the 1.6 beta.
-
@polymerchm,I copied and pasted the files from the GIST page to the repo page, I could not see or figure out any other way to get files into the repo. Seemed like an error-prone way to me, back to the "copy and paste" days.
When you say does not display the webview, do you mean you see the other subviews, ie, the Button and Switch controls? Right off the top of my head it may be that the beta is not loading either the html that has an embedded svg markkup, the svg object itself, the javascript, or some combination. I would be curious to know from anyone that has the 1.6 beta whether the svg clock will render in the main Pythonista editor which is the case in 1.5.
-
@ltddev - I am seeing the same things as @polymerch. Got the code from the GIST page first and the webview is blank except for the X in the upper left and < in the upper right. I also brought down the repo but the pyui file is not valid. The pyui from the GIST page looks OK in the pyui editor display but I suspect there may be an issue with it. The webview section does not look like it is the correct location and is defined as a subview of the clock display - looks fishy to me.
One other item. On my iPad location.get_location() returns None and this causes the code that follows to throw an exception.
-
I opened
issues
on the bugs that @polymerchm and @wradcliffe mentioned above. -
@ccc, thanks makes me feel like a "real" developer with real defects on my plate again :). To make my efforts worthwhile and provide motivation, do you see my little app making it to the Pythonsista Tools collection? To end up there would give me a lot of satisfaction because it is in fact a "utility" and I am enhancing it to speak out the time on a s electable interval.
As far as location bug, first I should add proper error and exception handling which it of course does not do. Second when using device capabilities like the GPS should of course be checking that the feature is available, that its turned on and so on and works in some manner ,or, handle gracefully when not. Unhanded exceptions to be absolutely avoided when possible.
-
If you keep closing those issues then the gadget will surely make its way into Pythonista-Tools! I am glad to hear that the todos make you feel at home.
I think that
location.get_location()
will return None in all the cases that you mentioned above so the exception handling in the issue should cover them all.The P1 issue is that we still can not see the clock. I assume that you are not using Pythonista v1.6 beta but are instead using v1.5 from the Apple App Store. This issue might be v1.6 specific.
-
@ccc Yes, I am using App Store version of 1.5 of Pythonista, not 1.6 beta and so it may indeed be specific to 1.6 beta.
-
Yes, I think sidebar presentation is broken in the current beta, looking into it.
-