1# 2# "$Id: message.py 201 2006-02-16 07:26:03Z andreasheld $" 3# 4# Message test program for pyFLTK the Python bindings 5# for the Fast Light Tool Kit (FLTK). 6# 7# FLTK copyright 1998-1999 by Bill Spitzak and others. 8# pyFLTK copyright 2003 by Andreas Held and others. 9# 10# This library is free software you can redistribute it and/or 11# modify it under the terms of the GNU Library General Public 12# License as published by the Free Software Foundation either 13# version 2 of the License, or (at your option) any later version. 14# 15# This library is distributed in the hope that it will be useful, 16# but WITHOUT ANY WARRANTY without even the implied warranty of 17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18# Library General Public License for more details. 19# 20# You should have received a copy of the GNU Library General Public 21# License along with this library if not, write to the Free Software 22# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 23# USA. 24# 25# Please report all bugs and problems to "pyfltk-user@lists.sourceforge.net". 26# 27 28from fltk import * 29 30fl_close_set("Schliessen") 31fl_yes_set("Ja") 32fl_no_set("Nein") 33fl_cancel_set("Abbrechen") 34 35fl_message("Spelling check sucessfull, %d errors found with %f confidence" \ 36 %(1002, 100*(15/77.0))) 37 38fl_alert("Quantum fluctuations in the space-time continuim detected, " 39 "you have %f seconds to comply."% 10.0) 40 41print("fl_ask returned %d"%fl_ask("Do you really want to %s?"%"continue")) 42 43print("fl_choice returned %d"%fl_choice("Choose one of the following:","choice0","choice1","choice2")) 44 45r = fl_input("Please enter a string for input:", "this is the default value") 46print("fl_input returned \"%s\""%str(r)) 47 48r = fl_password("Enter password:", "123") 49print("fl_password returned \"%s\""%str(r)) 50 51