diff options
author | Paul Pogonyshev <pogonyshev@gmx.net> | 2008-08-28 19:53:26 +0000 |
---|---|---|
committer | Paul Pogonyshev <paulp@src.gnome.org> | 2008-08-28 19:53:26 +0000 |
commit | 2d39e51e0a099626ec95beb6fac154264e4b5350 (patch) | |
tree | 09c8d2141116effccc58f58726b0453b0a14b917 /examples | |
parent | 9442c980fac075bb7157d23f5587594e142c0f32 (diff) | |
download | pygtk-2d39e51e0a099626ec95beb6fac154264e4b5350.tar.gz |
Bug 541476 – Update pango examples
2008-08-28 Paul Pogonyshev <pogonyshev@gmx.net>
Bug 541476 – Update pango examples
* examples/pango/utf8-demo.py: Fix interpreter line. Replace all
escapes with corresponding characters. Use gtk.main_quit()
instead of deprecated gtk.mainquit().
* examples/pango/extentdemo.py: Fix interpreter line.
svn path=/trunk/; revision=3031
Diffstat (limited to 'examples')
-rwxr-xr-x[-rw-r--r--] | examples/pango/extentdemo.py | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | examples/pango/pangocairo-simple.py | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | examples/pango/utf8-demo.py | 96 |
3 files changed, 56 insertions, 44 deletions
diff --git a/examples/pango/extentdemo.py b/examples/pango/extentdemo.py index d663c52f..8e5d3191 100644..100755 --- a/examples/pango/extentdemo.py +++ b/examples/pango/extentdemo.py @@ -1,5 +1,5 @@ -#!/usr/bin/env python2.4 -# -*- coding:utf8 -*- +#! /usr/bin/env python +# -*- coding: utf-8 -*- # # I, Adam Olsen, am the original author of this work. I hereby # donate it into the public domain, and relinquish any rights I diff --git a/examples/pango/pangocairo-simple.py b/examples/pango/pangocairo-simple.py index 8cf6d46f..8cf6d46f 100644..100755 --- a/examples/pango/pangocairo-simple.py +++ b/examples/pango/pangocairo-simple.py diff --git a/examples/pango/utf8-demo.py b/examples/pango/utf8-demo.py index e22da2ba..3b960e2b 100644..100755 --- a/examples/pango/utf8-demo.py +++ b/examples/pango/utf8-demo.py @@ -1,57 +1,69 @@ +#! /usr/bin/env python +# -*- coding: utf-8 -*- +# # order is important here (for now) import gtk # string taken from pango examples directory and converted from utf8 # to python unicode string escapes -hellos = u'''\u03A0\u03B1\u03BD\u8A9E -This is a list of ways to say hello in various languages. -The purpose of it is to illustrate a number of scripts. +hellos = '''This is Pango (Παν語) -(Converted into UTF-8) +This is a list of ways to say hello in various languages. +Its purpose is to illustrate a number of scripts. --------------------------------------------------------- -Arabic\t\u0627\u0644\u0633\u0644\u0627\u0645 \u0639\u0644\u064A\u0643\u0645 -Czech\t(\u010Desky)\tDobr\375 den -Danish\t(Dansk)\tHej, Goddag -English\tHello -Esperanto\tSaluton -Estonian\tTere, Tervist -FORTRAN\tPROGRAM -Finnish\t(Suomi)\tHei -French\t(Fran\347ais)\tBonjour, Salut -German\t(Deutsch Nord)\tGuten Tag -German\t(Deutsch S\374d)\tGr\374\337 Gott -Greek\t(\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC)\t\u0393\u03B5\u03B9\u03AC \u03C3\u03B1\u03C2 -Hebrew\t\u05E9\u05DC\u05D5\u05DD -Hindi\t\u0928\u092E\u0938\u094D\u0924\u0947, \u0928\u092E\u0938\u094D\u0915\u093E\u0930\u0964 -Italiano\tCiao, Buon giorno -Maltese\t\u010Aaw, Sa\u0127\u0127a -Nederlands, Vlaams\tHallo, Dag -Norwegian\t(Norsk)\tHei, God dag -Polish\tDzie\u0144 dobry, Hej -Russian\t(\u0420\u0443\u0441\u0441\u043A\u0438\u0439)\t\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435!\u200E -Slovak\tDobr\375 de\u0148 -Spanish\t(Espa\361ol)\t\u200E\241Hola!\u200E -Swedish\t(Svenska)\tHej, Goddag -Thai\t(\u0E20\u0E32\u0E29\u0E32\u0E44\u0E17\u0E22)\t\u0E2A\u0E27\u0E31\u0E2A\u0E14\u0E35\u0E04\u0E23\u0E31\u0E1A, \u0E2A\u0E27\u0E31\u0E2A\u0E14\u0E35\u0E04\u0E48\u0E30 -Turkish\t(T\374rk\347e)\tMerhaba -Vietnamese\t(Ti\u1EBFng Vi\u1EC7t)\tXin Ch\340o -Yiddish\t(\u05F2\u05B7\u05D3\u05D9\u05E9\u05E2)\t\u05D3\u05D0\u05B8\u05E1 \u05D4\u05F2\u05B7\u05D6\u05E2\u05DC\u05E2 +Arabic السَّلام عليكُم +Bengali (বাঙ্লা) ষাগতোম +Burmese မ္ရန္မာ +Cherokee (ᏣᎳᎩ) ᎣᏏᏲ +Czech (česky) Dobrý den +Danish (Dansk) Hej, Goddag +English Hello +Esperanto Saluton +Estonian Tere, Tervist +FORTRAN PROGRAM +Finnish (Suomi) Hei +French (Français) Bonjour, Salut +German (Deutsch Nord) Guten Tag +German (Deutsch Süd) Grüß Gott +Georgian (ქართველი) გამარჯობა +Gujarati ગુજરાતિ +Greek (Ελληνικά) Γειά σας +Hebrew שלום +Hindi नमस्ते, नमस्कार। +Italiano Ciao, Buon giorno +IPA English (ɪŋglɪʃ) hɛləʊ +Lao ສບາຍດ +Maltese Ċaw, Saħħa +Nederlands, Vlaams Hallo, Dag +Norwegian (Norsk) Hei, God dag +Punjabi ਪੁਂਜਾਬਿ +Polish Dzień dobry, Hej +Russian (Русский) Здравствуйте! +Sinhala (සිංහල) ආයුබෝවන් +Slovak Dobrý deň +Spanish (Español) ¡Hola! +Swedish (Svenska) Hej, Goddag +Thai (ภาษาไทย) สวัสดีครับ, สวัสดีค่ะ +Tamil (தமிழ்) வணக்கம் +Turkish (Türkçe) Merhaba +Vietnamese (Tiếng Việt) Xin Chào +Yiddish (ײַדישע) דאָס הײַזעלע -Japanese\t(\u65E5\u672C\u8A9E)\t\u3053\u3093\u306B\u3061\u306F, \uFF7A\uFF9D\uFF86\uFF81\uFF8A -Chinese\t(\u4E2D\u6587,\u666E\u901A\u8BDD,\u6C49\u8BED)\t\u4F60\u597D -Cantonese\t(\u7CB5\u8A9E,\u5EE3\u6771\u8A71)\t\u65E9\u6668, \u4F60\u597D -Korean\t(\uD55C\uAE00)\t\uC548\uB155\uD558\uC138\uC694, \uC548\uB155\uD558\uC2ED\uB2C8\uAE4C - -Difference among chinese characters in GB, JIS, KSC, BIG5:\u200E - GB\t--\t\u5143\u6C14\t\u5F00\u53D1 - JIS\t--\t\u5143\u6C17\t\u958B\u767A - KSC\t--\t\u5143\u6C23\t\u958B\u767C - BIG5\t--\t\u5143\u6C23\t\u958B\u767C +Japanese (日本語) こんにちは, コンニチハ +Chinese (中文,普通话,汉语) 你好 +Cantonese (粵語,廣東話) 早晨, 你好 +Korean (한글) 안녕하세요, 안녕하십니까 +Difference among chinese characters in GB, JIS, KSC, BIG5: + GB -- 元气 开发 + JIS -- 元気 開発 + KSC -- 元氣 開發 + BIG5 -- 元氣 開發 ''' + win = gtk.Window() -win.connect('destroy', gtk.mainquit) +win.connect('destroy', gtk.main_quit) win.set_default_size(600, 400) swin = gtk.ScrolledWindow() |