python
This is an old revision of the document!
Python Scripting
- reading_writing - Page not found.
- Searching a File
reading_writing - Page not found.
python.1486026342.txt.gz · Last modified: (external edit)
This is an old revision of the document!
config_directory=[]
with open("/etc/httpd/conf/httpd.conf", "r") as search_file:
for line in search_file:
if 'IncludeOptional' in line:
config_directory.append(line)
print config_directory[0]