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


Python Config.debug方法代码示例

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


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

示例1: dump_float

# 需要导入模块: from Config import Config [as 别名]
# 或者: from Config.Config import debug [as 别名]
def dump_float(self, obj, tag, typed = 1, ns_map = {}):
        if Config.debug: print "In dump_float."
        tag = tag or self.gentag()

        tag = toXMLname(tag) # convert from SOAP 1.2 XML name encoding

        if Config.strict_range:
            doubleType(obj)

        if fpconst.isPosInf(obj):
            obj = "INF"
        elif fpconst.isNegInf(obj):
            obj = "-INF"
        elif fpconst.isNaN(obj):
            obj = "NaN"
        else:
            obj = repr(obj)

        # Note: python 'float' is actually a SOAP 'double'.
        self.out.append(self.dumper(
            None, "double", obj, tag, typed, ns_map, self.genroot(ns_map))) 
开发者ID:amarian12,项目名称:p2pool-bch,代码行数:23,代码来源:SOAPBuilder.py

示例2: dump_dictionary

# 需要导入模块: from Config import Config [as 别名]
# 或者: from Config.Config import debug [as 别名]
def dump_dictionary(self, obj, tag, typed = 1, ns_map = {}):
        if Config.debug: print "In dump_dictionary."
        tag = tag or self.gentag()
        tag = toXMLname(tag) # convert from SOAP 1.2 XML name encoding

        id = self.checkref(obj, tag, ns_map)
        if id == None:
            return

        try: a = obj._marshalAttrs(ns_map, self)
        except: a = ''

        self.out.append('<%s%s%s%s>\n' % 
                        (tag, id, a, self.genroot(ns_map)))

        for (k, v) in obj.items():
            if k[0] != "_":
                self.dump(v, k, 1, ns_map)

        self.out.append('</%s>\n' % tag) 
开发者ID:amarian12,项目名称:p2pool-bch,代码行数:22,代码来源:SOAPBuilder.py

示例3: gentag

# 需要导入模块: from Config import Config [as 别名]
# 或者: from Config.Config import debug [as 别名]
def gentag(self):
        if Config.debug: print "In gentag."
        self.tcounter += 1
        return "v%d" % self.tcounter 
开发者ID:amarian12,项目名称:p2pool-bch,代码行数:6,代码来源:SOAPBuilder.py

示例4: dump

# 需要导入模块: from Config import Config [as 别名]
# 或者: from Config.Config import debug [as 别名]
def dump(self, obj, tag = None, typed = 1, ns_map = {}):
        if Config.debug: print "In dump.", "obj=", obj
        ns_map = ns_map.copy()
        self.depth += 1

        if type(tag) not in (NoneType, StringType, UnicodeType):
            raise KeyError, "tag must be a string or None"

        self.dump_dispatch(obj, tag, typed, ns_map)
        self.depth -= 1

    # generic dumper 
开发者ID:amarian12,项目名称:p2pool-bch,代码行数:14,代码来源:SOAPBuilder.py

示例5: dumper

# 需要导入模块: from Config import Config [as 别名]
# 或者: from Config.Config import debug [as 别名]
def dumper(self, nsURI, obj_type, obj, tag, typed = 1, ns_map = {},
               rootattr = '', id = '',
               xml = '<%(tag)s%(type)s%(id)s%(attrs)s%(root)s>%(data)s</%(tag)s>\n'):
        if Config.debug: print "In dumper."

        if nsURI == None:
            nsURI = self.config.typesNamespaceURI

        tag = tag or self.gentag()

        tag = toXMLname(tag) # convert from SOAP 1.2 XML name encoding

        a = n = t = ''
        if typed and obj_type:
            ns, n = self.genns(ns_map, nsURI)
            ins = self.genns(ns_map, self.config.schemaNamespaceURI)[0]
            t = ' %stype="%s%s"%s' % (ins, ns, obj_type, n)

        try: a = obj._marshalAttrs(ns_map, self)
        except: pass

        try: data = obj._marshalData()
        except:
            if (obj_type != "string"): # strings are already encoded
                data = cgi.escape(str(obj))
            else:
                data = obj



        return xml % {"tag": tag, "type": t, "data": data, "root": rootattr,
            "id": id, "attrs": a} 
开发者ID:amarian12,项目名称:p2pool-bch,代码行数:34,代码来源:SOAPBuilder.py

示例6: dump_int

# 需要导入模块: from Config import Config [as 别名]
# 或者: from Config.Config import debug [as 别名]
def dump_int(self, obj, tag, typed = 1, ns_map = {}):
        if Config.debug: print "In dump_int."
        self.out.append(self.dumper(None, 'integer', obj, tag, typed,
                                     ns_map, self.genroot(ns_map))) 
开发者ID:amarian12,项目名称:p2pool-bch,代码行数:6,代码来源:SOAPBuilder.py

示例7: dump_string

# 需要导入模块: from Config import Config [as 别名]
# 或者: from Config.Config import debug [as 别名]
def dump_string(self, obj, tag, typed = 0, ns_map = {}):
        if Config.debug: print "In dump_string."
        tag = tag or self.gentag()
        tag = toXMLname(tag) # convert from SOAP 1.2 XML name encoding

        id = self.checkref(obj, tag, ns_map)
        if id == None:
            return

        try: data = obj._marshalData()
        except: data = obj

        self.out.append(self.dumper(None, "string", cgi.escape(data), tag,
                                    typed, ns_map, self.genroot(ns_map), id)) 
开发者ID:amarian12,项目名称:p2pool-bch,代码行数:16,代码来源:SOAPBuilder.py

示例8: dump_None

# 需要导入模块: from Config import Config [as 别名]
# 或者: from Config.Config import debug [as 别名]
def dump_None(self, obj, tag, typed = 0, ns_map = {}):
        if Config.debug: print "In dump_None."
        tag = tag or self.gentag()
        tag = toXMLname(tag) # convert from SOAP 1.2 XML name encoding
        ns = self.genns(ns_map, self.config.schemaNamespaceURI)[0]

        self.out.append('<%s %snull="1"%s/>\n' %
                        (tag, ns, self.genroot(ns_map))) 
开发者ID:amarian12,项目名称:p2pool-bch,代码行数:10,代码来源:SOAPBuilder.py


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