# using this you can store the information entered by the user in a variable.
/*********** Description Start *************/
import appuifw
#asks for a number, in this case integer; for a fractional number use "float"
inf=appuifw.query(u"Enter a number", "number")
#asks for a text
inf=appuifw.query(u"Enter a word", "text") #asks for a password, and shows the characters as "*" for protection
inf=appuifw.query(u"Enter a password", "code") #asks for a time in hh:mm format
inf=appuifw.query(u"Enter a time", "time") #displays a question, the returned values being 1 if the user has selected "Yes" and 0 if the user has selected "No"
inf=appuifw.query(u"Would you like to play again?", "query")
#asks for two fields of information
inf=appuifw.multi_query(u"Part1", u"Part2")
Constructs a Canvas object. The optional parameters are callbacks or functions or callable objects that are called when specific events occur. redraw_callbackis called whenever a part of the Canvas has been obscured by something, is then revealed, and needs to be redrawn. This can typically happen, for example, when the user switches away from the Python application and back again, or after displaying a pop-up menu. The callback takes as its argument a four-element tuple that contains the top-left and the bottom-right corner of the area that needs to be redrawn. In many cases redrawing the whole Canvas is a reasonable option.
The event_callbackis called whenever a raw key event is received. There are three kinds of key events: EEventKeyDown, EEventKey, and EEventKeyUp. When a user presses a key down, events EEventKeyDown and EEventKey are generated. When the key is released, an EEventKeyUp event is generated.
The argument to the event_callback is a dictionary that contains the following data for key events:
# 'type': one of EEventKeyDown, EEventKey, or EEventKeyUp
# 'keycode': the keycode of the key
# 'scancode': the scancode of the key
# 'modifiers': the modifiers that apply to this key event
Returns a new Image object (mode RGB16) that contains the contents of the named file. The supported file formats are JPEG and PNG. The file format is automatically detected based on file contents. filenameshould be a full path name.
Copies the source area from the given imageto the target area in this drawable. The source area is copied in its entirety if maskis not given or is set to None. If the mask is given, the source area is copied where the mask is white. mask can be either None or a 1-bit (black and white) image and must be of the same size as the source image.
targetand sourcespecify the target area in this image and the source area in the given source. They are coordinate sequences of one or two coordinates. If they specify one coordinate, it is interpreted as the upper-left corner for the area; if they specify two coordinates, they are interpreted as the top-left and bottom-right corners of the area.
If scaleis other than zero, scaling is performed on the fly while copying the source area to the target area. If scale is zero, no scaling is performed, and the size of the copied area is clipped to the smaller of source and target areas.
Note that a blitoperation with scaling is slower than one without scaling. If you need to blit the same Image many times in a scaled form, consider making a temporary Image of the scaling result and blitting it without scaling. Note also that the scaling performed by the blit operation is much faster but of worse quality than the one done by the resizemethod, since the blitmethod does not perform any antialiasing.