Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added hangman's __main__.py

  • Loading branch information...
commit cb64348c194f0aa5f56017a81f91e59ac58bc91e 1 parent 85f6a71
keesbos keesbos authored
Showing with 65 additions and 0 deletions.
  1. +53 −0 examples/hangman/__main__.py
  2. +12 −0 examples/index.html
53 examples/hangman/__main__.py
View
@@ -0,0 +1,53 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+
+TARGETS = [
+ 'HangMan.py',
+]
+
+
+PACKAGE = {
+ 'title': 'Hang man',
+ 'desc': 'Guess the word or be hanged',
+}
+
+
+def setup(targets):
+ '''Setup example for translation, MUST call util.setup(targets).'''
+ util.setup(targets)
+
+
+def translate():
+ '''Translate example, MUST call util.translate().'''
+ util.translate()
+
+
+def install(package):
+ '''Install and cleanup example module. MUST call util.install(package)'''
+ util.install(package)
+
+
+##---------------------------------------##
+# --------- (-: DO NOT EDIT :-) --------- #
+##---------------------------------------##
+
+
+import sys
+import os
+
+
+examples = head = os.path.abspath(os.path.dirname(__file__))
+while os.path.split(examples)[1].lower() != 'examples':
+ examples = os.path.split(examples)[0]
+ if not examples:
+ raise ValueError("Cannot determine examples directory")
+sys.path.insert(0, os.path.join(examples))
+from _examples import util
+sys.path.pop(0)
+
+util.init(head)
+
+setup(TARGETS)
+translate()
+install(PACKAGE)
12 examples/index.html
View
@@ -322,6 +322,18 @@ <h3 class='desc'>Port of GWTCanvas Example</h3>
<h4 class='source'><a href="gwtcanvas/">source directory</a> (gwtcanvas)<h4>
<hr/>
+<!-- start hangman -->
+ <h2 class='title'>Hang man</h2>
+ <h3 class='desc'>Guess the word or be hanged</h3>
+ <ul class='demos'>
+
+ <li class='demo'>(demo) <a href="hangman/output/HangMan.html">HangMan</a></li>
+
+ </ul>
+<!-- -->
+ <h4 class='source'><a href="hangman/">source directory</a> (hangman)<h4>
+
+ <hr/>
<!-- start helloworld -->
<h2 class='title'>helloworld</h2>
<h3 class='desc'>Port of GWT hello world example</h3>
Please sign in to comment.
Something went wrong with that request. Please try again.