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 1.6 Beta
-
FYI, just noticed there is a new beta posted, which supposedly fixes this problem.
-
All I see is a beta that expires in 7 days, which I would expect is the current one. @OMZ please clarify?
-
Testflight says the current beta expires Saturday May 30, a week from now. I haven't heard of any other updates.
-
I have 160014 ( I recently got a new device, and had installed test flight from scratch). Maybe I missed when this was updated.
The following does still crash though:def gen(): yield 1 x=gen() x.
Here are the 160014 release notes. Maybe I just missed this one on my old device.
Build 160014
-
Experimental Apple Watch support – the Pythonista Watch App allows you to launch scripts in the special "Watch" folder. The scripts still run on the iPhone (usually in the background) – the Watch basically just acts a remote control. Console output appears on the watch, including images, but things like
console.set_font()
orconsole.clear()
are not supported. The only way to get user input is currently to callraw_input()
. This brings up the dictation interface on the Watch with an optional list of suggestions to pick from. To set the list of text input suggestions, callappex.watch.set_input_suggestions()
beforeraw_input
. I'm not sure yet how useful this actually is, and if I'll include it in the final release. -
Added a Done button in the console output panel of the app extension
-
Cmd-Left/Right shortcuts (external keyboard) should work properly now
-
Background audio (experimental) – Note: This has the side effect of the mute switch being ignored when playing audio (like in pretty much all music/video player apps). You can also abuse this to make your script run in the background indefinitely by looping a silent track (can be useful for servers and the like).
-
New
is_authorized()
functions in thelocation
,contacts
,reminders
andphotos
modules -
New
did_pause
anddid_resume
methods that can be overridden insk.Scene
subclasses to handle interruptions (e.g. when the app is backgrounded) -
New
console.is_in_background()
function to determine whether Pythonista is currently the foreground app or not -
Fixed crash when importing
requests
in the app extension -
Fixed crash when initializing
sound.MIDIPlayer
without an explicit soundbank path (the "Random MIDI Melody" example shouldn't crash anymore) -
Fixed crashes related to code completion (somewhat hard to reproduce, so I'm not 100% sure)
-
Fixed
ui.View.bounds
(and a couple of other attributes) returning aRect
, but accepting only a tuple (any 4-number sequence should work now) -
Geometry types in the
sk
andui
modules (sk.Rect
,sk.Point
...) support slicing now (slices are always tuples) -
Reverted to an older version of
requests
for now to get rid of "InsecurePlatform" warnings that are logged to the console. I'm well aware that this isn't an actual solution, but a real fix turns out to be non-trivial to implement (the cleanest approach would be to upgrade to Python 2.7.9, but this is quite a lot of work and I'm not sure if I want to get into that for 1.6)
-
-
Btw:omz, how is the background audio enabled? Is this just automatically done in the
sound.Player
class? -
Python 2.7.10 is now out... https://hg.python.org/cpython/raw-file/15c95b7d81dc/Misc/NEWS
-
@JonB This is an older beta.
-
There are only 48 hours left on the current beta. Tick tock.
-
Extra modules in the current Pythonista Beta that are not up-to-date. | module | local | PyPI | | name | version | version | | ------------- | -------- | ---------- | | bottle | 0.12.5 | 0.12.8 | Upgrade possible | Crypto | 2.6 | 2.6.1 | Upgrade possible | ecdsa | 0.11 | 0.13 | Upgrade possible | feedparser | 5.1.3 | 5.2.0 | Upgrade possible | html2text | 2014.4.5 | 2015.4.14 | Upgrade possible | html5lib | 0.999 | 0.99999 | Upgrade possible | httplib2 | 0.8 | 0.9.1 | Upgrade possible | jinja2 | 2.7 | 2.7.3 | Upgrade possible | markdown | 2.2.0 | 2.6.2 | Upgrade possible | markdown2 | 2.2.1 | 2.3.0 | Upgrade possible | matplotlib | 1.3.1 | 1.4.3 | Upgrade possible | mpmath | 0.18 | 0.19 | Upgrade possible | numpy | 1.8.0 | 1.9.2 | Upgrade possible | paramiko | 1.13.0 | 1.15.2 | Upgrade possible | parsedatetime | 1.3 | 1.4 | Upgrade possible | PIL | ????? | 1.1.6 | Pillow upgrade possible | pycparser | 2.10 | 2.13 | Upgrade possible | pyflakes | 0.7.3 | 0.8.1 | Upgrade possible | pygments | 1.6 | 2.0.2 | Upgrade possible | pyparsing | 2.0.1 | 2.0.3 | Upgrade possible | PyPDF2 | 1.22 | 1.24 | Upgrade possible | pytz | 2013b | 2015.4 | Upgrade possible | requests | 2.6.0 | 2.7.0 | Upgrade possible | simpy | 3.0.2 | 3.0.7 | Upgrade possible | six | 1.6.1 | 1.9.0 | Upgrade possible | sqlalchemy | 0.9.7 | 1.0.4 | Upgrade possible | sympy | 0.7.4.1 | 0.7.6 | Upgrade possible | werkzeug | 0.9.4 | 0.10.4 | Upgrade possible | xmltodict | 0.8.7 | 0.9.2 | Upgrade possible | yaml | 3.09 | 3.11 | Upgrade possible | ------------- | -------- | ---------- |
================
-
New beta just arrived.
-
Major bug when updating: whichever script was open in the editor before the update is cleared and becomes an empty file, probably because the release notes are automatically opened.
Before updating, close all scripts and open only an empty tab!
-
Confirmed. Fortunately I had just checked my file into GitHub or all of my changes would have been lost.
Also, in this upgrade, the
requests
module was downgraded (v2.6.0 --> v2.5.1) so that it no longer throws warnings. -
posted this to another thread, but in case omz doesn't follow all:
ui.SegmentedControl raises a SystemError when accessing
subviews
, and crashes the app when usingadd_subview
. -
Just got my watch and playing with it and Pythonista 1.6.
Any update on things you can do with appex.watch?
Any more examples?
-
@MartinPacker To be honest, I probably won't ship the watch app with 1.6. I don't think it works well enough, and I can't see a lot of compelling use cases. I'll probably revisit this at some point though.
-
So I just tried a simple one on the watch:
name=raw_input("What is your name?\n")
print "Hello"+name+"\n"
The prompt seems to appear AFTER the input is dictated.
I'm on the latest beta.
Is it me or the beta?
-
@MartinPacker: Here is a very simple
appex
example script to import a file from a URL in, say, Safari. This one copies files already stored in other apps, like the Mail app. I personally don't have an Apple Watch, so I can't give you any examples on that front. It seems, though, from the documentation of the Apple Watch interface, it just executes scripts and provides text to theraw_input()
function, and nothing more. I might be wrong, but that is all I can gather. -
Thanks @Gerzer.
Actually the Roll Dice python script uses ui but doesn't take input - and works nicely on the watch. If I do more research on that it might yield something.
One difficulty is actually getting scripts off iPad onto iPhone in "Watch" folder. Anyone know how to do it.
The quid pro quo is I'm motivated to work on getting the Watch functionality known - for when 1.6 is shipped. If that's a post (on my blog) or examples that'd be fine.
I should work with @ccc to get something working from the Watch that talks to an IBM mainframe... :-)
(Google me if you think that last is odd.) :-)
-
Ah I see @omz's post. I would think if the ui route, rather than raw_input(), works we'd have a winner.
But obviously your prerogative.
-
The prompt seems to appear AFTER the input is dictated.
The way the current watch "app" beta works is very simple: It can send a request to the iPhone app to start a script, and then it starts polling for events every few seconds (as long as the app is visible on the watch). An event can be text/image console output, or a text input request (
raw_input
). The only way to get text input on the watch is to present a full-screen dictation view (which can include "quick reply" options that are set viaappex.watch
). If you callraw_input
directly after printing, it's quite likely that the two events arrive at the same time on the watch because of the polling interval, so the text input view covers the screen before you see the print output...Obviously, this is pretty inefficient, but I haven't found a better way to handle input/output with the current WatchKit SDK. I'm fairly sure that a better app will be possible when watchOS 2 comes out, but I haven't really looked into it yet.