ed@448: #!/usr/bin/env python ed@448: # -*- coding: utf-8 -*- ed@448: # ed@448: #Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD ed@448: # ed@448: #See COPYING file for copyrights details. ed@448: # ed@448: #This library is free software; you can redistribute it and/or ed@448: #modify it under the terms of the GNU General Public ed@448: #License as published by the Free Software Foundation; either ed@448: #version 2.1 of the License, or (at your option) any later version. ed@448: # ed@448: #This library is distributed in the hope that it will be useful, ed@448: #but WITHOUT ANY WARRANTY; without even the implied warranty of ed@448: #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ed@448: #General Public License for more details. ed@448: # ed@448: #You should have received a copy of the GNU General Public ed@448: #License along with this library; if not, write to the Free Software ed@448: #Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ed@448: edouard@508: permanant_connector = None ed@448: ed@448: def LPC_connector_factory(uri, pluginsroot): ed@448: """ ed@448: This returns the connector to LPC style PLCobject ed@448: """ laurent@523: from LPCObject import LPCObject edouard@508: global permanant_connector edouard@520: servicetype, location = uri.split("://") edouard@508: if permanant_connector is None: edouard@508: permanant_connector = LPCObject(pluginsroot,location) edouard@508: else: edouard@508: permanant_connector.UpdateLocation(location) edouard@508: return permanant_connector ed@448: ed@448: