[pytango] 110/483: fix doc

Sandor Bodo-Merle sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:14:30 UTC 2017


This is an automated email from the git hooks/post-receive script.

sbodomerle-guest pushed a commit to annotated tag bliss_8.10
in repository pytango.

commit 203a9110ebc74d717d234952c32efd5fc3f63d9d
Author: tiagocoutinho <tiagocoutinho at 4e9c00fd-8f2e-0410-aa12-93ce3db5e235>
Date:   Mon Mar 12 13:28:41 2012 +0000

    fix doc
    
    git-svn-id: http://svn.code.sf.net/p/tango-cs/code/bindings/PyTango/trunk@19682 4e9c00fd-8f2e-0410-aa12-93ce3db5e235
---
 doc/index.rst             |   2 +-
 doc/itango/features.rst   |  14 ++++----
 doc/itango/highlights.rst |  88 ++++++++++++++++++++++++++++++++--------------
 doc/itango/index.rst      |   3 +-
 doc/itango/itango05.png   | Bin 0 -> 2885381 bytes
 doc/revision.rst          |   1 +
 6 files changed, 73 insertions(+), 35 deletions(-)

diff --git a/doc/index.rst b/doc/index.rst
index eb6e232..820bb56 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -16,7 +16,7 @@ This means that you can write not only tango applications (scripts, CLIs, GUIs)
 that access tango device servers but also tango device servers themselves, all 
 of this in pure Python_.
 
-.. figure:: itango/itango07.png
+.. figure:: itango/itango05.png
     :width: 700
     :align: center
     :alt: ITango
diff --git a/doc/itango/features.rst b/doc/itango/features.rst
index f1e14be..0033858 100644
--- a/doc/itango/features.rst
+++ b/doc/itango/features.rst
@@ -14,13 +14,14 @@ set of features from IPython_ like:
     - persistently store your favorite variables
     - color modes
  
-(for a complete list checkout the `IPython tutorial <http://ipython.scipy.org/doc/manual/html/interactive/tutorial.html>`_)
+(for a complete list checkout the `IPython web page <http://ipython.org/>`_)
 
 Plus an additional set o Tango_ specific features:
 
-    - automatic import of Tango objects to the console namespace (PyTango module,
-      :class:`PyTango.DeviceProxy` (=Device), :class:`PyTango.Database`, :class:`PyTango.Group`
-      and :class:`PyTango.AttributeProxy` (=Attribute))
+    - automatic import of Tango objects to the console namespace (:mod:`PyTango`
+      module, :class:`~PyTango.DeviceProxy` (=Device),
+      :class:`~PyTango.Database`, :class:`~PyTango.Group`
+      and :class:`~PyTango.AttributeProxy` (=Attribute))
     - device name completion
     - attribute name completion
     - automatic tango object member completion
@@ -34,7 +35,8 @@ Plus an additional set o Tango_ specific features:
     - store favorite tango devices
     - tango color modes
 
-Check the :ref:`itango-highlights` to see how to put these feature to good use :-)
+Check the :ref:`itango-highlights` to see how to put these feature to good use
+:-)
 
-.. _IPython: http://ipython.scipy.org/
+.. _IPython: http://ipython.org/
 .. _Tango: http://www.tango-controls.org/
\ No newline at end of file
diff --git a/doc/itango/highlights.rst b/doc/itango/highlights.rst
index 03888e2..d8d4f0c 100644
--- a/doc/itango/highlights.rst
+++ b/doc/itango/highlights.rst
@@ -308,6 +308,9 @@ all tango information from the database.
 Storing your favorite tango objects for later usage
 -------------------------------------------------------
 
+.. note::
+    This feature is not available if you have installed IPython 0.11!
+
 Since version 7.1.2, :class:`DeviceProxy`, :class:`AttributeProxy` and 
 :class:`Database` became pickable.
 This means that they can be used by the IPython_ 'store' magic command (type
@@ -325,24 +328,11 @@ then store these for the next time you startup IPython_ with itango profile.
     ITango <homer:10000> [3]: Ctrl+D
     
     (IPython session is closed and started again...)
+
+    ITango <homer:10000> [1]: store -r # in some versions of IPython you may need to do this ...
     
     ITango <homer:10000> [1]: print theta
     DeviceProxy(motor/bl99/1)
-    
-Tango color modes
---------------------
-
-IPython_ (0.10) provides three color modes: 'Linux', 'NoColor' and 'LightBG'.
-ITango provides in addition 'Tango' (default), 'PurpleTango' (='Tango'),
-'BlueTango' and 'GreenTango'.
-
-You can switch between color modes online using the magic command 'colors'.
-
-.. sourcecode:: itango
-
-    ITango <homer:10000> [1]: colors BlueTango
-    
-    ITango <homer:10000> [2]: colors NoColor
 
 Adding itango to your own ipython profile
 --------------------------------------------
@@ -353,23 +343,55 @@ Adding itango to the ipython default profile
 Let's assume that you find itango so useful that each time you start ipython, you want
 itango features to be loaded by default.
 The way to do this is by editing your default ipython configuration file: 
-$HOME/.ipython/ipy_user_conf.py and add the lines 1 and 7.
 
-.. note::
-    The code shown below is a small part of your $HOME/.ipython/ipy_user_conf.py.
-    It is shown here only the relevant part for this example.
+1. On IPython <= 0.10
 
-.. sourcecode:: python
+    $HOME/.ipython/ipy_user_conf.py and add the lines 1 and 7.
 
-    import PyTango.ipython
+    .. note::
+        The code shown below is a small part of your $HOME/.ipython/ipy_user_conf.py.
+        It is shown here only the relevant part for this example.
 
-    def main():
+    .. sourcecode:: python
 
-        # uncomment if you want to get ipython -p sh behaviour
-        # without having to use command line switches  
-        # import ipy_profile_sh
-        PyTango.ipython.init_ipython(ip, console=False)
+        import PyTango.ipython
+
+        def main():
+
+            # uncomment if you want to get ipython -p sh behaviour
+            # without having to use command line switches  
+            # import ipy_profile_sh
+            PyTango.ipython.init_ipython(ip, console=False)
 
+2. On IPython > 0.10
+
+    First you have to check which is the configuration directory being used by
+    IPython. For this, in an IPython console type:
+    
+    .. sourcecode:: itango
+
+        ITango <homer:10000> [1]: import IPython.utils.path
+        
+        ITango <homer:10000> [2]: IPython.utils.path.get_ipython_dir()
+        <IPYTHON_DIR>
+
+    now edit <IPYTHON_DIR>/profile_default/ipython_config.py and add the
+    following line at the end to add itango configuration::
+    
+        load_subconfig('ipython_config.py', profile='tango')
+    
+    Alternatively, you could also load itango as an IPython extension::
+        
+        config = get_config()
+        i_shell_app = config.InteractiveShellApp
+        extensions = getattr(i_shell_app, 'extensions', [])
+        extensions.append('PyTango.ipython')
+        i_shell_app.extensions = extensions
+        i_shell_app.ignore_old_config=True
+    
+    for more information on how to configure IPython >= 0.11 please check the
+    `IPython configuration <http://ipython.org/ipython-doc/dev/config/ipython.html#configuring-the-ipython-command-line-application>`_
+    
 And now, every time you start ipython::
 
     ipython
@@ -385,6 +407,10 @@ itango features will also be loaded.
 Adding itango to an existing customized profile
 ####################################################
 
+.. note::
+    This chapter has a pending update. The contents only apply to
+    IPython <= 0.10.
+
 If you have been working with IPython_ before and have already defined a
 customized personal profile, you can extend your profile with itango features 
 without breaking your existing options. The trick is to initialize itango extension
@@ -436,6 +462,10 @@ profile's console options (like colors, command line and initial banner).
 Creating a profile that extends itango profile
 ####################################################
 
+.. note::
+    This chapter has a pending update. The contents only apply to
+    IPython <= 0.10.
+    
 It is also possible to create a profile that includes all itango features and at
 the same time adds new ones. Let's suppose that you want to create a customized
 profile called 'orbit' that automaticaly exports devices of class 
@@ -508,6 +538,10 @@ and you will have something like this
 Advanced event monitoring
 -------------------------
 
+.. note::
+    This chapter has a pending update. The contents only apply to
+    IPython <= 0.10.
+
 With itango it is possible to monitor change events triggered by any tango
 attribute which has events enabled.
 
@@ -573,5 +607,5 @@ To stop monitoring the attribute:
 
         .. image:: itango04.png
 
-.. _IPython: http://ipython.scipy.org/
+.. _IPython: http://ipython.org/
 .. _Tango: http://www.tango-controls.org/
diff --git a/doc/itango/index.rst b/doc/itango/index.rst
index a42a558..7de75a1 100644
--- a/doc/itango/index.rst
+++ b/doc/itango/index.rst
@@ -24,6 +24,7 @@ You can start ITango by typing on the command line:
 and you should get something like this:
 
 .. image:: itango00.png
+    :align: center
 
 .. toctree::
     :maxdepth: 1
@@ -33,5 +34,5 @@ and you should get something like this:
 
 --------------------------------------------------------------------------------
 
-.. _IPython: http://ipython.scipy.org/
+.. _IPython: http://ipython.org/
 .. _Tango: http://www.tango-controls.org/
\ No newline at end of file
diff --git a/doc/itango/itango05.png b/doc/itango/itango05.png
new file mode 100644
index 0000000..8e8d7fb
Binary files /dev/null and b/doc/itango/itango05.png differ
diff --git a/doc/revision.rst b/doc/revision.rst
index 766d5ae..c7904c2 100644
--- a/doc/revision.rst
+++ b/doc/revision.rst
@@ -79,6 +79,7 @@ Version history
 |            |         - `3495607: DeviceClass.device_name_factory is missing <https://sourceforge.net/tracker/?func=detail&aid=3495607&group_id=57612&atid=484772>`_                       |
 |            | Bug fixes:                                                                                                                                                                   |
 |            |     - from sourceforge:                                                                                                                                                      |
+|            |         - `3103588: documentation of PyTango.Attribute.Group <https://sourceforge.net/tracker/?func=detail&aid=3103588&group_id=57612&atid=484769>`_                         |
 |            |         - `3458336: Problem with pytango 7.2.2 <https://sourceforge.net/tracker/?func=detail&aid=3458336&group_id=57612&atid=484769>`_                                       |
 |            |         - `3463377: PyTango memory leak in read encoded attribute <https://sourceforge.net/tracker/?func=detail&aid=3463377&group_id=57612&atid=484769>`_                    |
 |            |         - `3487930: [pytango] wrong python dependency <https://sourceforge.net/tracker/?func=detail&aid=3487930&group_id=57612&atid=484769>`_                                |

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pytango.git



More information about the debian-science-commits mailing list