³ò K“BFc@s1dZdd„Zd„Zd„Zd„ZdS(sJ This module exposes a set of functions used to store and retrieve information about the state, size and position of text editor windows to and from a database. @author: Lateef Alabi-Oki @organization: The Scribes Project @copyright: Copyright © 2005 Lateef Alabi-Oki @license: GNU GPLv2 or Later @contact: mystilleef@gmail.com tccCsÆddkl}ddkl}|i|ƒpddkl}||ƒn|d}ddkl}ddkl }y||d|d t ƒ}Wn+|j o||dd d t ƒ}nX|S( sƒ Open the position database. @return: A database object representing the bookmark database. @rtype: A database Shelve object. iÿÿÿÿ(tmetadata_folder(tpath(tmakedirss bookmark.gdb(topen(terrortflagt writebacktn( t SCRIBES.infoRtosRtexistsRtshelveRtanydbmRtFalse(RRRRt database_fileRRtdatabase((s$plugins/Bookmark/BookmarkMetadata.pytopen_bookmark_database s cCs|iƒdS(s| Close the position database. @param database: The bookmark database object. @type database: A database Shelve object. N(tclose(R((s$plugins/Bookmark/BookmarkMetadata.pytclose_bookmark_database5s cCsHd}tdƒ}y||}t|ƒWnd}t|ƒnX|S(s· Get the window postion of the text editor associated with a URI. @param uri: A universal resource identifier representing, or pointing to, a file. @type uri: A String object. trN(tNoneRR(turit bookmarksR((s$plugins/Bookmark/BookmarkMetadata.pytget_bookmarks_from_database?s  cCs$tdƒ}|||s