-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtest2.py
50 lines (37 loc) · 896 Bytes
/
test2.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
""" test2.py """
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import division
import os
import logging
import sys
#import argparse
import fire
import numpy as np
import pandas as pd
#import matplotlib.pyplot as plt
from case.tabio import *
#print "hello world"
#def _cmd_target(args):
# regions = tabio.read_auto(args.interval)
class Date(object):
day = 0
month = 0
year = 0
def __init__(self, day=0, month=0, year=0):
self.day = 0
self.month = month
self.year = year
@classmethod
def from_string(cls, date_as_string):
day, month, year = map(int, date_as_string.split('-'))
date1 = cls(day, month, year)
return date1
def test(arg):
print "Hello "+str(arg)
def main():
fire.Fire(test)
date2 = Date.from_string('11-09-2012')
print date2
if __name__ == "__main__":
main()