#!/usr/bin/env python3

"""Example of importing data into python"""

__appname__ = 'basic_io.py'
__author__ = 'Ioan Evans'
__email__ = 'ie917@ic.ac.uk'
__version__ = '0.0.1'
__license__ = "License for this code/program"

## File input

# Open a file for reading
f = open('../Data/test.txt', 'r')

# use "implicit" for loop:
# if the object is a file, python will cycle over lines
for line in f:
    print(line)

#close the file
f.close()

## Same example, skip blank lines
f = open('../Data/test.txt', 'r')
for line in f:
    if len(line.strip()) > 0:
        print(line)

f.close()