Level 3 Computing Year 2 Lecturer: Phil Smith

Size: px
Start display at page:

Download "Level 3 Computing Year 2 Lecturer: Phil Smith"

Transcription

1 Level 3 Computing Year 2 Lecturer: Phil Smith

2 We looked at: Debugging Previously BTEC Level 3 Year 2 Unit 16 Procedural programming

3 Now Now we will look at: GUI applications. BTEC Level 3 Year 2 Unit 16 Procedural programming

4 What have we done so far Understand key features of procedural programming. Written a procedural program. Know how to debug a procedural program. In other units you have Built a database in Microsoft Access. (Unit 18) Used MySql with Php. (Unit 27) BTEC Level 3 Year 2 Unit 16 Procedural programming

5 Graphical User Interface CONCEPT: A graphical user interface allows the user to interact with the operating system and other programs using graphical elements such as icons, buttons and dialog boxes. A computer s user interface is the part of the computer that the user interacts with. It was in the 1980s that this new type of interface known as a graphical user interface came into use in commercial operating systems. Now we see and use them everywhere. GUI programs are associated with event driven programs. However, we can write a GUI interface in Python.

6 GUI Window Much of the interaction with a GUI is done through dialog boxes, which are small windows that display information and allow the user to perform actions.

7 Important concept Instead of typing commands according to a specified syntax, the user interacts with graphical elements such as icons, buttons, and slider bars etc. In a text based environment, such as a command line interface, programs determine the order in which things happen. In a GUI environment, however, the user determines the order in which things happen.

8 Graphical User Interface Python does not have GUI programming features built into the language itself. CONCEPT: In Python you can use the tkinter module (program library) to create simple GUI programs. There are other third party modules you can download to create GUI s. E.g. Qt designer, wxglade etc We will use tkinter as it is supplied with Python.

9 Graphical User Interface The name tkinter is short for Tk interface. It is named this because it provides a way for Python programmers to use a GUI library named Tk. Many other programming languages use the Tk library as well (including IDLE).

10 Graphical User Interface A GUI program presents a window with various graphical widgets that the user can interact with or view. The tkinter module provides 15 widgets.

11 GUI widgets

12 Graphical User Interface In the.net world these widgets are called controls. We won t cover all of the tkinter widgets, but we will learn how to create simple GUI programs that gather input, display data and respond to events. Note IDLE uses tkinter for its interface so testing our GUI s using IDLE may give unpredictable results. pycharm or Visual studio may be better or another editor of your choice.

13 GUI Window Try this # be careful with the case on the import statement. import tkinter def main(): # Create the main window widget. main_window = tkinter.tk() # Enter the tkinter main loop. tkinter.mainloop() # Call the main function. main() What do you get?

14 GUI Window Result

15 GUI Window Line 3 imports the tkinter module. Inside the main function, line 7 creates an instance of the tkinter module s Tk class, and assigns it to the main_window variable. This object is the root widget, which is the main window in the program. Line 10 calls the tkinter module s mainloop function. This function runs like an infinite loop until you close the main window. This is an event loop.

16 GUI Window CONCEPT: You use the Label widget to display text in a window. To make a Label widget you create an instance of the tkinter module s Label class. Label = tkinter.label(main_window, text= Hello World! )

17 GUI Window add a label 1. from tkinter import * 2. def main(): 3. # Create the main window widget. 4. main_window = Tk() 5. # Create a Label widget containing the 6. # text 'Hello World!' 7. label = Label(main_window, text='hello World!') 8. # Call the Label widget's pack method. 9. label.pack() 10. # Enter the tkinter main loop. 11. mainloop() 12. # Call the main function. 13. main()

18 GUI Window # Call the Label widget's pack method. label.pack() # Enter the tkinter main loop. mainloop() With widgets we need to add (pack) them to the form. So the label.pack statement calls the Label widget s pack method. The pack method determines where a widget should be positioned, and makes the widget visible when the main window is displayed. (You call the pack method for each widget in a window.) The final statement calls the tkinter module s mainloop which displays the program s main window and listens for any form events. This is the event loop.

19 GUI Window So how do we pre define the size of our form? The Place geometry manager allows you explicitly set the position and size of a window, either in absolute terms, or relative to another window. The place manager can be accessed through the place method. It can be applied to all standard widgets. # width x height + x_offset + y_offset: root.geometry("170x ") Notice this is entered as a string.

20 GUI Window Button widgets CONCEPT: You use the Button widget to create a standard button in a window. When the user clicks a button, a specified function or method is called. A Button is a widget that the user can click to cause an action to take place. When you create a Button widget you can specify the text that is to appear on the face of the button, and the name of a callback function. A callback function is a function or method that executes when the user clicks the button.

21 GUI Window Button widgets NOTE: A callback function is also known as an event handler because it handles the event that occurs when the user clicks the button. To add a button my_button = tkinter.button(main_window, \text='click Me!', \ command=do_something) Notice the command=do_something, this is the callback function you will need to write to handle the click event.

22 GUI Window Button widgets For example def do_something(): # Display an info dialog box. tkinter.messagebox.showinfo('response', \ 'Thanks for clicking the button.') When the user clicks the button. The do_something function is called. Here we use a messagebox to display a message on the screen. You may have to add this statement to your program. import tkinter.messagebox

23 Summary What have we learnt What GUI applications are. How GUI applications work. Advantages/disadvantages of GUI compared to command based programs. BTEC Level 3 Year 2 Unit 16 Procedural programming

Mid Unit Review. Of the four learning outcomes for this unit, we have covered the first two. 1.1 LO1 2.1 LO2 LO2

Mid Unit Review. Of the four learning outcomes for this unit, we have covered the first two. 1.1 LO1 2.1 LO2 LO2 Lecture 8 Mid Unit Review Of the four learning outcomes for this unit, we have covered the first two. LO Learning outcome (LO) AC Assessment criteria for pass The learner can: LO1 Understand the principles

More information

Tkinter Part II: Buttons, Lambda & Dynamic Content

Tkinter Part II: Buttons, Lambda & Dynamic Content Tkinter Part II: Buttons, Lambda & Dynamic Content July 8, 2015 Brian A. Malloy Slide 1 of 11 1. We further investigate Labels and Buttons and hook Python actions to these widgets. We present lambda functions,

More information

ENGR/CS 101 CS Session Lecture 15

ENGR/CS 101 CS Session Lecture 15 ENGR/CS 101 CS Session Lecture 15 Log into Windows/ACENET (reboot if in Linux) Use web browser to go to session webpage http://csserver.evansville.edu/~hwang/f14-courses/cs101.html Right-click on lecture15.py

More information

Part 3. Useful Python

Part 3. Useful Python Part 3 Useful Python Parts one and two gave you a good foundation in the Python language and a good understanding of software design. You ve built some substantial applications, and hopefully you ve built

More information

Selected GUI elements:

Selected GUI elements: Selected GUI elements: Element tkinter Class Description Frame Frame Holds other GUI elements Label Label Displays uneditable text or icons Button Button Performs an action when the user activates it Text

More information

Teaching London Computing

Teaching London Computing Teaching London Computing A Level Computer Science Programming GUI in Python William Marsh School of Electronic Engineering and Computer Science Queen Mary University of London How the Session Works Outline

More information

Lecture 3 - Overview. More about functions Operators Very briefly about naming conventions Graphical user interfaces (GUIs)

Lecture 3 - Overview. More about functions Operators Very briefly about naming conventions Graphical user interfaces (GUIs) Lecture 3 - Overview More about functions Operators Very briefly about naming conventions Graphical user interfaces (GUIs) Function parameters Passed by reference, but the standard implication that the

More information

CAS London CPD Day February 16

CAS London CPD Day February 16 Practical Sheet: GUI Programming This sheet is a set of exercises for introducing GUI programming in Python using Tkinter, assuming knowledge of basic Python programming. All materials are at http://www.eecs.qmul.ac.uk/~william/cas-london-2016.html

More information

Interface Builders and Interface Description Languages

Interface Builders and Interface Description Languages Interface Builders and Interface Description Languages Interface Builders (IB) and Interface Description Languages (IDL) enable Drag and Drop construction of GUI's are part of man;y Visual Studio(2013)

More information

Programming Training. This Week: Tkinter for GUI Interfaces. Some examples

Programming Training. This Week: Tkinter for GUI Interfaces. Some examples Programming Training This Week: Tkinter for GUI Interfaces Some examples Tkinter Overview Set of widgets designed by John K. Ousterhout, 1987 Tkinter == Tool Kit Interface Mean to be driven by Tcl (Toolkit

More information

Chapter 9 GUI Programming Using Tkinter. Copyright 2012 by Pearson Education, Inc. All Rights Reserved.

Chapter 9 GUI Programming Using Tkinter. Copyright 2012 by Pearson Education, Inc. All Rights Reserved. Chapter 9 GUI Programming Using Tkinter 1 Motivations Tkinter is not only a useful tool for developing GUI projects, but also a valuable pedagogical tool for learning object-oriented programming. 2 Objectives

More information

This text is used together with Mark Pilgrims book Dive Into Python 3 for the Arthead course Python Fundamentals.

This text is used together with Mark Pilgrims book Dive Into Python 3 for the Arthead course Python Fundamentals. 2 About this text This text is used together with Mark Pilgrims book Dive Into Python 3 for the Arthead course Python Fundamentals. The first part is written for Python 2 and at the end there is a section

More information

CS123. Programming Your Personal Robot. Part 2: Event Driven Behavior

CS123. Programming Your Personal Robot. Part 2: Event Driven Behavior CS123 Programming Your Personal Robot Part 2: Event Driven Behavior You Survived! Smooth Sailing Topics 2.1 Event Driven Programming Programming Paradigms and Paradigm Shift Event Driven Programming Concept

More information

Level 3 Computing Year 2 Lecturer: Phil Smith

Level 3 Computing Year 2 Lecturer: Phil Smith Level 3 Computing Year 2 Lecturer: Phil Smith Introduction This unit aims to enable you to develop the skills and understanding required to design and develop procedural programming applications. Irrespective

More information

Introduction to Programming Using Python Lecture 6. Dr. Zhang COSC 1437 Spring, 2018 March 01, 2018

Introduction to Programming Using Python Lecture 6. Dr. Zhang COSC 1437 Spring, 2018 March 01, 2018 Introduction to Programming Using Python Lecture 6 Dr. Zhang COSC 1437 Spring, 2018 March 01, 2018 Chapter 9 GUI Programming Using Tkinter Getting started with Tkinter with a simple example. Code example:

More information

Sliders. If we start this script, we get a window with a vertical and a horizontal slider:

Sliders. If we start this script, we get a window with a vertical and a horizontal slider: Sliders Introduction A slider is a Tkinter object with which a user can set a value by moving an indicator. Sliders can be vertically or horizontally arranged. A slider is created with the Scale method().

More information

# arrange Label in parent widget

# arrange Label in parent widget Much of today s software uses a point-and-click graphical user interface (GUI). The standard library modules Tkinter and Tix allow for portable, event-driven, GUI development in Python. A Python/Tkinter

More information

CS 112: Intro to Comp Prog

CS 112: Intro to Comp Prog CS 112: Intro to Comp Prog Importing modules Branching Loops Program Planning Arithmetic Program Lab Assignment #2 Upcoming Assignment #1 Solution CODE: # lab1.py # Student Name: John Noname # Assignment:

More information

Level 3 Computing Year 1 Lecturer: Phil Smith

Level 3 Computing Year 1 Lecturer: Phil Smith Level 3 Computing Year 1 Lecturer: Phil Smith Previously.. We looked at forms and controls. The event loop cycle. Triggers. Event handlers. Objectives for today.. 1. To gain knowledge and understanding

More information

Noughts and Crosses. Step 1: Drawing the grid. Introduction

Noughts and Crosses. Step 1: Drawing the grid. Introduction 6 Noughts and Crosses These projects are for use inside the UK only. All Code Clubs must be registered. You can check registered clubs at www.codeclub.org.uk/. This coursework is developed in the open

More information

Level 3 Computing Year 2 Lecturer: Phil Smith

Level 3 Computing Year 2 Lecturer: Phil Smith Level 3 Computing Year 2 Lecturer: Phil Smith Previously We learnt what a computer program does. What a procedural program does. What a procedure is. We had a first look at IDLE. Now Learning Outcomes

More information

PTN-202: Advanced Python Programming Course Description. Course Outline

PTN-202: Advanced Python Programming Course Description. Course Outline PTN-202: Advanced Python Programming Course Description This 4-day course picks up where Python I leaves off, covering some topics in more detail, and adding many new ones, with a focus on enterprise development.

More information

CS 112 Project Assignment: Visual Password

CS 112 Project Assignment: Visual Password CS 112 Project Assignment: Visual Password Instructor: Dan Fleck Overview In this project you will use Python to implement a visual password system. In the industry today there is ongoing research about

More information

CS2021 Week #6. Tkinter structure. GUI Programming using Tkinter

CS2021 Week #6. Tkinter structure. GUI Programming using Tkinter CS2021 Week #6 GUI Programming using Tkinter Tkinter structure Requires integra>on with Tk a GUI library Python program makes widgets and registers func>ons to handle widget events Program consist of theses

More information

Programming Graphical

Programming Graphical Programming Graphical User Interfaces in R Michael F. Lawrence John Verzani CRC Press Taylorfii Francis Group Boca Raton London NewYork CRC Press Is an imprint of the Taylor & Francis Group an informs

More information

Application Note: Creating a Python Graphical User Interface. Matthew Roach March 31 st, 2014

Application Note: Creating a Python Graphical User Interface. Matthew Roach March 31 st, 2014 Application Note: Creating a Python Graphical User Interface Matthew Roach March 31 st, 2014 Abstract: This document contains 2 portions. First, it provides an introduction into phase and the use of phase

More information

Chapter 0 : MVC review / Threading & Concurrency. CSCI 251 Android App Development

Chapter 0 : MVC review / Threading & Concurrency. CSCI 251 Android App Development Chapter 0 : MVC review / Threading & Concurrency CSCI 251 Android App Development Part I: Model / View / Controller Review (courtesy of Prof. Lambert) TUI vs GUI Text-based I/O Sequential process Direct

More information

CIS192 Python Programming

CIS192 Python Programming CIS192 Python Programming Graphical User Interfaces Robert Rand University of Pennsylvania November 19, 2015 Robert Rand (University of Pennsylvania) CIS 192 November 19, 2015 1 / 20 Outline 1 Graphical

More information

Level 3 Computing Year 2 Lecturer: Phil Smith

Level 3 Computing Year 2 Lecturer: Phil Smith Level 3 Computing Year 2 Lecturer: Phil Smith Previously We started to build a GUI program using visual studio 2010 and vb.net. We have a form designed. We have started to write the code to provided the

More information

Outline. general information policies for the final exam

Outline. general information policies for the final exam Outline 1 final exam on Tuesday 5 May 2015, at 8AM, in BSB 337 general information policies for the final exam 2 some example questions strings, lists, dictionaries scope of variables in functions working

More information

Level 3 Computing Year 2 Lecturer: Phil Smith

Level 3 Computing Year 2 Lecturer: Phil Smith Level 3 Computing Year 2 Lecturer: Phil Smith We looked at: Previously Reading and writing files. BTEC Level 3 Year 2 Unit 16 Procedural programming Now Now we will look at: Appending data to existing

More information

Lecture 3 - Overview. Object-oriented programming and classes Operators Very briefly about naming conventions Graphical user interfaces (GUIs)

Lecture 3 - Overview. Object-oriented programming and classes Operators Very briefly about naming conventions Graphical user interfaces (GUIs) Lecture 3 - Overview Object-oriented programming and classes Operators Very briefly about naming conventions Graphical user interfaces (GUIs) Object-oriented philosophy Object = Data + Algorithm An object

More information

Tkinter: Input and Output Bindings. Marquette University

Tkinter: Input and Output Bindings. Marquette University Tkinter: Input and Output Bindings Marquette University Tkinter Variables Tkinter contains a useful mechanism to connect widgets to variables This allows us to have variables change when widgets do and

More information

CSE : Python Programming

CSE : Python Programming CSE 399-004: Python Programming Lecture 08: Graphical User Interfaces with wxpython March 12, 2005 http://www.seas.upenn.edu/~cse39904/ Plan for today and next time Today: wxpython (part 1) Aside: Arguments

More information

User Manual of VeryDOC Advanced PDF Tools User Handbook

User Manual of VeryDOC Advanced PDF Tools User Handbook User Manual of VeryDOC Advanced PDF Tools User Handbook VeryDOC 2/2/2013 Contents User Manual of VeryDOC Advanced PDF Tools... 0 Introduction... 2 Operating System... 2 How to add PDF files... 2 How to

More information

CMS and e-commerce Solutions. version 1.0. Please, visit us at: or contact directly by

CMS and e-commerce Solutions. version 1.0. Please, visit us at:   or contact directly by Homepage Content Slider for Magento User Guide version 1.0 created by IToris IToris Table of contents 1. Introduction... 3 1.1. Purpose... 3 2. Installation and License... 3 2.1. System Requirements...

More information

Introduction To Python

Introduction To Python Introduction To Python Week 8: Program Dev: Graphical Game of Life Dr. Jim Lupo Asst Dir Computational Enablement LSU Center for Computation & Technology 16 Jul 2015, Page 1 of 27 Intro To Tkinter Tcl/Tk

More information

User Interaction. User Interaction. Input devices. Input devices. Input devices GUIs and GUI design Event-driven programming 3D interaction

User Interaction. User Interaction. Input devices. Input devices. Input devices GUIs and GUI design Event-driven programming 3D interaction User Interaction User Interaction Input devices GUIs and GUI design Event-driven programming 3D interaction CS 465 lecture 19 2003 Steve Marschner 1 2003 Steve Marschner 2 Input devices Input devices Discrete

More information

PYTHON TRAINING COURSE CONTENT

PYTHON TRAINING COURSE CONTENT SECTION 1: INTRODUCTION What s python? Why do people use python? Some quotable quotes A python history lesson Advocacy news What s python good for? What s python not good for? The compulsory features list

More information

Event-driven Programming: GUIs

Event-driven Programming: GUIs Dr. Sarah Abraham University of Texas at Austin Computer Science Department Event-driven Programming: GUIs Elements of Graphics CS324e Spring 2018 Event-driven Programming Programming model where code

More information

MFC One Step At A Time By: Brandon Fogerty

MFC One Step At A Time By: Brandon Fogerty MFC One Step At A Time 1 By: Brandon Fogerty Development Environment 2 Operating System: Windows XP/NT Development Studio: Microsoft.Net Visual C++ 2005 Step 1: 3 Fire up Visual Studio. Then go to File->New->Project

More information

About 1. Chapter 1: Getting started with pyqt5 2. Remarks 2. Examples 2. Installation or Setup 2. Hello World Example 6. Adding an application icon 8

About 1. Chapter 1: Getting started with pyqt5 2. Remarks 2. Examples 2. Installation or Setup 2. Hello World Example 6. Adding an application icon 8 pyqt5 #pyqt5 Table of Contents About 1 Chapter 1: Getting started with pyqt5 2 Remarks 2 Examples 2 Installation or Setup 2 Hello World Example 6 Adding an application icon 8 Showing a tooltip 10 Package

More information

Getting started 7. Setting properties 23

Getting started 7. Setting properties 23 Contents 1 2 3 Getting started 7 Introduction 8 Installing Visual Basic 10 Exploring the IDE 12 Starting a new project 14 Adding a visual control 16 Adding functional code 18 Saving projects 20 Reopening

More information

CIS192 Python Programming

CIS192 Python Programming CIS192 Python Programming User Interfaces (Graphical and Text) Eric Kutschera University of Pennsylvania March 20, 2015 Eric Kutschera (University of Pennsylvania) CIS 192 March 20, 2015 1 / 23 Final Project

More information

Tcl/Tk lecture. What is the Wish Interpreter? CIS 410/510 User Interface Programming

Tcl/Tk lecture. What is the Wish Interpreter? CIS 410/510 User Interface Programming Tcl/Tk lecture CIS 410/510 User Interface Programming Tool Command Language TCL Scripting language for developing & using GUIs Allows generic programming variables, loops, procedures Embeddable into an

More information

Object-Oriented Programming

Object-Oriented Programming iuliana@cs.ubbcluj.ro Babes-Bolyai University 2018 1 / 33 Overview 1 2 3 4 5 6 2 / 33 I Qt is a cross-platform application and UI framework in C++. Using Qt, one can write GUI applications once and deploy

More information

Graphical user interface software

Graphical user interface software Graphical user interface software what the user sees and uses examples of GUI-building systems HTML, CSS, Javascript (jquery, Dojo, YUI, XUL,...) Flash, Silverlight,... X Window system, GTk Tcl/Tk, with

More information

Delegating Access & Managing Another Person s Mail/Calendar with Outlook. Information Technology

Delegating Access & Managing Another Person s Mail/Calendar with Outlook. Information Technology Delegating Access & Managing Another Person s Mail/Calendar with Outlook Information Technology 1. Click the File tab 2. Click Account Settings, and then click Delegate Access 3. Click Add 4. Type the

More information

CS 2316 Exam 3 Summer 2014

CS 2316 Exam 3 Summer 2014 CS 2316 Exam 3 Summer 2014 Name : Grading TA: Integrity: By taking this exam, you pledge that this is your work and you have neither given nor received inappropriate help during the taking of this exam

More information

Thinking in Tkinter. Thinking in Tkinter. by Stephen Ferg ferg.org) revised:

Thinking in Tkinter. Thinking in Tkinter. by Stephen Ferg ferg.org) revised: 1 of 53 Thinking in Tkinter by Stephen Ferg (steve@ ferg.org) revised: 2005-07-17 This file contains the source code for all of the files in the Thinking in Tkinter series. If you print this file with

More information

Part I. Integrated Development Environment. Chapter 2: The Solution Explorer, Toolbox, and Properties. Chapter 3: Options and Customizations

Part I. Integrated Development Environment. Chapter 2: The Solution Explorer, Toolbox, and Properties. Chapter 3: Options and Customizations Part I Integrated Development Environment Chapter 1: A Quick Tour Chapter 2: The Solution Explorer, Toolbox, and Properties Chapter 3: Options and Customizations Chapter 4: Workspace Control Chapter 5:

More information

User Interfaces. getting arguments of the command line a command line interface to store points fitting points with polyfit of numpy

User Interfaces. getting arguments of the command line a command line interface to store points fitting points with polyfit of numpy User Interfaces 1 Command Line Interfaces getting arguments of the command line a command line interface to store points fitting points with polyfit of numpy 2 Encapsulation by Object Oriented Programming

More information

Skill Area 336 Explain Essential Programming Concept. Programming Language 2 (PL2)

Skill Area 336 Explain Essential Programming Concept. Programming Language 2 (PL2) Skill Area 336 Explain Essential Programming Concept Programming Language 2 (PL2) 336.1-Examine Basic Language Environment 336.1.1 Describe the basic operating environment of the language 336.1.2 Define

More information

A GUI for DFT and Orthogonal DWT in Tkinter

A GUI for DFT and Orthogonal DWT in Tkinter A GUI for DFT and Orthogonal DWT in Tkinter Tariq Javid Ali, Pervez Akhtar, Muhammad Faris Hamdard Institute of Engineering & Technology Hamdard University Karachi-74600, Pakistan Email: {tariq.javid pervez.akhtar

More information

UNIT 10A Visualizing Data: Graphics in Python. Drawing using Python. We will be using Python's interface to Tcl/Tk, a cross-plaoorm graphics library.

UNIT 10A Visualizing Data: Graphics in Python. Drawing using Python. We will be using Python's interface to Tcl/Tk, a cross-plaoorm graphics library. UNIT 10A Visualizing Data: Graphics in Python 1 Drawing using Python We will be using Python's interface to Tcl/Tk, a cross-plaoorm graphics library. To use this, you should be logged in directly into

More information

Review: Event Driven Programming & GUI. CSCE155N Matlab Fall 2016

Review: Event Driven Programming & GUI. CSCE155N Matlab Fall 2016 Review: Event Driven Programming & GUI CSCE155N Matlab Fall 2016 1. Which of the following is not true about event-driven programming? A. An event source is a GUI component that could generate an event

More information

Introduction To Python Programming And Developing GUI Applications With PyQT By B. M. Harwani

Introduction To Python Programming And Developing GUI Applications With PyQT By B. M. Harwani Introduction To Python Programming And Developing GUI Applications With PyQT By B. M. Harwani Share And Download IT Ebook. Find By Tags: gui - "Introduction to Python Programming and Developing GUI Applications

More information

CS 2316 Exam 3 Fall 2011

CS 2316 Exam 3 Fall 2011 CS 2316 Exam 3 Fall 2011 Name : 1. (2 points) Grading TA: Integrity: By taking this exam, you pledge that this is your work and you have neither given nor received inappropriate help during the taking

More information

Visual Basic Program Coding STEP 2

Visual Basic Program Coding STEP 2 Visual Basic Program Coding 129 STEP 2 Click the Start Debugging button on the Standard toolbar. The program is compiled and saved, and then is run on the computer. When the program runs, the Hotel Room

More information

Python Scripting for Computational Science

Python Scripting for Computational Science Hans Petter Langtangen Python Scripting for Computational Science Third Edition With 62 Figures 43 Springer Table of Contents 1 Introduction... 1 1.1 Scripting versus Traditional Programming... 1 1.1.1

More information

Hello Button. An Introduction to Tcl/Tk

Hello Button. An Introduction to Tcl/Tk Hello Button An Introduction to Tcl/Tk Peter D. Hiscocks, James Gaston Syscomp Electronic Design Limited www.syscompdesign.com phiscock@ee.ryerson.ca May 16, 2006 Revised April 28, 2007 Abstract This paper

More information

Python GUIs. $ conda install pyqt

Python GUIs. $ conda install pyqt PyQT GUIs 1 / 18 Python GUIs Python wasn t originally desined for GUI programming In the interest of "including batteries" the tkinter was included in the Python standard library tkinter is a Python wrapper

More information

CSCA08 Winter 2018 Week 2: Variables & Functions. Marzieh Ahmadzadeh, Brian Harrington University of Toronto Scarborough

CSCA08 Winter 2018 Week 2: Variables & Functions. Marzieh Ahmadzadeh, Brian Harrington University of Toronto Scarborough CSCA08 Winter 2018 Week 2: Variables & Functions Marzieh Ahmadzadeh, Brian Harrington University of Toronto Scarborough Administrative Detail Tutorials and practicals start this week Inverted lecture starts

More information

Lecture 9: GUI and debugging

Lecture 9: GUI and debugging Lecture 9: GUI and debugging Introduction for Linguists (LT2102) Markus Forsberg Språkbanken University of Gothenburg October 12, 2010 Assignment 2 I have now corrected all assignments. If you have not

More information

Fundamentals of Programming. Functions Redux. Event-based Programming. File and Web IO. November 4th, 2014

Fundamentals of Programming. Functions Redux. Event-based Programming. File and Web IO. November 4th, 2014 15-112 Fundamentals of Programming Functions Redux. Event-based Programming. File and Web IO. November 4th, 2014 Today Briefly show file and web IO. Revisit functions. Learn a bit more about them. Event-based

More information

CS 112: Intro to Comp Prog

CS 112: Intro to Comp Prog CS 112: Intro to Comp Prog Tkinter Layout Managers: place, pack, grid Custom Frames Widgets In-depth StringVar tkfont Upcoming Tk To use Tkinter Widgets (components: buttons, labels, etc). You must import

More information

Skill Area 336 Explain Essential Programming Concept. Programming Language 2 (PL2)

Skill Area 336 Explain Essential Programming Concept. Programming Language 2 (PL2) Skill Area 336 Explain Essential Programming Concept Programming Language 2 (PL2) 336.2-Apply Basic Program Development Techniques 336.2.1 Identify language components for program development 336.2.2 Use

More information

Learning outcomes. COMPSCI 101 Principles of Programming. Drawing 2D shapes using Characters. Printing a Row of characters

Learning outcomes. COMPSCI 101 Principles of Programming. Drawing 2D shapes using Characters. Printing a Row of characters Learning outcomes At the end of this lecture, students should be able to draw 2D shapes using characters draw 2D shapes on a Canvas COMPSCI 101 Principles of Programming Lecture 25 - Using the Canvas widget

More information

Graphical User Interfaces

Graphical User Interfaces Graphical User Interfaces 1 User Interfaces GUIs in Python with Tkinter object oriented GUI programming 2 Mixing Colors specification of the GUI the widget Scale 3 Simulating a Bouncing Ball layout of

More information

CS 2316 Exam 3 Spring 2013

CS 2316 Exam 3 Spring 2013 CS 2316 Exam 3 Spring 2013 Name : Grading TA: Integrity: By taking this exam, you pledge that this is your work and you have neither given nor received inappropriate help during the taking of this exam

More information

Lecture 3. Program Development. Computer Science, CMU Introduction to Computer 1

Lecture 3. Program Development. Computer Science, CMU Introduction to Computer 1 Lecture 3 Program Development 204101 Introduction to Computer 1 Outline Program Development Cycle 1. Problem Analyses 2. Program Design 3. Coding 4. Debugging 5. (Input) Validation 6. Documentation 7.

More information

CSE 101 Introduction to Computers Development / Tutorial / Lab Environment Setup

CSE 101 Introduction to Computers Development / Tutorial / Lab Environment Setup CSE 101 Introduction to Computers Development / Tutorial / Lab Environment Setup Purpose: The purpose of this lab is to setup software that you will be using throughout the term for learning about Python

More information

Python Scripting for Computational Science

Python Scripting for Computational Science Hans Petter Langtangen Python Scripting for Computational Science Third Edition With 62 Figures Sprin ger Table of Contents 1 Introduction 1 1.1 Scripting versus Traditional Programming 1 1.1.1 Why Scripting

More information

CS 2316 Individual Homework 5 Joint Probability Out of 100 points

CS 2316 Individual Homework 5 Joint Probability Out of 100 points CS 2316 Individual Homework 5 Joint Probability Out of 100 points Files to submit: 1. HW5.py This is an INDIVIDUAL Assignment: Collaboration at a reasonable level will not result in substantially similar

More information

Week 8 Lecture: Getting Things Done

Week 8 Lecture: Getting Things Done Week 8 Lecture: Input and Output, and Moving to Getting Things Done Introduction to Programming for GIS & Remote Sensing GEO6938-4172 GEO4938-4166 4166 Where We Are To this point we ve covered: Basics

More information

Creating a basic GUI application with Synergy and GUIX SK-S7G2

Creating a basic GUI application with Synergy and GUIX SK-S7G2 Creating a basic GUI application with Synergy and GUIX SK-S7G2 LAB PROCEDURE Description: The objective of this lab session is to detail the process of creating an embedded graphics user interface, starting

More information

Visual Studio.NET.NET Framework. Web Services Web Forms Windows Forms. Data and XML classes. Framework Base Classes. Common Language Runtime

Visual Studio.NET.NET Framework. Web Services Web Forms Windows Forms. Data and XML classes. Framework Base Classes. Common Language Runtime Intro C# Intro C# 1 Microsoft's.NET platform and Framework.NET Enterprise Servers Visual Studio.NET.NET Framework.NET Building Block Services Operating system on servers, desktop, and devices Web Services

More information

TYPES OF INTERACTORS Prasun Dewan Department of Computer Science University of North Carolina at Chapel Hill

TYPES OF INTERACTORS Prasun Dewan Department of Computer Science University of North Carolina at Chapel Hill TYPES OF INTERACTORS Prasun Dewan Department of Computer Science University of North Carolina at Chapel Hill dewan@cs.unc.edu Code available at: https://github.com/pdewan/colabteaching PRE-REQUISITES Model-

More information

User Interfaces. MCS 507 Lecture 11 Mathematical, Statistical and Scientific Software Jan Verschelde, 16 September Command Line Interfaces

User Interfaces. MCS 507 Lecture 11 Mathematical, Statistical and Scientific Software Jan Verschelde, 16 September Command Line Interfaces User 1 2 MCS 507 Lecture 11 Mathematical, Statistical and Scientific Software Jan Verschelde, 16 September 2011 User 1 2 command line interfaces Many programs run without dialogue with user, as $ executable

More information

Communicating with the BOE-BOT

Communicating with the BOE-BOT ME 1030 Name: Due date: Introduction to Mechanical Engineering BOE BOT Collected Assignment #1 Communicating with the BOE-BOT Reading Assignment: 1. Refer to the following sections in the BOE BOT Textbook

More information

Tutorial - Hello World

Tutorial - Hello World Tutorial - Hello World Spirit Du Ver. 1.1, 25 th September, 2007 Ver. 2.0, 7 th September, 2008 Ver. 2.1, 15 th September, 2014 Contents About This Document... 1 A Hello Message Box... 2 A Hello World

More information

SD Get More from 3ds Max with Custom Tool Development

SD Get More from 3ds Max with Custom Tool Development SD21033 - Get More from 3ds Max with Custom Tool Development Kevin Vandecar Forge Developer Advocate @kevinvandecar Join the conversation #AU2016 bio: Kevin Vandecar Based in Manchester, New Hampshire,

More information

Easy Graphical User Interfaces

Easy Graphical User Interfaces Easy Graphical User Interfaces with breezypythongui Types of User Interfaces GUI (graphical user interface) TUI (terminal-based user interface) UI Inputs Outputs Computation Terminal-Based User Interface

More information

Widgets. Widgets Widget Toolkits. User Interface Widget

Widgets. Widgets Widget Toolkits. User Interface Widget Widgets Widgets Widget Toolkits 2.3 Widgets 1 User Interface Widget Widget is a generic name for parts of an interface that have their own behavior: buttons, drop-down menus, spinners, file dialog boxes,

More information

LECTURE 1. Getting Started with Python

LECTURE 1. Getting Started with Python LECTURE 1 Getting Started with Python ABOUT PYTHON Development started in the 1980 s by Guido van Rossum. Only became popular in the last decade or so. Python 2.x currently dominates, but Python 3.x is

More information

Learning VB.Net. Tutorial 17 Classes

Learning VB.Net. Tutorial 17 Classes Learning VB.Net Tutorial 17 Classes Hello everyone welcome to vb.net tutorials. These are going to be very basic tutorials about using the language to create simple applications, hope you enjoy it. If

More information

Tutorial Php Coding Projects Pdf Beginners With Examples

Tutorial Php Coding Projects Pdf Beginners With Examples Tutorial Php Coding Projects Pdf Beginners With Examples Learning PHP Basic With project 2015 part 1,Beginner PHP Tutorial This is an php. Programming Tutorials. SubscribeSubscribed php tutorial for beginners

More information

CS-Studio Display Builder

CS-Studio Display Builder CS-Studio Display Builder Tutorial presented: Spring 2017 EPICS Collaboration Meeting at KURRI, Osaka, Japan Megan Grodowitz, Kay Kasemir (kasemir@ornl.gov) Overview Display Builder replaces OPI Builder

More information

CS415 Human Computer Interaction

CS415 Human Computer Interaction CS415 Human Computer Interaction Lecture 3 WIMP HCI (GUI Builders Part-2) September 7, 2018 Sam Siewert Recall - GUI Layout & Code-Gen or VHLLs for GUI Build Method #1 Compiled Programming Language (e.g.

More information

CS 354R: Computer Game Technology

CS 354R: Computer Game Technology CS 354R: Computer Game Technology GUI Programming Fall 2017 Graphical User Interfaces 2 What Is in a GUI? Not just art assets! GUIs display important information for the player: Character status Enemy

More information

A QUICK GUIDE TO PROGRAMMING FOR THE WEB. ssh (then type your UBIT password when prompted)

A QUICK GUIDE TO PROGRAMMING FOR THE WEB. ssh (then type your UBIT password when prompted) A QUICK GUIDE TO PROGRAMMING FOR THE WEB TO GET ACCESS TO THE SERVER: ssh Secure- Shell. A command- line program that allows you to log in to a server and access your files there as you would on your own

More information

Introduction to Programming

Introduction to Programming Introduction to Programming Python Lab 3: Arithmetic PythonLab3 lecture slides.ppt 16 October 2018 Ping Brennan (p.brennan@bbk.ac.uk) 1 Getting Started Create a new folder in your disk space with the name

More information

Extending ArcGIS Maps for SharePoint. Quan Tang Scott Ball

Extending ArcGIS Maps for SharePoint. Quan Tang Scott Ball Extending ArcGIS Maps for SharePoint Quan Tang Scott Ball Agenda Extending ArcGIS Maps for SharePoint ArcGIS platform overview ArcGIS + SharePoint = Better together ArcGIS Maps for SharePoint overview

More information

Pmv s Architecture and How to write new commands

Pmv s Architecture and How to write new commands Pmv s Architecture and How to write new commands Simple version: (no Arguments) Advanced version Michel Sanner ViewerFramework The ViewerFramework package is a boilerplate Visualization application Numeric

More information

Click File on the menu bar to view the individual menu items and their associated icons on the File menu.

Click File on the menu bar to view the individual menu items and their associated icons on the File menu. User Interface Design 387 STEP 3 Click File on the menu bar to view the individual menu items and their associated icons on the File menu. The standard File menu items (New, Open, Save, Save As, Print,

More information

Acknowledgments...xvii. Introduction... Chapter 1: Getting Started Chapter 2: Build a Hi-Lo Guessing Game App!... 19

Acknowledgments...xvii. Introduction... Chapter 1: Getting Started Chapter 2: Build a Hi-Lo Guessing Game App!... 19 Brief Contents Acknowledgments...xvii Introduction... xix Chapter 1: Getting Started... 1 Chapter 2: Build a Hi-Lo Guessing Game App!... 19 Chapter 3: Creating a GUI for Our Guessing Game... 43 Chapter

More information

Al al-bayt University Prince Hussein Bin Abdullah College for Information Technology Computer Science Department

Al al-bayt University Prince Hussein Bin Abdullah College for Information Technology Computer Science Department Al al-bayt University Prince Hussein Bin Abdullah College for Information Technology Computer Science Department 0901212 Python Programming 1 st Semester 2014/2015 Course Catalog This course introduces

More information

Introduction to Programming

Introduction to Programming Introduction to Programming Python Lab 3: Arithmetic PythonLab3 lecture slides.ppt 26 January 2018 Ping Brennan (p.brennan@bbk.ac.uk) 1 Getting Started Create a new folder in your disk space with the name

More information

Developing for Mobile Devices Lab (Part 1 of 2)

Developing for Mobile Devices Lab (Part 1 of 2) Developing for Mobile Devices Lab (Part 1 of 2) Overview Through these two lab sessions you will learn how to create mobile applications for Windows Mobile phones and PDAs. As developing for Windows Mobile

More information

CSC207H: Software Design Lecture 11

CSC207H: Software Design Lecture 11 CSC207H: Software Design Lecture 11 Wael Aboelsaadat wael@cs.toronto.edu http://ccnet.utoronto.ca/20075/csc207h1y/ Office: BA 4261 Office hours: R 5-7 Acknowledgement: These slides are based on material

More information