#!<<PYTHON>>
##############################################################################
#
# Copyright (c) 2004 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Simple script for creation of a principal.

$Id: zpasswd.in 39687 2005-10-28 10:14:24Z hdima $
"""

import os
import sys

SOFTWARE_HOME = r"<<SOFTWARE_HOME>>"
INSTANCE_HOME = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))

if __name__ == "__main__":
    # This removes the script directory from sys.path, which we do
    # since there are no modules here.
    basepath = [path for path in sys.path if path]

    sys.path[:] = [os.path.join(INSTANCE_HOME, "lib", "python"),
                   SOFTWARE_HOME] + basepath

    from zope.app.server.zpasswd import main

    sys.exit(main())
