# mayasocket.py
# Many thanks to Hosuk Chang for providing me with this script.
# Malcolm Kesson
# 18 Jan 2012
  
import socket
  
def source(melpath, port):
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sock.connect(("localhost", int(port)))
    sock.send('source "%s";' % melpath)