Home
Browse
Create
Search
Log in
Sign up
Upgrade to remove ads
Only $2.99/month
compro final exam
STUDY
Flashcards
Learn
Write
Spell
Test
PLAY
Match
Gravity
Terms in this set (58)
Tkinter
Python interface to the Tk GUI toolkit shipped with Python.
wxPython
This is an open-source Python interface for wxWindows.
JPython
Python port for Java which gives Python scripts seamless access to Java class libraries on the local machine.
Tkinter
standard GUI library for Python.
1. Import the Tkinter module.
2. Create the GUI application main window.
3. Add one or more of the above-mentioned widgets to the GUI application.
4. Enter the main event loop to take action against each event triggered by the user.
Steps in creating a GUI application using Tkinter
Tkinter Widgets
provides various controls, such as buttons, labels and text boxes used in a GUI application.
Button
used to display buttons in your application.
Canvas
used to draw shapes, such as lines, ovals, polygons and rectangles, in your application.
Checkbutton
used to display a number of options as checkboxes. The user can select multiple options at a time.
Entry
used to display a single-line text field for accepting values from a user.
Frame
used as a container widget to organize other widgets.
Label
used to provide a single-line caption for other widgets. It can also contain images.
Listbox
used to provide a list of options to a user.
Menubutton
used to display menus in your application.
Menu
used to provide various commands to a user. These commands are contained inside Menubutton.
Message
used to display multiline text fields for accepting values from a user.
Radiobutton
used to display a number of options as radio buttons. The user can select only one option at a time.
Scale
used to provide a slider widget.
Scrollbar
used to add scrolling capability to various widgets, such as list boxes.
Text
used to display text in multiple lines.
Toplevel
used to provide a separate window container.
Spinbox
variant of the standard Tkinter Entry widget, which can be used to select from a fixed number of values.
PanedWindow
container widget that may contain any number of panes, arranged horizontally or vertically.
LabelFrame
simple container widget. Its primary purpose is to act as a spacer or container for complex window layouts.
tkMessageBox
used to display message boxes in your applications
The pack Method
This geometry manager organizes widgets in blocks before placing them in the parent widget.
The grid Method
This geometry manager organizes widgets in a table-like structure in the parent widget.
The place Method
This geometry manager organizes widgets by placing them in a specific position in the parent widget.
1. Dimensions
2. Colors
3. Fonts
4. Anchors
5. Relief styles
6. Bitmaps
7. Cursors
Standard attributes
Python DB-API
The Python standard for database interfaces
1. GadFly
2. mSQL
3. MySQL
4. PostgreSQL
5. Microsoft SQL Server 2000
6. Informix
7. Interbase
8. Oracle
9. Sybase
Python Database API supports a wide
range of database servers such as:
MySQLdb
interface for connecting to a MySQL database server from Python. It implements the Python Database API v2.0 and is built on top of the MySQL C API.
INSERT Operation
It is required when you want to create your records into a database table.
READ Operation
fetch some useful information from the database.
fetchone
It fetches the next row of a query result set. A result set is an object that is returned when a cursor object is used to query a table.
fetchall
It fetches all the rows in a result set. If some rows have already been extracted from the result set, then it retrieves the remaining rows from the result set.
rowcount
This is a read-only attribute and returns the number of rows that were affected by an execute method.
Update Operation
update one or more records, which are already
available in the database.
DELETE Operation
required when you want to delete some records from your database
Transactions
mechanism that ensures data consistency.
Atomicity
Either a transaction completes or nothing happens at all.
Consistency
A transaction must start in a consistent state and leave the system in a consistent state.
Isolation
Intermediate results of a transaction are not visible outside the current transaction.
Durability
Once a transaction was committed, the effects are persistent, even after a system failure.
Performing Transactions:
1. Atomicity
2. Consistency
3. Isolation
4. Durability
COMMIT Operation
gives a green signal to database to finalize the changes, and after this operation, no change can be reverted back.
ROLLBACK Operation
If you are not satisfied with one or more of the changes and you want to revert back those changes completely
Disconnecting Database
use close method.
Warning
Used for non-fatal issues. Must subclass StandardError.
Error
Base class for errors. Must subclass StandardError.
InterfaceError
Used for errors in the database module, not the database itself. Must subclass Error.
DatabaseError
Used for errors in the database. Must subclass Error
DataError
Subclass of DatabaseError that refers to errors in the data.
OperationalError
Subclass of DatabaseError that refers to errors such as the loss of a connection to the database. These errors are generally outside of the control of the Python scripter.
IntegrityError
Subclass of DatabaseError for situations that would damage the relational integrity, such as uniqueness constraints or foreign keys.
InternalError
Subclass of DatabaseError that refers to errors internal to the database module, such as a cursor no longer being active.
ProgrammingError
Subclass of DatabaseError that refers to errors such as a bad table name and other things that can safely be blamed on you.
NotSupportedError
Subclass of DatabaseError that refers to trying to call unsupported functionality.
YOU MIGHT ALSO LIKE...
Java ch 15 Summary
58 terms
Database chapter 1
19 terms
Lesson 5 - Advanced UI Interaction
16 terms
ISYS 3393 Exam 3
95 terms
OTHER SETS BY THIS CREATOR
mtmedia
63 terms
DBMS
67 terms
COMPRO 3
59 terms
exam
49 terms