Copyright (c) Hyperion Entertainment and contributors.
AmigaOS Manual: Python Modules and Packages
Contents
Modules
arexx
Msg()
Port()
dorexx()
Variables
- __doc__
- __file__
- __name__
asl
This module contains AmigaOS-specific requester function for file and path queries, message boxes, ans similar aspects.
FileRequest()
drawer, file = FileRequest ( title, drawer, filename, pattern )
Opens a file select requester with the given title, the drawer and filename gadgets predefined by drawer and title. If a pattern is given, a pattern gadget is also displayed and pre-set with the given pattern. The result is a tuple drawer, filename which relects the choice of the user.
- Example
Opens up a file requester in T: with 'my.log' as a default name, and a filter set to '#?.log':
drawer, file = asl.FileRequest('Python File Request', 'T:', 'my.log', '#?.log' )
MessageBox()
result = MessageBox( title, body_text, buttons )
Opens a message box with the given title and body text. The options on the dialog are taken from the 'buttons' argument. The 'buttons' string contains individual substrings separated by a '|'.
The result of this function is the button number selected by the user. Numbering starts from left with 1, 2 and so on, but the final button is 0.
- Example
Puts up a requester asking for a 'Yes' or 'No' answer:
result = asl.MessageBox('Python Request', 'AmigaOS rules', 'Yes|No')
Selecting 'Yes' returns 1 and selecting 'No' returns 0.
Variables
- __doc__
- __file__
- __name__