1 of 27

Hello, Pythonista! Do you know “Pythonista”?

(ja)

Mitsuki Sugiya (@equal_001)

2 of 27

Who are you?

  • Mitsuki Sugiya
  • I’m a motorcycle rider (Honda FTR223) !
  • @equal_001

  • Be Proud Inc.
  • web applications engineer

3 of 27

Please access https://pyq.jp/ and Be Proud booth !

4 of 27

What is “Pythonista” ?

5 of 27

6 of 27

http://omz-software.com/pythonista/

7 of 27

Let’s Pythonista!

8 of 27

Pythonista features

  • You can write all scripts in Python
  • Standard Python-console in Pythonsta
  • Powerful Debugger
  • Includes Standard Library, Site-Packages, Third-party modules
    • bs4, requests, feedperser, bottle...
  • Provide access to social app or other service
    • Twitter, Dropbox, Evernote…
  • Variety of UI conponent to operate the iOS native GUI
  • Possible use of Sensora and Geo-location

9 of 27

Console

  • Pythonista has a standard python-console
  • Defalut is Python3, but you can change Python2

10 of 27

Powerful Debugger

  • Pythonista gives many infomation that enginners want:
    • Traceback
    • When error occurred in view
    • Show where the error has occrred in your script

  • Set breakpoint and easy debug

11 of 27

How to create an Application

12 of 27

Examples

13 of 27

Create a View

14 of 27

ui module

  • ui module provides components for building “native” graphical user interfaces on iOS

  • button, textfield, table, webview, image...

15 of 27

Create a View

  • Minimal app has xxx.py and xxx.pyui
  • xxx.pyui -> The definition of a GUI conponents

xxx.pyui

xxx.py

Call xxx.pyui file

and

load ui classes

Define the GUI

EX)

・ui.View()

・ui.Button()

・ui.TableView()

Define action of GUI

EX)

ui.Button.action =

self.insert_action()

Give ui classes

16 of 27

Create a GUI

17 of 27

Create an GUI

  • Managed by xxx.pyui

  • You can freely arrange the GUI components by only one finger

  • Actions such as “pressing a button” is controled by function of the Python

18 of 27

Action method

Sample:

FoodList.py

FoodList.pyui

19 of 27

20 of 27

Demo and Code Reading

21 of 27

I’m enjoying mealtime everyday ;)

22 of 27

Other modules

  • motion - Motion Sensor Data on iOS
  • location - Geo-Location Services on iOS
  • canvas - Vector Graphics
  • dialogs - Easy-to-use UI Dialogs
  • notification - Notifications on iOS

:

many!

23 of 27

Put application in Homescreen easily

  • You can put your application in homescreen

  • Easily and quickly, you can start apprication!

24 of 27

Create a comfy develovment environment

stash

  • https://github.com/ywangd/stash
  • You can use a Bash-like shell.
  • Execute “man” in shell. All commands are listed.
  • git, pip, http/ftpserver, ... and so on.

All commands made by Python. So if you want to use other command, make python script!

25 of 27

Create a comfy develovment environment

Pythonista Tools

26 of 27

Pythonista-Community

community forum

slack-team

27 of 27

Have a nice Pythonista life :)

@equal_001

>