create empty file

3 thoughts on “create empty file

  1. Hi

    is it possible to create empty file in module using python script?

    the code below doesn’t seem to work:

     

    file = open("filename","w")

    file.write(”)

    file.flush()

    file.close()

    Thank you

  2. Because i made a file class which has "create file method" ;  i wanted to fill it later with append

    but since that doesnt work i am creating file when i have something to write

    PS: That code is a python example i found on net to create empty file
    i guess it is working on PC environment