annotate numberfile.py @ 13:8e1f57c91210

add port manager to ie-docker.
author taira
date Tue, 03 Feb 2015 16:49:48 +0900
parents
children 855a5e399f6e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13
8e1f57c91210 add port manager to ie-docker.
taira
parents:
diff changeset
1 #!/usr/bin/python
8e1f57c91210 add port manager to ie-docker.
taira
parents:
diff changeset
2
8e1f57c91210 add port manager to ie-docker.
taira
parents:
diff changeset
3 import argparse
8e1f57c91210 add port manager to ie-docker.
taira
parents:
diff changeset
4
8e1f57c91210 add port manager to ie-docker.
taira
parents:
diff changeset
5 if __name__ == "__main__":
8e1f57c91210 add port manager to ie-docker.
taira
parents:
diff changeset
6 parser = argparse.ArgumentParser(description='Create new project for ie-docker.')
8e1f57c91210 add port manager to ie-docker.
taira
parents:
diff changeset
7 parser.add_argument('number', metavar='N', help='start number.')
8e1f57c91210 add port manager to ie-docker.
taira
parents:
diff changeset
8 parser.add_argument('limit', metavar='N', help='limit number.')
8e1f57c91210 add port manager to ie-docker.
taira
parents:
diff changeset
9 parser.add_argument('filename', metavar='filename', help='output file name.')
8e1f57c91210 add port manager to ie-docker.
taira
parents:
diff changeset
10 args = parser.parse_args()
8e1f57c91210 add port manager to ie-docker.
taira
parents:
diff changeset
11
8e1f57c91210 add port manager to ie-docker.
taira
parents:
diff changeset
12 f = open(args.filename,"w")
8e1f57c91210 add port manager to ie-docker.
taira
parents:
diff changeset
13 for num in range(int(args.number), int(args.limit)):
8e1f57c91210 add port manager to ie-docker.
taira
parents:
diff changeset
14 num_str = str(num)
8e1f57c91210 add port manager to ie-docker.
taira
parents:
diff changeset
15 f.write(num_str + "\n")
8e1f57c91210 add port manager to ie-docker.
taira
parents:
diff changeset
16 f.close()