import json
import re

INPUT_FILE = 'Z:\WinData\Desktop\stream.txt'

# Read the file into a string
myFile = open(INPUT_FILE)
myString = myFile.read()
myFile.close()


# Split the string into chuncks, each being a JSON representing a tweet
unParsedTweets = re.findall(r'{.*}\n', myString)
print(str(len(unParsedTweets)) + ' tweets found in the file.')


# Load the unparsedTweets (strings) as dictionaries
tweets = []
tweets += [json.loads(unParsedTweets[0])]
