Revision 71,
921 bytes
checked in by atzm, 13 years ago
(diff) |
add preamble
|
-
Property svn:keywords set to
Id
|
Rev | Line | |
---|
[45] | 1 | #!/usr/bin/env python |
---|
| 2 | # -*- coding: utf-8 -*- |
---|
[71] | 3 | # |
---|
| 4 | # Copyright (C) 2010 by Atzm WATANABE <atzm@atzm.org> |
---|
| 5 | # |
---|
| 6 | # This program is free software; you can redistribute it and/or modify it |
---|
| 7 | # under the terms of the GNU General Public License (version 2) as |
---|
| 8 | # published by the Free Software Foundation. It is distributed in the |
---|
| 9 | # hope that it will be useful, but WITHOUT ANY WARRANTY; without even the |
---|
| 10 | # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
---|
| 11 | # PURPOSE. See the GNU General Public License for more details. |
---|
| 12 | # |
---|
[47] | 13 | # $Id$ |
---|
[71] | 14 | # |
---|
[45] | 15 | |
---|
| 16 | import sys |
---|
| 17 | import pycodebattler |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | def _main_entry(): |
---|
| 21 | if len(sys.argv) == 1: |
---|
| 22 | p = [pycodebattler.warrior.Warrior('stdin', sys.stdin)] |
---|
| 23 | else: |
---|
| 24 | p = [pycodebattler.warrior.Warrior( |
---|
| 25 | pycodebattler.util.path2name(f), open(f)) |
---|
| 26 | for f in sys.argv[1:]] |
---|
| 27 | |
---|
| 28 | print(pycodebattler.warrior.pformat(p)) |
---|
| 29 | |
---|
| 30 | |
---|
| 31 | if __name__ == '__main__': |
---|
| 32 | _main_entry() |
---|
Note: See
TracBrowser
for help on using the repository browser.