Revision 45,
478 bytes
checked in by atzm, 14 years ago
(diff) |
add pycodebattler
|
Line | |
---|
1 | #!/usr/bin/env python |
---|
2 | # -*- coding: utf-8 -*- |
---|
3 | # $Id: a1757a765f56d3386b0c12ba5b73f842c847a64d $ |
---|
4 | |
---|
5 | import sys |
---|
6 | import pycodebattler |
---|
7 | |
---|
8 | |
---|
9 | def _main_entry(): |
---|
10 | if len(sys.argv) == 1: |
---|
11 | p = [pycodebattler.warrior.Warrior('stdin', sys.stdin)] |
---|
12 | else: |
---|
13 | p = [pycodebattler.warrior.Warrior( |
---|
14 | pycodebattler.util.path2name(f), open(f)) |
---|
15 | for f in sys.argv[1:]] |
---|
16 | |
---|
17 | print(pycodebattler.warrior.pformat(p)) |
---|
18 | |
---|
19 | |
---|
20 | if __name__ == '__main__': |
---|
21 | _main_entry() |
---|
Note: See
TracBrowser
for help on using the repository browser.