I'm making a python 3.x program that runs the commands for changing the MAC in Linux every couple of minutes (as one of its various functions). I double checked and I have ifconfig installed, so that's not the issue. Here's the section causing me grief:

```
import sys
import subprocess
import argparse
import random
import time
import re

def macfunc():

    def get_args():
            #Get interface stuff
            prsr = argparse.ArgumentParser()
            prsr.add_argument("-i","--interface",dest="interface",help="Name of interface.")
            options = prsr.parse_args()
            if options.interface:
                return options.interface
            else:
                prsr.error("syntax error")
        def changer(interface, new_mac_address):
            #Does the terminal commands for changing the MAC
            subprocess.call(["sudo","ifconfig",interface,"down"])
            subprocess.call(["sudo","ifconfig",interface,"hw","ether",new_mac_address])
            subprocess.call(["sudo","ifconfig",interface,"up"])
        def get_random_mac():
            #Randomizes MAC
            charset="0123456789abcdef"
            random_mac="00"
            for i in range(5):
                random_mac += ":" + \
                              random.choice(charset) \
                              + random.choice(charset)
                return random_mac
        def get_original(interface):
            #Holds the current MAC for restoration purposes
            output=subprocess.check_output(["ifconfig",interface])
            return re.search("\w\w:\w\w:\w\w:\w\w:\w\w:\w\w",str(output)).group(0)

        #Now let's do the magic and change the mac every 2 minutes
        if __name__ == "__main__":
            print("Initializing MAC scrambler. Generating new MAC every 2 minutes.")
            sleeper=120
            interface=get_args()
            current_mac=get_original(interface)
            try:
                while True:
                    random_mac=get_random_mac()
                    change_mac(interface,random_mac)
                    new_mac_info=subprocess.check_output(["ifconfig",interface])
                    if random_mac in str(new_mac_info):
                        print("New MAC:",random_mac,end=" ")
                        sys.stdout.flush()
                        time.sleep(sleeper)
            except KeyboardInterrupt:
                change_mac(interface,current_mac)
                print("Original MAC restored. Terminating scrambling.")

macfunc()

```

Whenever I run it, I get my syntax error message. I can't for the life of me figure out what I'm missing. It's probably something incredibly stupid on my part. Help would be smashing.