Skip to content
Snippets Groups Projects
Commit 44ed36a6 authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

files for modules/packages prac

parent 075df22d
No related branches found
No related tags found
No related merge requests found
Showing
with 39 additions and 0 deletions
#!/usr/bin/env python
from fsleyes.main import fsleyes_main
#!/usr/bin/env python
def fsleyes_main():
print('Woo, you\'ve started a mock version of FSLeyes!')
#!/usr/bin/env python
import sys
def mul(a, b):
"""Multiply two numbers together. """
return a * b
def main(args=None):
"""Read in command line arguments,
and call the mul function.
"""
if args is None:
args = sys.argv[1:]
if len(args) != 2:
print('Usage: module_and_scripy.py a b')
sys.exit(1)
a = float(args[0])
b = float(args[1])
print('{} * {}: {}'.format(a, b, mul(a, b)))
# If this module is executed as a
# script, call the main function
if __name__ == '__main__':
main()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment