def snap(mainmodule, snapshot): import os # XXX raises an exception in Windows if oldsnapshot exists # XXX should never overwrite old snapshots name = snapshot.__name__ # mainmodule.upgrade() os.rename(name + '.py', 'old' + name) doss.serialize(mainmodule.get_system(), mainmodule.get_module_names_used_persistently(), file(name + '.py', 'w'))
def main(): try: start() except KeyboardInterrupt: print '^C received, shutting down server' server.socket.close() import os # XXX raises an exception in Windows if oldsnapshot exists # XXX should never overwrite old snapshots os.rename('snapshot.py', 'oldsnapshot') doss.serialize(registry.get_system(), file('snapshot.py', 'w'))
def main(): try: start() except KeyboardInterrupt: print('^C received, shutting down server') server.socket.close() import os # XXX raises an exception in Windows if oldsnapshot exists # XXX should never overwrite old snapshots os.rename('snapshot.py', 'oldsnapshot') doss.serialize(registry.get_system(), open('snapshot.py', 'w'))
def log(self): # XXX quick hack import doss doss.serialize(self, ("sniki",), file("changes.py", "a"))