I am trying to make a script that opens a url when the OPEN command is entered. This is for an IRC bot I am creating. I am trying to make it like this
OPEN http://url.com and it opens the url. This is what I have so far.
import webbrowser
test = s.recv(1024)
if test.find("http://") != 1:
webbrowser.open(test)
else:
print "it didnt work"
I honestly have no idea how this is done.