summary refs log blame commit diff stats
path: root/doc/pydoc/ranger.container.bookmarks.html
blob: bf0bec973ce9952f6e19ec288a43015582316449 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
 

                                                                    






                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                 












                                                                                                                                          

















                                                                                                               
                                                                                          









                                                                                                   
                                                                                                                                                                                 





                                                                                                                                                     
                                                                                                                                                       









                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                              

                                                     

                                                                                  










                                                                                                                                                                                  
                                                                                                                                                                                                 






















                                                                                                                                                               
                                                                                        
 








                                                                                                                                     
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module ranger.container.bookmarks</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="ranger.html"><font color="#ffffff">ranger</font></a>.<a href="ranger.container.html"><font color="#ffffff">container</font></a>.bookmarks</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/hut/ranger/ranger/container/bookmarks.py">/home/hut/ranger/ranger/container/bookmarks.py</a></font></td></tr></table>
    <p><tt>#&nbsp;Copyright&nbsp;(c)&nbsp;2009,&nbsp;2010&nbsp;hut&nbsp;&lt;hut@lavabit.com&gt;<br>
#<br>
#&nbsp;Permission&nbsp;to&nbsp;use,&nbsp;copy,&nbsp;modify,&nbsp;and/or&nbsp;distribute&nbsp;this&nbsp;software&nbsp;for&nbsp;any<br>
#&nbsp;purpose&nbsp;with&nbsp;or&nbsp;without&nbsp;fee&nbsp;is&nbsp;hereby&nbsp;granted,&nbsp;provided&nbsp;that&nbsp;the&nbsp;above<br>
#&nbsp;copyright&nbsp;notice&nbsp;and&nbsp;this&nbsp;permission&nbsp;notice&nbsp;appear&nbsp;in&nbsp;all&nbsp;copies.<br>
#<br>
#&nbsp;THE&nbsp;SOFTWARE&nbsp;IS&nbsp;PROVIDED&nbsp;"AS&nbsp;IS"&nbsp;AND&nbsp;THE&nbsp;AUTHOR&nbsp;DISCLAIMS&nbsp;ALL&nbsp;WARRANTIES<br>
#&nbsp;WITH&nbsp;REGARD&nbsp;TO&nbsp;THIS&nbsp;SOFTWARE&nbsp;INCLUDING&nbsp;ALL&nbsp;IMPLIED&nbsp;WARRANTIES&nbsp;OF<br>
#&nbsp;MERCHANTABILITY&nbsp;AND&nbsp;FITNESS.&nbsp;IN&nbsp;NO&nbsp;EVENT&nbsp;SHALL&nbsp;THE&nbsp;AUTHOR&nbsp;BE&nbsp;LIABLE&nbsp;FOR<br>
#&nbsp;ANY&nbsp;SPECIAL,&nbsp;DIRECT,&nbsp;INDIRECT,&nbsp;OR&nbsp;CONSEQUENTIAL&nbsp;DAMAGES&nbsp;OR&nbsp;ANY&nbsp;DAMAGES<br>
#&nbsp;WHATSOEVER&nbsp;RESULTING&nbsp;FROM&nbsp;LOSS&nbsp;OF&nbsp;USE,&nbsp;DATA&nbsp;OR&nbsp;PROFITS,&nbsp;WHETHER&nbsp;IN&nbsp;AN<br>
#&nbsp;ACTION&nbsp;OF&nbsp;CONTRACT,&nbsp;NEGLIGENCE&nbsp;OR&nbsp;OTHER&nbsp;TORTIOUS&nbsp;ACTION,&nbsp;ARISING&nbsp;OUT&nbsp;OF<br>
#&nbsp;OR&nbsp;IN&nbsp;CONNECTION&nbsp;WITH&nbsp;THE&nbsp;USE&nbsp;OR&nbsp;PERFORMANCE&nbsp;OF&nbsp;THIS&nbsp;SOFTWARE.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="os.html">os</a><br>
</td><td width="25%" valign=top><a href="re.html">re</a><br>
</td><td width="25%" valign=top><a href="string.html">string</a><br>
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="ranger.container.bookmarks.html#Bookmarks">Bookmarks</a>
</font></dt></dl>
</dd>
</dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Bookmarks">class <strong>Bookmarks</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt><a href="#Bookmarks">Bookmarks</a>&nbsp;is&nbsp;a&nbsp;container&nbsp;which&nbsp;associates&nbsp;keys&nbsp;with&nbsp;bookmarks.<br>
&nbsp;<br>
A&nbsp;key&nbsp;is&nbsp;a&nbsp;string&nbsp;with:&nbsp;len(key)&nbsp;==&nbsp;1&nbsp;and&nbsp;key&nbsp;in&nbsp;ALLOWED_KEYS.<br>
&nbsp;<br>
A&nbsp;bookmark&nbsp;is&nbsp;an&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;with:&nbsp;bookmark&nbsp;==&nbsp;bookmarktype(str(instance))<br>
Which&nbsp;is&nbsp;true&nbsp;for&nbsp;str&nbsp;or&nbsp;FileSystemObject.&nbsp;This&nbsp;condition&nbsp;is&nbsp;required<br>
so&nbsp;bookmark-objects&nbsp;can&nbsp;be&nbsp;saved&nbsp;to&nbsp;and&nbsp;loaded&nbsp;from&nbsp;a&nbsp;file.<br>
&nbsp;<br>
Optionally,&nbsp;a&nbsp;bookmark.go()&nbsp;method&nbsp;is&nbsp;used&nbsp;for&nbsp;entering&nbsp;a&nbsp;bookmark.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Bookmarks-__contains__"><strong>__contains__</strong></a>(self, key)</dt><dd><tt>Test&nbsp;whether&nbsp;a&nbsp;bookmark-key&nbsp;is&nbsp;defined</tt></dd></dl>

<dl><dt><a name="Bookmarks-__getitem__"><strong>__getitem__</strong></a>(self, key)</dt><dd><tt>Get&nbsp;the&nbsp;bookmark&nbsp;associated&nbsp;with&nbsp;the&nbsp;key</tt></dd></dl>

<dl><dt><a name="Bookmarks-__init__"><strong>__init__</strong></a>(self, bookmarkfile, bookmarktype<font color="#909090">=&lt;type 'str'&gt;</font>, autosave<font color="#909090">=False</font>)</dt><dd><tt>&lt;bookmarkfile&gt;&nbsp;specifies&nbsp;the&nbsp;path&nbsp;to&nbsp;the&nbsp;file&nbsp;where<br>
bookmarks&nbsp;are&nbsp;saved&nbsp;in.</tt></dd></dl>

<dl><dt><a name="Bookmarks-__iter__"><strong>__iter__</strong></a>(self)</dt></dl>

<dl><dt><a name="Bookmarks-__setitem__"><strong>__setitem__</strong></a>(self, key, value)</dt><dd><tt>Bookmark&nbsp;&lt;value&gt;&nbsp;to&nbsp;the&nbsp;key&nbsp;&lt;key&gt;.<br>
key&nbsp;is&nbsp;expected&nbsp;to&nbsp;be&nbsp;a&nbsp;1-character&nbsp;string&nbsp;and&nbsp;element&nbsp;of&nbsp;ALLOWED_KEYS.<br>
value&nbsp;is&nbsp;expected&nbsp;to&nbsp;be&nbsp;a&nbsp;filesystemobject.</tt></dd></dl>

<dl><dt><a name="Bookmarks-delete"><strong>delete</strong></a>(self, key)</dt><dd><tt>Delete&nbsp;the&nbsp;bookmark&nbsp;with&nbsp;the&nbsp;given&nbsp;key</tt></dd></dl>

<dl><dt><a name="Bookmarks-enter"><strong>enter</strong></a>(self, key)</dt><dd><tt>Enter&nbsp;the&nbsp;bookmark&nbsp;with&nbsp;the&nbsp;given&nbsp;key.<br>
Requires&nbsp;the&nbsp;bookmark&nbsp;instance&nbsp;to&nbsp;have&nbsp;a&nbsp;go()&nbsp;method.</tt></dd></dl>

<dl><dt><a name="Bookmarks-load"><strong>load</strong></a>(self)</dt><dd><tt>Load&nbsp;the&nbsp;bookmarks&nbsp;from&nbsp;path/bookmarks</tt></dd></dl>

<dl><dt><a name="Bookmarks-remember"><strong>remember</strong></a>(self, value)</dt><dd><tt><a href="#Bookmarks">Bookmarks</a>&nbsp;&lt;value&gt;&nbsp;to&nbsp;the&nbsp;key&nbsp;'</tt></dd></dl>

<dl><dt><a name="Bookmarks-save"><strong>save</strong></a>(self)</dt><dd><tt>Save&nbsp;the&nbsp;bookmarks&nbsp;to&nbsp;the&nbsp;bookmarkfile.<br>
This&nbsp;is&nbsp;done&nbsp;automatically&nbsp;after&nbsp;every&nbsp;modification&nbsp;if&nbsp;autosave&nbsp;is&nbsp;True.</tt></dd></dl>

<dl><dt><a name="Bookmarks-update"><strong>update</strong></a>(self)</dt><dd><tt>Update&nbsp;the&nbsp;bookmarks&nbsp;from&nbsp;the&nbsp;bookmark&nbsp;file.<br>
Useful&nbsp;if&nbsp;two&nbsp;instances&nbsp;are&nbsp;running&nbsp;which&nbsp;define&nbsp;different&nbsp;bookmarks.</tt></dd></dl>

<dl><dt><a name="Bookmarks-update_if_outdated"><strong>update_if_outdated</strong></a>(self)</dt></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>autosave</strong> = True</dl>

<dl><dt><strong>last_mtime</strong> = None</dl>

<dl><dt><strong>load_pattern</strong> = &lt;_sre.SRE_Pattern object at 0xec7430&gt;</dl>

</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>ALLOWED_KEYS</strong> = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789`'"</td></tr></table>
</body></html>