Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Python Geospatial Development Essentials

You're reading from   Python Geospatial Development Essentials Utilize Python with open source libraries to build a lightweight, portable, and customizable GIS desktop application

Arrow left icon
Product type Paperback
Published in Jun 2015
Publisher
ISBN-13 9781782175407
Length 192 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Karim Bahgat Karim Bahgat
Author Profile Icon Karim Bahgat
Karim Bahgat
Arrow right icon
View More author details
Toc

Setting up the GUI package


We begin the chapter by setting up the structural skeleton for our application GUI. This should be logically separate from the rest of our code so we give it a subpackage of its own. Inside the top level pythongis folder, create a package folder called app with an __init__.py file inside it. Have it import the rest of the modules we will be creating:

from . import builder
from . import dialogues
from . import toolkit
from . import icons 

To make our app package accessible from our top level pythongis package, we similarly need to import it in pythongis/__init__.py as follows:

from . import app

The purpose of the app package is that we should be able to define how our GUI looks and behaves, and with a single line of code, pythongis.app.run(), we should be able to invoke it. The actual definition and layout of our GUI should be contained in a module we call app/builder.py (which we return to at the end of the chapter). The builder in turn relies on a set of predefined...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image