Skip to content
Permalink
196c1205be
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
26 lines (24 sloc) 732 Bytes
import linecache
def savePreferences(v):
userNamesData = open('dataData.txt', 'a')
userNamesData.write(''+v+' ')
userNamesData.close()
def newSave():
userNamesData = open('dataData.txt', 'a')
userNamesData.write('\n')
userNamesData.close()
def readFunction(willCheck):
userNamesData = open('dataData.txt', 'r+')
if willCheck in open('dataData.txt').read():
willCheck = True
else:
willCheck = False
return willCheck
def extraDetails(word):
details = linecache.getline('dataData.txt', word)
return details
def getLineNumber(phrase):
with open('dataData.txt') as f:
for i, line in enumerate(f, 1):
if phrase in line:
return i