In order to get the requirement of yours I am suggesting following command which you should run on the terminal to control the VLC.
#change to your vlc socket (in vlc configuration: UNIX socket command input)
SOCK = "/tmp/vlc.sock"
command = sys.argv
print "try: %s help\n" % sys.argv
s = socket.socket(socket.AF_UNIX)
s.send("%s\r" % command)
out = ""
line = s.recv(1024)
out += line
if line == "":