omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    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

    Pythonista
    55
    301
    445153
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • MartinPacker
      MartinPacker last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • omz
        omz last edited by

        @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.

        1 Reply Last reply Reply Quote 1
        • MartinPacker
          MartinPacker last edited by

          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?

          1 Reply Last reply Reply Quote 0
          • Gerzer
            Gerzer last edited by

            @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 the raw_input() function, and nothing more. I might be wrong, but that is all I can gather.

            1 Reply Last reply Reply Quote 0
            • MartinPacker
              MartinPacker last edited by

              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.) :-)

              1 Reply Last reply Reply Quote 0
              • MartinPacker
                MartinPacker last edited by

                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.

                1 Reply Last reply Reply Quote 0
                • omz
                  omz last edited by

                  @MartinPacker

                  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 via appex.watch). If you call raw_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.

                  1 Reply Last reply Reply Quote 0
                  • Webmaster4o
                    Webmaster4o last edited by

                    Any estimation for when pythonista 1.6 will be public? Haven't been able to join the beta, and I really wanna use it! A month? Three? A year?

                    1 Reply Last reply Reply Quote 0
                    • MartinPacker
                      MartinPacker last edited by

                      Thanks @omz. I can see the current infrastructure makes it tough to make a decent watch-originated app.

                      I'm wondering if I can use Workflow to front-end an "on the phone" app with a half decent UI.

                      As it happens I was just playing; I don't have a real application just yet.

                      1 Reply Last reply Reply Quote 0
                      • bslayton
                        bslayton last edited by

                        @webmaster4o same here. I've been trying to be as patient as possible. Hopefully it's soon!

                        1 Reply Last reply Reply Quote 0
                        • userista
                          userista last edited by

                          Bug: in Editor Actions only the last script shows in the share sheet. Also reported by @GCarver http://omz-forums.appspot.com/pythonista/post/6187778610036736#post-5310158079000576

                          1 Reply Last reply Reply Quote 0
                          • JonB
                            JonB last edited by

                            hyshai, I was about to respond that I didn't have this problem.... until I clicked more, and reordered the scripts.... then all but one disappeared. so the symptom appears to be caused once the more menu is entered...

                            1 Reply Last reply Reply Quote 0
                            • userista
                              userista last edited by

                              @JonB
                              Oops! Sorry :(

                              1 Reply Last reply Reply Quote 0
                              • dgelessus
                                dgelessus last edited by

                                The unpredictable script clearing bug has returned for me recently and has happened multiple times. The few common circumstances that I could observe were the following:

                                • I was using an external keyboard
                                • The files were empty when I reopened the app after it was terminated (either automatically or manually by swiping it out of the app switcher)
                                • The affected files were the currently active editor tab
                                • More than one tab was open (not entirely sure about this one)
                                • None of the files were Python scripts (two Markdown files and one plain text file)

                                One time this even happened twice in a row. I had about 5 files open, one of them got cleared. I closed that tab, restarted the app, and the next file was cleared as well.

                                Can't say if this is related to the bug that emptied files when updating to a new beta version. That still happened with the last update, but that was a few weeks ago. I've got a feeling the beta might be expiring again soon. *hint hint*

                                1 Reply Last reply Reply Quote 0
                                • omz
                                  omz last edited by

                                  @dgelessus

                                  I think I know why this happens now, and it should be fixed in the next build (later this week). Basically, the editor sometimes auto-saves a file even though it hasn't finished loading yet, resulting in an empty file.

                                  In the case of the beta release notes, the app first restores the previous tabs, but then immediately opens the release notes file in the selected tab, before the previous file has actually been loaded completely. Opening a different file (the release notes) in the same tab triggers an auto-save, so the previous file is overwritten with an empty file...

                                  In this case, it's trivial to reproduce, but in other situations, the bug appears to be more "random". It could for example happen if the app goes into the background (triggering an auto-save) while a file is being loaded etc. The fix is pretty simple – just don't save anything before a file is loaded (duh!).

                                  It's possible that there are other reasons for this behavior, but I'm relatively confident that this is it.

                                  1 Reply Last reply Reply Quote 0
                                  • JonB
                                    JonB last edited by

                                    not sure if this is a bug or feature...

                                    when creating and presenting a ui.View, the default bg color is (0,0,0,1), or black.

                                    however when presenting as panel, the bg color shows up as white, even though the attribute is unchanged.

                                    setting the bg color manually does correct this.

                                    I want to say that in 1.5, the default color was white, but I could be wrong.

                                    1 Reply Last reply Reply Quote 0
                                    • Webmaster4o
                                      Webmaster4o last edited by

                                      I can confirm that in 1.5, default background_color is (0.0, 0.0, 0.0, 1.0). view.present shows black, but view.present("panel") shows up white. The same bug exists in 1.5.

                                      1 Reply Last reply Reply Quote 0
                                      • omz
                                        omz last edited by

                                        @JonB @Webmaster4o

                                        The value that you get from the background_color attribute is actually incorrect, it should be either (0.0, 0.0, 0.0, 0.0) or None, i.e. the default color is transparent, which has different effects depending on the presentation style.

                                        1 Reply Last reply Reply Quote 0
                                        • Webmaster4o
                                          Webmaster4o last edited by

                                          Oh! So there is a bug, but not the one we thought :P

                                          1 Reply Last reply Reply Quote 0
                                          • Tizzy
                                            Tizzy last edited by

                                            What's the word on iOS 9 beta... are there any known 1.6 issues with it? Apple beta software program just sent out notifications and I want to jump in.

                                            Update:

                                            Just went for it and there appears to be a problem with the speech module - specifically speech.get_languages() now returns an empty array rather than the lost of languages and corresponding codes.

                                            https://flic.kr/p/vwhLpC

                                            PS anybody have any scripts to use as action extensions to get the direct URL of a Flickr photo?

                                            alt text

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Powered by NodeBB Forums | Contributors