#!/usr/bin/env python #coding: utf-8 filename = __file__ with open(filename, 'r') as fp: for line in fp.readlines(): line = line.strip() # remove CR/LF print line