diff --git a/source/examples/python/hello/greeter.py b/source/examples/python/hello/greeter.py new file mode 100644 index 0000000..7bcb781 --- /dev/null +++ b/source/examples/python/hello/greeter.py @@ -0,0 +1,9 @@ +#!/usr/bin/env python + +import time + + +def greeting(): + '''Returns a pleasant, semi-useful greeting.''' + return "Hello world, the time is: " + time.ctime() + diff --git a/source/examples/python/hello/hello.py b/source/examples/python/hello/hello.py index b11a93b..4beafcf 100644 --- a/source/examples/python/hello/hello.py +++ b/source/examples/python/hello/hello.py @@ -1,15 +1,7 @@ #!/usr/bin/env python -# -# Copyright (c) 2013 Jason McVetta. This is Free Software, released under the -# terms of the GPL v3. See http://www.gnu.org/copyleft/gpl.html for details. -# Resist intellectual serfdom - the ownership of ideas is akin to slavery. import time - - -def greeting(): - '''Returns a pleasant, semi-useful greeting.''' - return "Hello world, the time is: " + time.ctime() +from greeter import greeting def main(): @@ -18,4 +10,3 @@ def main(): if __name__ == '__main__': main() -