@Cethric @dgelessus Thanks! I got it to work and understand now!
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 procryon
-
RE: Split a string
Latest posts made by procryon
-
Almost finished app, just need advice finalizing it.
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:
-
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.
-
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!!
-
-
Editor Module Question
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.
-
Getting What Key is Pressed on Keyboard
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.
-
RE: Publishing a UI Project to the App Store?
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?
-
Publishing a UI Project to the App Store?
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.
-
Manipulate Webview in .pyui file with the corresponding .py file
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() v.present('fullscreen')
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!
-
Basic Touch Question
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 self.add_child(self.ship) def update(self): fill('green') 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) self.ship.run_action(move_action) if __name__ == '__main__': run(MyScene(), LANDSCAPE, show_fps=True)
-
"Connecting" Two Files
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!
-
RE: Split a string
@Cethric @dgelessus Thanks! I got it to work and understand now!
-
RE: Split a string
Thanks!
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() x=input() words=x.split() if words[0].lower() == "set": second_word = x.split()[1] float(second_word) screen.setBrightness_(second_word)
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?