app.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:arithmancer 作者: google 项目源码 文件源码
def name(self):
        """The name of the application.  This is usually the import name
        with the difference that it's guessed from the run file if the
        import name is main.  This name is used as a display name when
        Flask needs the name of the application.  It can be set and overridden
        to change the value.

        .. versionadded:: 0.8
        """
        if self.import_name == '__main__':
            fn = getattr(sys.modules['__main__'], '__file__', None)
            if fn is None:
                return '__main__'
            return os.path.splitext(os.path.basename(fn))[0]
        return self.import_name
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号