I’d heard plenty of great things about the project for Python over the past year. Python certainly doesn’t come to mind when you think about mobile app development, but it is a language and the tools exist to compile/convert it into native code on iOS, Android and Windows. BeeWare In this tutorial I will show how to build a basic TV remote for the Panasonic Viera TVs on iPhone. Requirements for iOS Xcode (and therefore a mac), or you can follow this tutorial for Android and at the end I’ll point out some differences Python 3.5, although this would work on earlier versions A Panasonic Viera TV, connected to the network Creating the project Creating a test project is straightforward, we download a package called , make a new folder for our project and then within that creating a folder called with the files and inside. can be empty, is our entry point so at a minimum we need the boiler plate code below briefcase pip install briefcase mkdir tv_remote Remote __init__.py app.py __init__.py app.py Also create a file with some information on the package. This is where we describe to briefcase which platforms we want to build for. Also, very importantly we can specify the packages that this app will need. Our’s need the toga UI library and also a Python library for controlling the TV called PyViera. setup.py pip Once all that is done, your directory should look like this. Your directory should look like this. Now you can run (from within directory) a command to download all the packages and components and build an xcode project tv_remote python setup.py ios After a few minutes you’ll get an iOS subdirectory and an xcodeproj directory which you can open from XCode. Going into XCode and building that project, it will start up the iPhone simulator and we have our working Hello World application. You’ll see in the bottom right a console window where you can send debug info for your app. Nice! That was insanely easy. Making our TV Remote Our second prototype, we’re going to add button to change the channel, nothing complicated, just for the number 5. Rebuilding that app and launching it, once the discover TVs method operates, it’ll ask for network permissions so we know it’s working correctly. You’ll need to turn the TV on first, then try pressing that number 5! Building out the buttons Now working through a full example, we want to understand the layout model for Toga. Within Toga you can apply CSS styles for margin, padding, box layout and justification. In this more detailed example we can see creating 5 rows of buttons and aligning them to draw a remote Go ahead and build the project (making sure you’re editing app.py within the xcode project, not the original directory) and voila! A working TV remote. The “aha” moment This isn’t about not having to learn Swift or Objective-C, Python is an ecosystem not just a language. Using this pattern, you can take any of the 90,000+ packages on PyPi and turn them into simple mobile apps. What about Android? Going back over those steps, simply adjust setup.py to have the ‘android’ platform and run and briefcase will build out an Android project for you. python setup.py android