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


Python ObjectDict.order方法代码示例

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


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

示例1: _form_upload_post

# 需要导入模块: from tornado.util import ObjectDict [as 别名]
# 或者: from tornado.util.ObjectDict import order [as 别名]

#.........这里部分代码省略.........
            LOGGER.warn("setting 'attachment_path' not found")
            ctx.errors._global = "Attachment directory not specified"
            send_status(500, ctx)
            return


        try:
            yield data.validate_model(ctx.model)
        except Exception as e:
            LOGGER.error("model validation error: %s", e)
            ctx.errors._global = "Model validation error"
            send_status(500, ctx)
            return

        idx = -1
        if outputMode in [1, 2]:
            # First line of data file is initial
            # values BEFORE the first element.
            idx = 0

        model_elements = []

        lattice_elements = yield data.find_lattice_elements_by_lattice_id(
                                                        ctx.model.lattice_id)

        for lattice_element in lattice_elements:

            for p in lattice_element.properties:
                if p.name == "ITYPE":
                    elem_itype =  p.value
                    break
            else:
                ctx.errors._global = ("Lattice Element ({}) missing ITYPE property"
                                                    .format(lattice_element.order))
                send_status(400, ctx)
                return

            for p in lattice_element.properties:
                if p.name == "STEPS":
                    elem_steps =  p.value
                    break
            else:
                ctx.errors._global = ("Lattice Element ({}) missing STEPS property"
                                                    .format(lattice_element.order))
                send_status(400, ctx)
                return

            if outputMode in [1, 2]:
                loop = elem_steps
                if elem_itype in [ -2, 4 ]:
                    # no output for these elements
                    loop = 0
                elif elem_itype < 0:
                    loop = elem_steps + 1
            elif outputMode in [3, 4]:
                loop = 0
                if elem_itype == -28:
                    # only output from monitor
                    loop = 1
            elif outputMode in [5, 6]:
                loop = 1

            for _ in range(loop):

                idx += 1
开发者ID:frib-high-level-controls,项目名称:phyhlc,代码行数:69,代码来源:impact.py


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