Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 54 lines (35 sloc) 1.048 kB
378a312 added __main__.py to every example; updated 50% of them properly
C Anthony Risinger authored
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3
4
5 TARGETS = [
3a8aa98 update __main__s
Luke Leighton authored
6 'Shell.py',
378a312 added __main__.py to every example; updated 50% of them properly
C Anthony Risinger authored
7 ]
8
9
10 PACKAGE = {
3a8aa98 update __main__s
Luke Leighton authored
11 'title': 'shell',
12 'desc': 'Shell / Window example',
378a312 added __main__.py to every example; updated 50% of them properly
C Anthony Risinger authored
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
8a83f91 @keesbos Updated all __main__.py from examples
keesbos authored
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))
378a312 added __main__.py to every example; updated 50% of them properly
C Anthony Risinger authored
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.