Book Image

Kivy Cookbook

By : Hugo Solis
Book Image

Kivy Cookbook

By: Hugo Solis

Overview of this book

Table of Contents (16 chapters)
Kivy Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Running apps in Mac OS


Now, we want to review some concepts so that we can run our app on the specific OS X platform. We are going to take the app and run it on OS X.

Getting ready

We need an app that can be run. For this purpose, let's use the same app that we used in our previous recipe. Also, it would be useful to read the recipe Running your code in Chapter 1, Kivy and the Kv Language in order to understand how we personalize the running for Microsoft Windows.

How to do it…

We want to know how to run our app from the terminal and how to give it the correct size. To make this possible, let's follow these:

  1. Locate the directory that has the files, e2.py and GOR.mov, something like:

    /Users/Me/Documents/e2app/
    
  2. Open the file e2.py in your favorite editor.

  3. After the import lines, add these lines:

    from kivy.core.window import Window
    Window.system_size=(600,500)
  4. In the terminal, run the app:

    $ kivye2.py
    

How it works…

The third step is where we are stated the size of our app window with the following instruction...