• procryon

    Hey everyone. So I have an app that is basically ready but I have a few las things I want to polish first. They are listed below. I’d appreciate any advice on how to accomplish the following:

    1. I have two views/sheets in this app. The first one sets up settings for the second one. How can I make it so that the first sheet only appears the first time the app is opened? Like when the user closes and reppens the app, the first sheet will not appear, it goes straight to the second. Is this something done in pythonista or xcode.

    2. In relation to the first question, how do I make the settings the user changes in the first sheet stay permanent dor everytime they open the app, even after closing it? Like if they change the color of a square to red, how can I “save” that so that everytime the user opens the app, the square is red?

    Thank you in advance!!

    posted in Pythonista read more
  • procryon

    Hey all, quick question about the editor module here. For the .openfile() function, it gives me an error when I put the name of the file I want to open. After reading on the forum, it says to use the filepath. As much as I tried to find a way, I’ve not been able to get the filepath. The file is just in a folder called Brain. Thanks in advance.

    posted in Pythonista read more
  • procryon

    Hey guys I have a simple question. I saw a post on the forum here that was related to this but unfortunately, the only answer on that post did not clarify enough for me. So what I need to ask is this:

    Say I ask for a user’s input in a text field, how do I make it so that instead of having to press a button in order for the user’s input to be processed, the user can simply hit “return” on the keyboard.

    posted in Pythonista read more
  • procryon

    Thanks for the help guys, one last thing. If I used the Pythonista UI Editor, will I need to rewrite it as a script or is it possible to export that?

    posted in Pythonista read more
  • procryon

    Hey all, I have a quick question. I have a couple UI apps semi-finished and was wondering if it’s possible to export them to Xcode or get them to the App Store somehow. I’ve read that there are ways to export Pythonista apps if they’re written in Python 2.0 or something like that but never the UI.

    posted in Pythonista read more
  • procryon

    Hi all, I've started learning how to use the UI views and web views and such and have a simple question.

    I made a new file with UI and added a webview in the UI designer. How would I got into the other file created alongside the UI file and load "www.google.com" in it?

    Here's the code in the script:

    import ui
    import urllib
    v = ui.load_view()

    And in the UI, there's just a webview half the size of the grid sheet. I want to load "www.google.com" onto that webview.

    Thanks in advance!

    posted in Pythonista read more
  • procryon

    Hello all, I've been following the scene tutorial on Pythonista 3 and I've been trying to find a way to make the spaceship in the following code move constantly while i hold down on the button (which is the ellipse). I know it's a basic question but I've looked at examples and on the forum and have not found a solution.

    Thanks in advance for dealing with my simple questions lol.

    from scene import *
    class MyScene(Scene):
       def setup(self):
           self.background_color = 'midnightblue'
           self.ship = SpriteNode('spc:PlayerShip1Orange')
           self.ship.position = self.size / 2
       def update(self):
           ellipse(200, 100, 100, 100)
       def touch_began(self, touch):
           x,y = touch.location
           if x>200 and x<300 and y>100 and y<200:
               move_action = Action.move_by(10, 10, 0.7, TIMING_SINODIAL)
    if __name__ == '__main__':
       run(MyScene(), LANDSCAPE, show_fps=True)

    posted in Pythonista read more
  • procryon

    Hi all, I have another basic question here, I was wondering if it's possible (I'm sure it is but I just don't know how it works in Python) to have like a main file with all the code and another file with only arrays to hold data.

    I wanted to know how I would go about "connecting" the two in the sense that the main file with all the code can look through the arrays in the other "data-storing" file and use them. Thanks for the help!

    posted in Pythonista read more
  • procryon

    @Cethric @dgelessus Thanks! I got it to work and understand now!

    posted in Pythonista read more
  • procryon


    It works fine, but when I tried to make a different little project with it, an error I can't understand the cause of keeps popping up:

    from objc_util import *
    import console
    UIScreen = ObjCClass('UIScreen')
    screen = UIScreen.mainScreen()
    if words[0].lower() == "set":
           second_word = x.split()[1]

    For this little project, I just want to be able to input some text and check if it says set and has a decimal number (like 0.9) after it. Then I want to convert that 0.9 to a float to be used to set the screen brightness to 0.9. When I tell it to run and type in exactly what's necessary, nothing happens. What could I be doing wrong?

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!