Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > cfb92380391a8832fa0a37b83c1b454b > files > 18

python3-yui-1.1.2-6.mga7.armv7hl.rpm

#coding:utf-8
#
# Trivial libyui example
#

text = "Hello,Wörld!"

import sys
sys.path.insert(0,'../../../build/swig/python')

# see http://svn.opensuse.org/svn/yast/trunk/ncurses/src/YNCursesUI.cc
#  approx line 67
# this call is usually done by YaSTs 'WFM'
import locale
locale.setlocale(locale.LC_ALL, "")

import yui

log = yui.YUILog.instance()
log.setLogFileName("debug.log")
log.enableDebugLogging( True )

appl = yui.YUI.application()
appl.setLanguage( "de", "UTF-8" )
#appl.setConsoleFont(magic, font, screenMap, unicodeMap, language)
# see /usr/share/YaST2/data/consolefonts.ycp
appl.setConsoleFont("(K", "lat9w-16.psfu", "trivial", "", "en_US.UTF-8")
factory = yui.YUI.widgetFactory()

print "Lang: ", appl.language()
dialog = factory.createPopupDialog()

vbox = factory.createVBox( dialog )
factory.createLabel( vbox, text )
factory.createPushButton( vbox, "&OK" )
event = dialog.waitForEvent()
dialog.destroy()
# BEISPIEL 1 geht im graphischen gut, aber nicht auf der konsole ...