当前位置: 首页>>代码示例>>Python>>正文


Python LDIFParser.__init__方法代码示例

本文整理汇总了Python中ldif.LDIFParser.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python LDIFParser.__init__方法的具体用法?Python LDIFParser.__init__怎么用?Python LDIFParser.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ldif.LDIFParser的用法示例。


在下文中一共展示了LDIFParser.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from ldif import LDIFParser [as 别名]
# 或者: from ldif.LDIFParser import __init__ [as 别名]
 def __init__(self,input,output,root,ns1,ns2,outputdir='.'):
    LDIFParser.__init__(self,input)
    rantoday = open('.rantoday', 'r')
    try:
        serial = rantoday.readline()
        print serial
        if serial != '': 
            serial = int(serial) 
        else: 
            serial = 0
        serialNum = serial + 1
        rantoday.close()
        rantoday = open('.rantoday', 'w+')
        rantoday.write(str(serialNum))
        print serialNum
        rantoday.close()
    except IOError:
        exit("couldn't read local directory, to create a .rantoday file to help counting the reruns to get the serial to increase")
    self.serial = serialNum       
    self.writer = LDIFWriter(output)
    self.megaArray = {}
    self.cnamed = []
    self.valueInEntries = []
    self.megaTree = {}
    self.subDomainRecords = {}
    self.root = root
    self.ns1 = ns1
    self.ns2 = ns2
    self.zoneSubDirectory = outputdir
    self.megaWeirdArray= {}
    self.zoneArray = {}
    self.zoneArray = {}
    self.managedZones = {}
    self.exempted = {2: ['co.uk', 'org.ua', 'com.ar']}
开发者ID:GuillaumeFromage,项目名称:ldif2zones,代码行数:36,代码来源:ldif2zone.py

示例2: __init__

# 需要导入模块: from ldif import LDIFParser [as 别名]
# 或者: from ldif.LDIFParser import __init__ [as 别名]
 def __init__(self, input, output):
     LDIFParser.__init__(self, input)
     self.targetDN = None
     self.targetAttr = None
     self.targetEntry = None
     self.DNs = []
     self.lastDN = None
     self.lastEntry = None
开发者ID:GluuFederation,项目名称:community-edition-setup,代码行数:10,代码来源:import23.py

示例3: __init__

# 需要导入模块: from ldif import LDIFParser [as 别名]
# 或者: from ldif.LDIFParser import __init__ [as 别名]
 def __init__(self, input_fd):
     LDIFParser.__init__(self, input_fd)
     self.DNs = []
     self.entries = {}
     self.inumOrg = None
     self.inumOrg_dn = None
     self.inumApllience = None
     self.inumApllience_dn = None
开发者ID:GluuFederation,项目名称:community-edition-setup,代码行数:10,代码来源:remove_inum.py

示例4: __init__

# 需要导入模块: from ldif import LDIFParser [as 别名]
# 或者: from ldif.LDIFParser import __init__ [as 别名]
  def __init__(self, input, vipGroups, debug=False):

    self.vipGroups = {}
    for g in vipGroups:
      self.vipGroups[g] = []

    self.debug = debug
    LDIFParser.__init__(self, input)
开发者ID:pamapa,项目名称:python-fritzbox,代码行数:10,代码来源:LDIF.py

示例5: __init__

# 需要导入模块: from ldif import LDIFParser [as 别名]
# 或者: from ldif.LDIFParser import __init__ [as 别名]
 def __init__(self, infile=None, outfile=None):
     if infile:
         self._if = open(infile, "r")
     else:
         self._if = sys.stdin
     if outfile:
         self._of = open(outfile, "w")
     else:
         self._of = sys.stdout
     LDIFParser.__init__(self, self._if)
开发者ID:syakesaba,项目名称:john,代码行数:12,代码来源:ldif2john.py

示例6: __init__

# 需要导入模块: from ldif import LDIFParser [as 别名]
# 或者: from ldif.LDIFParser import __init__ [as 别名]
 def __init__(self, input, output, keep_dn=False):
     LDIFParser.__init__(self, input)
     self.keep_dn = keep_dn
     self.targetDN = None
     self.targetAttr = None
     self.targetEntry = None
     self.DNs = []
     self.lastDN = None
     self.lastEntry = None
     self.entries = []
     self.dn_entry = []
开发者ID:GluuFederation,项目名称:community-edition-setup,代码行数:13,代码来源:export3031.py

示例7: __init__

# 需要导入模块: from ldif import LDIFParser [as 别名]
# 或者: from ldif.LDIFParser import __init__ [as 别名]
    def __init__(self, ldif_fil, ldif_entries):
        """
        `ldif_fil`: The file-like object from which to read ldif
        entries.

        `ldif_entries`: the queue into which to dump the entries as
        DnEntry namedtuples.
        """
        LDIFParser.__init__(self, ldif_fil)
        self.ldif_entries = ldif_entries
        self.sort_enforcer = SortEnforcer()
开发者ID:Bitlancer,项目名称:strings-datasync,代码行数:13,代码来源:ldiff.py

示例8: __init__

# 需要导入模块: from ldif import LDIFParser [as 别名]
# 或者: from ldif.LDIFParser import __init__ [as 别名]
 def __init__(self, input, output, settings, clients_ldif=None, editor=None):
     LDIFParser.__init__(self, input)
     self.domains = {}
     self.domains_lookup = (
         clients_ldif.domains_lookup if clients_ldif else None
     )
     self.editor = editor
     self.a_record_ips = set([])
     self.a_record_hosts = {}
     self.server = Server(settings.couchdb_uri)
     self.db = self.server.get_db(settings.couchdb_db)
开发者ID:yvess,项目名称:desk,代码行数:13,代码来源:importer.py

示例9: __init__

# 需要导入模块: from ldif import LDIFParser [as 别名]
# 或者: from ldif.LDIFParser import __init__ [as 别名]
	def __init__(self, input_name, replacement_table=None):

		replacement_table = replacement_table if replacement_table else {}

		# we must keep this one handy because the LDIFParser
		# will not access it immediately, and it must stay open.
		self.stringio = cStringIO.StringIO()

		with open('%s/schemas/%s.ldif'
				% ('/usr/share/licorn', input_name), 'rb') as ldapf:

			data = ldapf.read()
			for key, value in replacement_table.iteritems():
				data = data.replace(key, value)

			self.stringio.write(data)
			self.stringio.seek(0)

		LDIFParser.__init__(self, self.stringio)

		#print '%s/schemas/%s.ldif' % (
		#	os.path.dirname(__file__),input_name)

		self.ldap_data = []
开发者ID:Licorn,项目名称:licorn,代码行数:26,代码来源:ldaputils.py

示例10: __init__

# 需要导入模块: from ldif import LDIFParser [as 别名]
# 或者: from ldif.LDIFParser import __init__ [as 别名]
 def __init__(self,input,output):
     LDIFParser.__init__(self,input)
     self.writer = LDIFWriter(output)
开发者ID:GluuFederation,项目名称:community-edition-setup,代码行数:5,代码来源:update_config.py

示例11: __init__

# 需要导入模块: from ldif import LDIFParser [as 别名]
# 或者: from ldif.LDIFParser import __init__ [as 别名]
 def __init__(self, input, output, password):
     LDIFParser.__init__(self, input)
     self.writer = LDIFWriter(output)
     self.password = password
开发者ID:chenjie4255,项目名称:active-directory-to-openldap,代码行数:6,代码来源:add-default-user-password.py

示例12: __init__

# 需要导入模块: from ldif import LDIFParser [as 别名]
# 或者: from ldif.LDIFParser import __init__ [as 别名]
 def __init__(self, input, output):
     LDIFParser.__init__(self, input)
     self.writer = OpenLdapSchemaWriter(output)
开发者ID:chenjie4255,项目名称:active-directory-to-openldap,代码行数:5,代码来源:ad-schema-to-open-ldap.py

示例13: __init__

# 需要导入模块: from ldif import LDIFParser [as 别名]
# 或者: from ldif.LDIFParser import __init__ [as 别名]
 def __init__(self, descriptor):
     self.users = {}
     LDIFParser.__init__(self, descriptor)
开发者ID:eaudeweb,项目名称:naaya.edw.circaimport,代码行数:5,代码来源:ldif_extract.py

示例14: __init__

# 需要导入模块: from ldif import LDIFParser [as 别名]
# 或者: from ldif.LDIFParser import __init__ [as 别名]
 def __init__(self, inputFile, group):
     LDIFParser.__init__(self, inputFile)
     self.group = SysGroup.objects.get(group_name=group)
     self.PROCESS_ONLY = 'CN=Users,DC=zsplana,DC=cz'
开发者ID:vencax,项目名称:django-sql-nss-admin,代码行数:6,代码来源:import_from_ldif_OU_based.py

示例15: __init__

# 需要导入模块: from ldif import LDIFParser [as 别名]
# 或者: from ldif.LDIFParser import __init__ [as 别名]
 def __init__(self, fobj):
     LDIFParser.__init__(self, fobj)
开发者ID:umax,项目名称:diabetto,代码行数:4,代码来源:test_ldif.py


注:本文中的ldif.LDIFParser.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。