Play with the UI implementation of Pythonista3 [Super Super Introduction]

Introduction

When I play Python at home, I use an app called Pythonista3 on my iPad (past article). Pythonista3 has a library for implementing the UI of the smartphone app, and I wondered if I could do something cool with this, so I tried various things!

Introduction

First, let's see what the Pythonista 3 ui library looks like!

File creation

First, create a file for UI implementation. Select "Script with UI" when creating a new file!

Doing this will create an arbitrary name, foo.py, and a foo.pyui with the same name. py is a script that everyone is familiar with. And when you open pyui

I think you will see a screen like that. This white is the screen that I will make from now on. Use the Size on the right side to make your screen size your favorite!

Place parts on the screen

You can add elements to the screen with the + button on the upper left.

There are various things. I will not explain what each part is here, but I tried to make such a screen using some.

Please refer to the separate article at the end of the article for the explanation of each part! The best way to make a layout is to try it!

Try to run

To run the UI you created, open the py file and run it. The following code is written in the py file from the beginning.

import ui

v = ui.load_view()
v.present('sheet')

First, let's run it as it is.

The app ran on the subscreen! This sub-screen format seems to be iPad only, and when run on iPhone's Pythonista, the app runs in full screen.

in conclusion

Anyway, I was able to make it look and run it! Please refer to the following articles for the continuation as we will continue to make the content more advanced!

Play with the UI implementation of Pythonista [Screen elements] Playing with Pythonista UI implementation [Action implementation] Play with UI implementation of Pythonista3 [Screen transition]

Recommended Posts

Play with the UI implementation of Pythonista3 [Super Super Introduction]
Play with Pythonista UI implementation [Action implementation]
Play around with the pythonista3 ui module
Play with Pythonista UI implementation [Screen elements]
Save the output of GAN one by one ~ With the implementation of GAN by PyTorch ~
Play with the password mechanism of GitHub Webhook and Python
Read the coordinates of the plot on the graph with Python-matplotlib (super beginner)
Implementation of Bulk Update with mongo-go-driver
Play with numerical calculation of magnetohydrodynamics
Introduction and Implementation of JoCoR-Loss (CVPR2020)
Introduction and implementation of activation function
[Introduction to StyleGAN] I played with "The Life of a Man" ♬
Increase the UI size of MyPaint
From the introduction of JUMAN ++ to morphological analysis of Japanese with Python
Implementation of Dijkstra's algorithm with python
[Introduction to Python] How to sort the contents of a list efficiently with list sort
Play the comment of Nico Nico Douga on the terminal in conjunction with the video
[Introduction to Python] What is the method of repeating with the continue statement?
[Introduction to WordCloud] Let's play with scraping ♬
Align the size of the colorbar with matplotlib
Othello-From the tic-tac-toe of "Implementation Deep Learning" (3)
Check the existence of the file with python
Easy introduction of speech recognition with Python
[EDA] Introduction of Sweetviz (comparison with + pandas-profiling)
The importance of Lint as Pythonista thinks
The third night of the loop with for
I read the implementation of golang channel
The second night of the loop with for
Complete everything with Jupyter ~ Introduction of nbdev ~
Read the implementation of ARM global timer
Play with puns using the COTOHA API
Count the number of characters with echo
Othello-From the tic-tac-toe of "Implementation Deep Learning" (2)
[Super Introduction] Machine learning using Python-From environment construction to implementation of simple perceptron-
Let's play with Python Receive and save / display the text of the input form
Deep Learning from scratch The theory and implementation of deep learning learned with Python Chapter 3
[Introduction to Python] How to get the index of data with a for statement
Note: Prepare the environment of CmdStanPy with docker
Crop the image to rounded corners with pythonista
I read the implementation of range (Objects / rangeobject.c)
2016 The University of Tokyo Mathematics Solved with Python
[Note] Export the html of the site with python.
See the behavior of drunkenness with reinforcement learning
Why the Python implementation of ISUCON 5 used Bottle
Increase the font size of the graph with matplotlib
Calculate the total number of combinations with python
Python: Try using the UI on Pythonista 3 on iPad
I wanted to play with the Bezier curve
Check the date of the flag duty with Python
Eliminate the inconveniences of QDock Widget with PySide
Challenge the Tower of Hanoi with recursion + stack
Rewrite the name of the namespaced tag with lxml
Fill the browser with the width of Jupyter Notebook
Implementation of TRIE tree with Python and LOUDS
Introduction to Python with Atom (on the way)
Predict the second round of summer 2016 with scikit-learn
Dump the contents of redis db with lua
Tucker decomposition of the hay process with HOOI
Find out the day of the week with datetime
The basis of graph theory with matplotlib animation
Visualize the behavior of the sorting algorithm with matplotlib