]> khamidou — GitHub mirrors - imapclient.git/commitdiff
doc updates to cover interact and livetest changes
authorMenno Smits <menno@freshfoo.com>
Tue, 8 Nov 2011 22:13:56 +0000 (22:13 +0000)
committerMenno Smits <menno@freshfoo.com>
Tue, 8 Nov 2011 22:13:56 +0000 (22:13 +0000)
NEWS
README
doc/src/index.rst

diff --git a/NEWS b/NEWS
index 7af777496c2719fc3a6857efb725ff5798ed5f1f..ba0d20d20edeb4d158921952d7347c1118e22a40 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -34,6 +34,10 @@ Renaming of folders was an obvious omission!
 Minor Features
 --------------
 * interact.py can now read livetest.py INI files (#66)
+* interact.py can now embed shells from ipython 0.10 and 0.11 (#98)
+* interact.py and livetest.py are now inside the imapclient package so
+  they can be used even when IMAClient has been installed from PyPI
+  (#82)
 * Added "debug" propety and setting of a log file (#90)
 * "normalise_times" attribute allows caller to select whether
   datetimes returned by fetch() are native or not (#96) (Thanks Andrew
diff --git a/README b/README
index 5f922c25d44f64d9c0e13eea4f58c709100cfcfe..3673f6efcb0c40f62f6830126a14752558c2fc68 100644 (file)
--- a/README
+++ b/README
@@ -110,6 +110,12 @@ steps required to set up an IMAPClient instance.
 The IPython shell is used if it is installed. Otherwise the
 code.interact() function from the standard library is used.
 
+The interact functionality can also be accessed like this:
+
+    python -m imapclient.interact ...
+
+This works when IMAPClient has been installed from PyPI.
+
 
 livetest.py
 -----------
@@ -131,6 +137,12 @@ to run successfully against a particular IMAP server. Reports of
 successful runs are also welcome.  Please include the type and version
 of the IMAP server.
 
+The livetest functionality can also be accessed like this:
+
+    python -m imapclient.livetest ...
+
+This works when IMAPClient has been installed from PyPI.
+
 
 Unit Tests
 ----------
index 7054e2c20d17b600c3a51485bcac05ce34a23a2a..b893dcb31451d0a82b2f97252928d76280bd6ee7 100644 (file)
@@ -152,4 +152,53 @@ IMAPClient instance.
 .. autoclass:: imapclient.IMAPClient
    :members:
 
-
+Interactive Sessions
+--------------------
+When developing program using IMAPClient is it sometimes useful to
+have an interactive shell to play with. IMAPClient ships with a module
+that lets you fire up an interactive shell with an IMAPClient instance
+connected to an IMAP server.
+
+Start a session like this::
+
+   python -m imapclient.interact -H <host> -u <user> ...
+
+Various options are available to specify the IMAP server details. See
+the help (--help) for more details. You'll be prompted for a username
+and password if one isn't provided on the command line.
+
+If installed, IPython will be used as the embedded shell. Otherwise
+the basic built-in Python shell will be used.
+
+Here's an example session::
+
+    $ python -m imapclient.interact -H <host> -u <user> ...
+    Connecting...
+    Connected.
+
+    IMAPClient instance is "c"
+    In [1]: c.select_folder('inbox')
+    Out[1]: 
+    {'EXISTS': 2,
+     'FLAGS': ('\\Answered',
+      '\\Flagged',
+      '\\Deleted',
+      '\\Seen',
+      '\\Draft'),
+     'PERMANENTFLAGS': ('\\Answered',
+      '\\Flagged',
+      '\\Deleted',
+      '\\Seen',
+      '\\Draft'),
+     'READ-WRITE': True,
+     'RECENT': 0,
+     'UIDNEXT': 1339,
+     'UIDVALIDITY': 1239278212}
+
+    In [2]: c.search()
+    Out[2]: [1123, 1233]
+
+    In [3]: c.logout()
+    Out[3]: 'Logging out'
+
+Note that the connected IMAPClient instance is available as the variable "c".