Advertisement
Guest User

Untitled

a guest
Jun 19th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.53 KB | None | 0 0
  1. import os
  2.  
  3. output = open("all_files.c", "w")
  4.  
  5. for subdir, dirs, files in os.walk("CooolOS"):
  6.     print(subdir)
  7.     for file in files:
  8.         curr = open(subdir + "\\"+file, "r").read()
  9.         curr = curr.replace("""/*
  10. * To change this license header, choose License Headers in Project Properties.
  11. * To change this template file, choose Tools | Templates
  12. * and open the template in the editor.
  13. */""", "")
  14.         header = "/******\n" + file +"\n*********/\n"
  15.         output.write(header)
  16.         output.write(curr + '\n')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement