Skip to content
Newer
Older
100644 54 lines (35 sloc) 1.07 KB
bba0658 @earney example added to show a new Widget to validate text entered in a Text…
earney authored Aug 10, 2012
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3
4
5 TARGETS = [
6 'RegexTextBoxDemo.py',
7 ]
8
9
10 PACKAGE = {
11 'title': 'TextBox Validation',
12 'desc': 'Validate TextBox text with a regular expression',
13 }
14
15
16 def setup(targets):
17 '''Setup example for translation, MUST call util.setup(targets).'''
18 util.setup(targets)
19
20
21 def translate():
22 '''Translate example, MUST call util.translate().'''
23 util.translate()
24
25
26 def install(package):
27 '''Install and cleanup example module. MUST call util.install(package)'''
28 util.install(package)
29
30
31 ##---------------------------------------##
32 # --------- (-: DO NOT EDIT :-) --------- #
33 ##---------------------------------------##
34
35
36 import sys
37 import os
38
39
40 examples = head = os.path.abspath(os.path.dirname(__file__))
41 while os.path.split(examples)[1].lower() != 'examples':
42 examples = os.path.split(examples)[0]
43 if not examples:
44 raise ValueError("Cannot determine examples directory")
45 sys.path.insert(0, os.path.join(examples))
46 from _examples import util
47 sys.path.pop(0)
48
49 util.init(head)
50
51 setup(TARGETS)
52 translate()
53 install(PACKAGE)
Something went wrong with that request. Please try again.