Python Io

          




                                service.py


def addContent(fname):
          fobj=open(fname,"r")
          return fobj.read()



// this code is very useful while creating web pages 

index.py
footer.py
header.py





 how to use footer.py  in index.py

index.py
         
from blocks import service

footer=service.addContent("footer.py") 

Comments

Popular posts from this blog

Filter In Javafx

Kotlin with StandAlone Complier