Removing arbitrary line of text from a file with Python?
Given the following example file:

    host wallmount {
        option root-path "iscsi:10.0.0.202::::iqn.2012-01.com.enactpc:storage.wall_mount";
        hardware ethernet 00:15:c5:71:b9:68;
        }
    
    host netbook {
        option root-path "iscsi:10.0.0.202::::iqn.2012-01.com.enactpc:storage.netbook";
        hardware ethernet 00:21:70:bb:4e:95;
        }
    
    host laptop {
        option root-path "iscsi:10.0.0.202::::iqn.2012-01.com.enactpc:storage.laptop";
        hardware ethernet 00:1b:38:4c:62:40;
        }

Would it be possible to take a known "hostname" (eg. "wallmount") and remove it's entire declaration automatically?

P.S. This is a DHCP config file under Linux...  I don't know if that helps or not.
Removing arbitrary line of text from a file with Python?
===

Given the following example file:

    host wallmount {
        option root-path "iscsi:10.0.0.202::::iqn.2012-01.com.enactpc:storage.wall_mount";
        hardware ethernet 00:15:c5:71:b9:68;
        }
    
    host netbook {
        option root-path "iscsi:10.0.0.202::::iqn.2012-01.com.enactpc:storage.netbook";
        hardware ethernet 00:21:70:bb:4e:95;
        }
    
    host laptop {
        option root-path "iscsi:10.0.0.202::::iqn.2012-01.com.enactpc:storage.laptop";
        hardware ethernet 00:1b:38:4c:62:40;
        }

Would it be possible to take a known "hostname" (eg. "wallmount") and remove it's entire declaration automatically?

P.S. This is a DHCP config file under Linux...  I don't know if that helps or not.