<commit_before>import feedparser, os, sys

try:
        import readline
except:
        import pyreadline as readline

path = os.path.join(os.path.expanduser('~'), '.sites')

rss = feedparser.parse('http://rss.cnn.com/rss/cnn_topstories.rss')

def showRSS():
    try:
            file = open(path, 'r')
            print("File found at "+path)
            file.close()
    except:
        print("No file found at "+path)
def addRSS():
    print("You pressed two!")

def liveRSS():
    print("You pressed three!")

def menu():
    while True:
        choice = raw_input("1.Show RSS feeds\n2.Add new RSS feed\n3.Live view RSS feed\n")
        if choice == "1": showRSS(); break

        elif choice == "2": addRSS(); break

        elif choice == "3": liveRSS(); break

        else: print("\n~That is not a valid option!~")

menu()
#print(rss['entries'][0]['title'])<commit_msg>Improved Reading From File, fixes<commit_after>#!/usr/bin/python
import feedparser, os, sys

try:
        import readline
except:
        import pyreadline as readline

path = os.path.join(os.path.expanduser('~'), 'sites.txt')

def showRSS():
    try:
            file = open(path, 'r')
            print("File found at "+path)
            for line in file:
                site = {'name:': 'foo', 'site': line};
                site = feedparser.parse(site['site'])
                print(line)
                for i in range(0, 3):
                        print(site['entries'][i]['title'])
                        print(site['entries'][i]['link'])

                print("\n")
            file.close()
    except:
        print("No file found at "+path)
def addRSS():
    print("You pressed two!")

def liveRSS():
    print("You pressed three!")

def menu():
    while True:
        choice = raw_input("1.Show RSS feeds\n2.Add new RSS feed\n3.Live view RSS feed\n")
        if choice == "1": showRSS(); break

        elif choice == "2": addRSS(); break

        elif choice == "3": liveRSS(); break

        else: print("\n~That is not a valid option!~")

showRSS()
#menu()

{'fraction_non_alphanumeric': 0.15579357351509251, 'fraction_numerical': 0.007302823758519961, 'mean_word_length': 2.205928237129485, 'pattern_counts': {'":': 6, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7262078', 'n_tokens_mistral': 664, 'n_tokens_neox': 638, 'n_words': 186}