Skip to content

Commit

Permalink
initial commit file to make *.txt and *.f95 file non-executable
Browse files Browse the repository at this point in the history
  • Loading branch information
nickbrady committed Apr 4, 2022
1 parent 2165e01 commit fe48633
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions MakeFilesNonExecutable.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#
import sys
import numpy as np # Useful for numerical calculations on an array
import os # Used for changing directories and open files with folders
from subprocess import call # Allows Python to call shell script
import shutil # allows python to execute terminal commands (such as rm mv cp ...)
import re # module used in sed (function) to find and replace text
import glob # module used to find files in a directory (used to remove temporary files)
from operator import itemgetter # Allows us to find groups of consecutive numbers
from tqdm import tqdm # module to produce and view a progress bar; valuable when running many simulations
import tempfile as tp


for root, dirs, files in os.walk(os.getcwd()):
for file in files:
if file.endswith(".py"):
# print(os.path.join(root, file))
p = call(['chmod', '-x', os.path.join(root, file)])

0 comments on commit fe48633

Please sign in to comment.