Skip to content

Commit 0d3bfcb

Browse files
author
Devyn Stott
committed
feat(starter): add startExample code
Basic class for proving that you can write something.
1 parent 23ccf9e commit 0d3bfcb

3 files changed

Lines changed: 48 additions & 0 deletions

File tree

starter/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Copyright (c) 2017 <company or person>
4+
#
5+
from starter import StartExample

starter/__main__.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Copyright (c) 2017 <company or person>
4+
#
5+
"""
6+
This is the main file, it is invoked when someone runs python like:
7+
python -m starter
8+
"""
9+
10+
from .starter import StartExample
11+
12+
13+
def main():
14+
StartExample().run()
15+
16+
if __name__ == "__main__":
17+
main()

starter/starter.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Copyright (c) 2017 <company or person>
4+
#
5+
"""
6+
The entry point for this application.
7+
"""
8+
from __future__ import print_function
9+
10+
__version__ = "0.2.0"
11+
12+
13+
class StartExample(object):
14+
"""
15+
A example class that is the starts this application
16+
"""
17+
18+
def __init__(self):
19+
self.location = "World"
20+
21+
def run(self):
22+
self.print_version()
23+
print("Hello {}!".format(self.location))
24+
25+
def print_version(self):
26+
print("Version: {}".format(__version__))

0 commit comments

Comments
 (0)