Commit 113cbec1 authored by Qusai Al Shidi's avatar Qusai Al Shidi
Browse files

Some paramin changes untested

parent a7e3222a
"""Tools to manipulate or create files Tools
These tools are to help script the editing of files.
__all__ = ['read_command', 'replace_command']
__all__ = [
__author__ = 'Qusai Al Shidi'
__email__ = ''
import logging
def get_command(line):
"""Returns the '#COMMAND' if on line.
line (str): The line in the file.
(str): '#COMMAND' if found and None if not.
to_check = line.split()
if isinstance(to_check, (str, tuple, list)):
if isinstance(to_check, str) and to_check.startswitch('#'):
return to_check
return get_command(to_check[0])
return None
def replace_command(parameters, input_file, output_file=''):
"""Replace values for the parameters in a file.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment