Presentation is loading. Please wait.

Presentation is loading. Please wait.

CISC101 Reminders Last lecture!  Grading of Quiz 4 underway.

Similar presentations


Presentation on theme: "CISC101 Reminders Last lecture!  Grading of Quiz 4 underway."— Presentation transcript:

1 CISC101 Reminders Last lecture!  Grading of Quiz 4 underway.
Winter 2018 CISC101 9/17/2018 CISC101 Reminders Last lecture!  Grading of Quiz 4 underway. Last assignment due tomorrow. We have covered everything you need to know for the assignment. Winter 2018 CISC101 - Prof. McLeod Prof. Alan McLeod

2 Today GUI Construction With tkinter, Cont.:
Radiobutton and Canvas Widgets. Bears Demo. More Python tools and modules. Winter 2018 CISC101 - Prof. McLeod

3 Radiobutton Widget See Window14.py
Each Radiobutton is bound to the same variable as well as triggering the same function. You can only choose one Radiobutton at a time. Winter 2018 CISC101 - Prof. McLeod

4 The Canvas Widget You can use this widget to display any drawn shapes, or images, or even a turtle drawing. The canvas can be interactive, allowing the cursor to draw or edit an image. See: Window15.py (drawn shapes) Window15A.py (an image) Window16.py (cursor drawing) Window17.py (turtle drawing!) Winter 2018 CISC101 - Prof. McLeod

5 An Advanced Demo: BearsDBV2.py
Allows viewing and editing of the bears database, one record at a time. (Based on Exercise 9.) Entry Widgets, Buttons, Labels, a Frame, and a LabelFrame. Control Variables. Binding of control variables and handlers (functions). No more globals! Handler functions have been declared inside main! Button navigation. Store and display images in a Canvas widget. Use of a filedialog to obtain an image file. Use of an errordialog to provide a file not found message. Winter 2018 CISC101 - Prof. McLeod

6 Building a Game? Pygame is not a bad place to start.
You can build decent looking arcade-style games fairly easily. (Python might not be the best choice of a platform for more complex or demanding games…) See Pygame was lagging behind Python versions, but developers have recently caught up. Winter 2018 CISC101 - Prof. McLeod

7 Other GUI Tools Lots! IDE and different Widget sets.
See WxWidgets, for example. Start by looking at: WxPython: Or see gui2py: Winter 2018 CISC101 - Prof. McLeod

8 Other IDEs IDLE is pretty simple and a good place to start learning Python. But, it can be frustrating after a while if you are used to more sophisticated IDEs: Poor intellisense and code completion. No debugger. No line numbering! No code wizards, project browsers, etc. “Multi-Lingual” IDEs like Visual Studio (uses “PTVS”), Eclipse (uses PyDev) and Qt can be configured to help write Python programs. Winter 2018 CISC101 - Prof. McLeod

9 Other IDEs, Cont. PyCharm: http://www.jetbrains.com/pycharm/
Works on Windows, Mac and Linux. Winter 2018 CISC101 - Prof. McLeod

10 https://pypi.python.org/pypi
Other Modules Lots! See the Python Package Index at: Or, try out the Beta version of a jazzed-up index: Winter 2018 CISC101 - Prof. McLeod

11 For Example: Enthought Canopy
A collection of many packages from many sources – targeted towards data analysis, modeling and visualization. Like Matlab, but based on Python and all code is open, not proprietary. Now available for Python version 3.5. Free for academic use! Winter 2018 CISC101 - Prof. McLeod

12 Anaconda https://www.anaconda.com/download/
Comes with scientific packages included. Free for academic use. Available for Python 3.6. Both Canopy and Anaconda will work with Windows, Mac and Linux. Winter 2018 CISC101 - Prof. McLeod

13 Scientific Python IDE Pyzo. See: http://www.pyzo.org/
Noted for its web-based, simple interface. Uses the Qt IDE for GUI development. Winter 2018 CISC101 - Prof. McLeod

14 Python vs Matlab See: http://www.pyzo.org/python_vs_matlab.html And:
Winter 2018 CISC101 - Prof. McLeod

15 From: Winter 2018 CISC101 - Prof. McLeod


Download ppt "CISC101 Reminders Last lecture!  Grading of Quiz 4 underway."

Similar presentations


Ads by Google