#python python... PYTHON ๐ ๐
Look what I shared: coconut/exceptions.py at master ยท evhub/coconut ยท GitHub @MIUI| https://github.com/evhub/coconut/blob/master/coconut/exceptions.py
#from https://github.com/evhub/coconut/blob/master/coconut/command/util.py
def writefile(openedfile, newcontents):
"""Set the contents of a file."""
openedfile.seek(0)
openedfile.truncate()
openedfile.write(newcontents)
def readfile(openedfile):
"""Read the contents of a file."""
openedfile.seek(0)
return str(openedfile.read())
def writefile(openedfile, newcontents):
"""Set the contents of a file."""
openedfile.seek(0)
openedfile.truncate()
openedfile.write(newcontents)
def readfile(openedfile):
"""Read the contents of a file."""
openedfile.seek(0)
return str(openedfile.read())
GitHub
evhub/coconut
Simple, elegant, Pythonic functional programming. Contribute to evhub/coconut development by creating an account on GitHub.