Basically what it does is search a .txt file with 16000 lines and find what best matches the input.

In mIRC I run it with
Code:
run -h search.py " $+ $1- $+ " 





Code:
from fuzzywuzzy import fuzz
import sys

def cardsearch(CardName):    
    Cardname = str(CardName)
    test = open("cards.txt","r")
    listen = [];
    inputLen = len(CardName.split(" "))
    for line in test:
        temp = fuzz.token_set_ratio(CardName,line),line
        listen.append(temp)
    listen.sort()
    temp = listen[-1]
    test.close()
    temp = " ".join(str(i).strip() for i in temp)
    result = temp.partition(" ")[2]
    target = open("matched.txt","w")
    target.write(result)
    target.close()

cardsearch(sys.argv[1])