Last active
December 12, 2015 06:48
-
-
Save hgezim/4731588 to your computer and use it in GitHub Desktop.
Python script that gets every line in every file in the current directory and appends '//' to the front.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Python script that gets every line in every file in the current directory and appends '//' to the front.""" | |
import os | |
os.listdir('.') | |
file_names = os.listdir('.') | |
for file in file_names: | |
opened_file = open(file) | |
lines = opened_file.readlines() | |
for line in lines: | |
print "// %s" % (line), | |
print "\n" | |
opened_file.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment