Permalink
Browse files

small refine on codes.

  • Loading branch information...
1 parent 259df95 commit 596f146f68fcd2cbf9f713688c3b76f6d268a2a4 @lxyu committed Aug 29, 2012
Showing with 6 additions and 4 deletions.
  1. +2 −0 drawsomething/__init__.py
  2. +0 −1 drawsomething/draw.py
  3. +0 −1 drawsomething/translate.py
  4. +4 −2 example.py
@@ -1,2 +1,4 @@
+# -*- coding: utf-8 -*-
+
from .draw import get_words
from .translate import translate
@@ -1,4 +1,3 @@
-#!/usr/bin/python2.7
# -*- coding: utf-8 -*-
import enchant
@@ -1,4 +1,3 @@
-#!/usr/bin/python2.7
# -*- coding: utf-8 -*-
import google_translate
View
@@ -1,11 +1,13 @@
-#!/usr/bin/python2.7
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
from drawsomething import get_words
from drawsomething import translate
+TRANSLATE_TO = 'zh_cn'
+
def main():
parser = argparse.ArgumentParser()
@@ -19,7 +21,7 @@ def main():
words = get_words(args.chars, args.length)
for w in words:
- trans = translate(w, 'zh_cn').lower()
+ trans = translate(w, TRANSLATE_TO).lower()
if w != trans:
print w, trans
else:

0 comments on commit 596f146

Please sign in to comment.