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


Python pydevd_vars.varToXML函数代码示例

本文整理汇总了Python中pydevd_vars.varToXML函数的典型用法代码示例。如果您正苦于以下问题:Python varToXML函数的具体用法?Python varToXML怎么用?Python varToXML使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: doIt

    def doIt(self, dbg):
        """ Converts request into python variable """
        pydev_start_new_thread = None
        try:
            try:
                pydev_start_new_thread = thread.start_new_thread

                thread.start_new_thread = thread._original_start_new_thread #don't trace new threads created by console command
                thread.start_new = thread._original_start_new_thread

                result = pydevconsole.consoleExec(self.thread_id, self.frame_id, self.expression)
                xml = "<xml>"
                xml += pydevd_vars.varToXML(result, "")
                xml += "</xml>"
                cmd = dbg.cmdFactory.makeEvaluateExpressionMessage(self.sequence, xml)
                dbg.writer.addCommand(cmd)
            except:
                exc = GetExceptionTracebackStr()
                sys.stderr.write('%s\n' % (exc,))
                cmd = dbg.cmdFactory.makeErrorMessage(self.sequence, "Error evaluating console expression " + exc)
                dbg.writer.addCommand(cmd)
        finally:
            thread.start_new_thread = pydev_start_new_thread
            thread.start_new = pydev_start_new_thread
            sys.stderr.flush()
            sys.stdout.flush()
开发者ID:GaleDragon,项目名称:intellij-community,代码行数:26,代码来源:pydevd_comm.py

示例2: evaluate

    def evaluate(self, expression):
        xml = "<xml>"
        result = pydevd_vars.evalInContext(expression, self.getNamespace(), self.getNamespace())

        xml += pydevd_vars.varToXML(result, expression)

        xml += "</xml>"

        return xml
开发者ID:ArcherSys,项目名称:DevRake,代码行数:9,代码来源:pydev_console_utils.py

示例3: doIt

 def doIt(self, dbg):
     """ Converts request into python variable """
     try:
         result = pydevd_vars.evaluateExpression(self.thread_id, self.frame_id, self.expression, self.doExec)
         xml = "<xml>"
         xml += pydevd_vars.varToXML(result, "")
         xml += "</xml>"
         cmd = dbg.cmdFactory.makeEvaluateExpressionMessage(self.sequence, xml)
         dbg.writer.addCommand(cmd)
     except:
         exc = GetExceptionTracebackStr()
         print >> sys.stderr, exc
         cmd = dbg.cmdFactory.makeErrorMessage(self.sequence, "Error evaluating expression " + exc)
         dbg.writer.addCommand(cmd)
开发者ID:DexterW,项目名称:django-webservice-tools,代码行数:14,代码来源:pydevd_comm.py


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