document['navbar'] <= nav
document['navbar'].innerHTML = nav.read()
How to include html elements from another html file? If you will just open it and send it to some zone of your document it will appear as a regular text instead of the html element.
Brython script:
from browser import document
nav = open('navbar.html')
document['navbar'] <= nav
How to append some text from your input to the txt file and then display it? On python I've got this:
import time
data = open('datastore.txt', 'r')
print(data.read())
inputdata = input()
data = open('datastore.txt', 'a')
data.write('\n' + inputdata + ' ' + time.asctime())
data = open('datastore.txt', 'r')
print(data.read())