本文整理汇总了Python中ZODB.FileStorage.FileStorage._is_read_only方法的典型用法代码示例。如果您正苦于以下问题:Python FileStorage._is_read_only方法的具体用法?Python FileStorage._is_read_only怎么用?Python FileStorage._is_read_only使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ZODB.FileStorage.FileStorage
的用法示例。
在下文中一共展示了FileStorage._is_read_only方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: eval
# 需要导入模块: from ZODB.FileStorage import FileStorage [as 别名]
# 或者: from ZODB.FileStorage.FileStorage import _is_read_only [as 别名]
zeo_client = eval(os.fdopen(r).read())
continue
else:
node_pid_list = activity_node = None
os.close(r)
signal.signal(signal.SIGINT, signal.SIG_IGN)
elif activity_node is not None:
# run ZEO server but no need to fork
zeo_server_pid = 0
else:
cluster = False
if save:
Storage = FileStorage(data_fs_path)
elif load:
Storage = FileStorage(data_fs_path, read_only=True)
Storage._is_read_only = False # XXX for Zope 2.8
Storage = DemoStorage(base=Storage)
else:
Storage = DemoStorage()
break
else:
forkNodes()
# Zope 2.12: do not import ClientStorage
# before forking due to client trigger
from ZEO.ClientStorage import ClientStorage
Storage = ClientStorage(zeo_client)
if node_pid_list is not None:
_print("Instance at %r loaded ... " % instance_home)