SourceForge logo
SourceForge logo
Menu

matplotlib-checkins — Commit notification. DO NOT POST to this list, just subscribe to it.

You can subscribe to this list here.

2007 Jan
Feb
Mar
Apr
May
Jun
Jul
(115)
Aug
(120)
Sep
(137)
Oct
(170)
Nov
(461)
Dec
(263)
2008 Jan
(120)
Feb
(74)
Mar
(35)
Apr
(74)
May
(245)
Jun
(356)
Jul
(240)
Aug
(115)
Sep
(78)
Oct
(225)
Nov
(98)
Dec
(271)
2009 Jan
(132)
Feb
(84)
Mar
(74)
Apr
(56)
May
(90)
Jun
(79)
Jul
(83)
Aug
(296)
Sep
(214)
Oct
(76)
Nov
(82)
Dec
(66)
2010 Jan
(46)
Feb
(58)
Mar
(51)
Apr
(77)
May
(58)
Jun
(126)
Jul
(128)
Aug
(64)
Sep
(50)
Oct
(44)
Nov
(48)
Dec
(54)
2011 Jan
(68)
Feb
(52)
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
(1)
2018 Jan
Feb
Mar
Apr
May
(1)
Jun
Jul
Aug
Sep
Oct
Nov
Dec
S M T W T F S






1
(4)
2
3
(8)
4
(16)
5
(40)
6
(16)
7
(9)
8
(15)
9
(6)
10
(4)
11
(28)
12
(6)
13
(2)
14
(7)
15
(8)
16
17
18
(9)
19
(2)
20
(7)
21
(3)
22
(6)
23
(25)
24
(16)
25
(8)
26
(7)
27
(3)
28
(1)
29
(4)
30
(21)
31
(15)





Showing results of 28

1 2 > >> (Page 1 of 2)
From: <jd...@us...> - 2009年08月11日 19:28:15
Revision: 7473
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7473&view=rev
Author: jdh2358
Date: 2009年08月11日 19:28:09 +0000 (2009年8月11日)
Log Message:
-----------
add some links
Modified Paths:
--------------
 trunk/sampledoc_tut/custom_look.rst
 trunk/sampledoc_tut/extensions.rst
 trunk/sampledoc_tut/getting_started.rst
 trunk/sampledoc_tut/index.rst
Modified: trunk/sampledoc_tut/custom_look.rst
===================================================================
--- trunk/sampledoc_tut/custom_look.rst	2009年08月11日 18:01:00 UTC (rev 7472)
+++ trunk/sampledoc_tut/custom_look.rst	2009年08月11日 19:28:09 UTC (rev 7473)
@@ -1,62 +1,62 @@
-.. _custom_look:
-
-
-******************************************
-Customizing the look and feel of the site
-******************************************
-
-The `sphinx <http://sphinx.pocoo.org/>`_ site itself looks better than
-the sites created with the default css, so here we'll invoke TS Elliots'
-maxim "Talen imitates, but genius steals" and grab their css
-and part of their layout. As before, you can either get the required
-files :file:`_static/default.css`, :file:`_templates:layout.html` and
-:file:`_static\logo.png` from the website or svn (see
-:ref:`fetching-the-data`). Since I did a svn checkout before, I will
-just copy the stuff I need from there::
-
- home:~/tmp/sampledoc> cp ../sampledoc_tut/_static/default.css _static/
- home:~/tmp/sampledoc> cp ../sampledoc_tut/_templates/layout.html _templates/
- home:~/tmp/sampledoc> cp ../sampledoc_tut/_static/logo.png _static/
- home:~/tmp/sampledoc> ls _static/ _templates/
- _static/:
- basic_screenshot.png	default.css		logo.png
-
- _templates/:
- layout.html
-
-Sphinx will automatically pick up the css and layout html files since
-we put them in the default places with the default names, but we have
-to manually include the logo in our :file:`layout.html`. Let's take a
-look at the layout file: the first part puts a horizontal navigation
-bar at the top of our page, like you see on the `sphinx
-<http://sphinx.pocoo.org>`_ and `matplotlib
-<http://matplotlib.sourceforge.net/>`_ sites, the second part includes
-a logo that when we click on it will take us `home` and the last part
-moves the vertical navigation panels to the right side of the page::
-
- {% extends "!layout.html" %}
-
-
- {% block rootrellink %}
- <li><a href="{{ pathto('index') }}">home</a>|&nbsp;</li>
- <li><a href="{{ pathto('search') }}">search</a>|&nbsp;</li>
- <li><a href="{{ pathto('contents') }}">documentation </a> &raquo;</li>
- {% endblock %}
-
-
- {% block relbar1 %}
-
- <div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px">
- <a href="{{ pathto('index') }}"><img src="{{
- pathto("_static/logo.png", 1) }}" border="0" alt="sampledoc"/></a>
- </div>
- {{ super() }}
- {% endblock %}
-
- {# put the sidebar before the body #}
- {% block sidebar1 %}{{ sidebar() }}{% endblock %}
- {% block sidebar2 %}{% endblock %}
-
-Once you rebuild the site with a ``make html`` and reload the page in your browser, you should see a fancier site that looks like this
-
-.. image:: _static/fancy_screenshot.png
+.. _custom_look:
+
+
+******************************************
+Customizing the look and feel of the site
+******************************************
+
+The `sphinx <http://sphinx.pocoo.org/>`_ site itself looks better than
+the sites created with the default css, so here we'll invoke TS Elliots'
+maxim "Talent imitates, but genius steals" and grab their css
+and part of their layout. As before, you can either get the required
+files :file:`_static/default.css`, :file:`_templates:layout.html` and
+:file:`_static/logo.png` from the website or svn (see
+:ref:`fetching-the-data`). Since I did a svn checkout before, I will
+just copy the stuff I need from there::
+
+ home:~/tmp/sampledoc> cp ../sampledoc_tut/_static/default.css _static/
+ home:~/tmp/sampledoc> cp ../sampledoc_tut/_templates/layout.html _templates/
+ home:~/tmp/sampledoc> cp ../sampledoc_tut/_static/logo.png _static/
+ home:~/tmp/sampledoc> ls _static/ _templates/
+ _static/:
+ basic_screenshot.png	default.css		logo.png
+
+ _templates/:
+ layout.html
+
+Sphinx will automatically pick up the css and layout html files since
+we put them in the default places with the default names, but we have
+to manually include the logo in our :file:`layout.html`. Let's take a
+look at the layout file: the first part puts a horizontal navigation
+bar at the top of our page, like you see on the `sphinx
+<http://sphinx.pocoo.org>`_ and `matplotlib
+<http://matplotlib.sourceforge.net/>`_ sites, the second part includes
+a logo that when we click on it will take us `home` and the last part
+moves the vertical navigation panels to the right side of the page::
+
+ {% extends "!layout.html" %}
+
+
+ {% block rootrellink %}
+ <li><a href="{{ pathto('index') }}">home</a>|&nbsp;</li>
+ <li><a href="{{ pathto('search') }}">search</a>|&nbsp;</li>
+ <li><a href="{{ pathto('contents') }}">documentation </a> &raquo;</li>
+ {% endblock %}
+
+
+ {% block relbar1 %}
+
+ <div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px">
+ <a href="{{ pathto('index') }}"><img src="{{
+ pathto("_static/logo.png", 1) }}" border="0" alt="sampledoc"/></a>
+ </div>
+ {{ super() }}
+ {% endblock %}
+
+ {# put the sidebar before the body #}
+ {% block sidebar1 %}{{ sidebar() }}{% endblock %}
+ {% block sidebar2 %}{% endblock %}
+
+Once you rebuild the site with a ``make html`` and reload the page in your browser, you should see a fancier site that looks like this
+
+.. image:: _static/fancy_screenshot.png
Modified: trunk/sampledoc_tut/extensions.rst
===================================================================
--- trunk/sampledoc_tut/extensions.rst	2009年08月11日 18:01:00 UTC (rev 7472)
+++ trunk/sampledoc_tut/extensions.rst	2009年08月11日 19:28:09 UTC (rev 7473)
@@ -13,7 +13,7 @@
 groups, eg numpy and ipython. We're collecting these in this tutorial
 and showing you how to install and use them for your own project.
 First let's grab the python extension files from the :file:`sphinxext`
-directory from svn (see :ref:`fetching-the-data`, and install them in
+directory from svn (see :ref:`fetching-the-data`), and install them in
 our :file:`sampledoc` project :file:`sphinxext` directory::
 
 home:~/tmp/sampledoc> mkdir sphinxext
@@ -60,9 +60,10 @@
 ipython sessions
 ================
 
-Michael Droettboom contributed a sphinx extension which does pygments
-syntax highlighting on ipython sessions. Just use ipython as the
-language in the sourcecode directive::
+Michael Droettboom contributed a sphinx extension which does `pygments
+<http://pygments.org>`_ syntax highlighting on `ipython
+<http://ipython.scipy.org>`_ sessions. Just use ipython as the
+language in the ``sourcecode`` directive::
 
 .. sourcecode:: ipython
 
@@ -135,6 +136,10 @@
 All three of these options for math are designed to behave in the same
 way.
 
+See the matplotlib `mathtext guide
+<http://matplotlib.sourceforge.net/users/mathtext.html>`_ for lots
+more information on writing mathematical expressions in matplotlib.
+
 .. _pyplots:
 
 Inserting matplotlib plots
@@ -183,6 +188,10 @@
 plt.show()
 
 
+See the matplotlib `pyplot tutorial
+<http://matplotlib.sourceforge.net/users/pyplot_tutorial.html>`_ and
+the `gallery <http://matplotlib.sourceforge.net/gallery.html>`_ for
+lots of examples of matplotlib plots.
 
 Inheritance diagrams
 ====================
Modified: trunk/sampledoc_tut/getting_started.rst
===================================================================
--- trunk/sampledoc_tut/getting_started.rst	2009年08月11日 18:01:00 UTC (rev 7472)
+++ trunk/sampledoc_tut/getting_started.rst	2009年08月11日 19:28:09 UTC (rev 7473)
@@ -55,8 +55,9 @@
 we'll just grab them one at a time, so you can learn what needs to be
 changed where. Since we have more files to come, I'm going to grab
 the whole svn directory and just copy the files I need over for now.
-First, I'll cd to the directory containing my project, and get the
-"finished" product, and then copy in just the files I need::
+First, I'll cd up back into the directory containing my project, check
+out the "finished" product from svn, and then copy in just the files I
+need into my :file:`sampledoc` directory::
 
 home:~/tmp/sampledoc> pwd
 /Users/jdhunter/tmp/sampledoc
@@ -78,8 +79,8 @@
 sampledoc/_static/
 
 The last step is to modify :file:`index.rst` to include the
-getting_started file (be careful with the indentation, the
-"getting_started" should line up with the ':' in ``:maxdepth``::
+:file:`getting_started.rst` file (be careful with the indentation, the
+"g" in "getting_started" should line up with the ':' in ``:maxdepth``::
 
 Contents:
 
Modified: trunk/sampledoc_tut/index.rst
===================================================================
--- trunk/sampledoc_tut/index.rst	2009年08月11日 18:01:00 UTC (rev 7472)
+++ trunk/sampledoc_tut/index.rst	2009年08月11日 19:28:09 UTC (rev 7473)
@@ -7,18 +7,17 @@
 ==================
 
 This is a tutorial introduction to quickly get you up and running with
-your own sphinx documentation system. We'll cover everything from
-installing sphinx, to customizing the look and feel, to using custom
-extensions for embedding plots, inheritance diagrams, syntax
-highlighted ipython sessions and more. If you follow along the
-tutorial, you'll start with nothing and end up with this site -- it's
-the bootstrapping documentation tutorial that writes itself!
+your own sphinx documentation system. We'll cover installing sphinx,
+customizing the look and feel, using custom extensions for embedding
+plots, inheritance diagrams, syntax highlighted ipython sessions and
+more. If you follow along the tutorial, you'll start with nothing and
+end up with this site -- it's the bootstrapping documentation tutorial
+that writes itself!
 
 The source code for this tutorial lives in mpl svn (see
-:ref:`fetching-the-data`) and the `sampledoc PDF <sampledoc.pdf>`_
+:ref:`fetching-the-data`) and you can grab a harcopy of the the
+`sampledoc PDF <sampledoc.pdf>`_
 
-Contents:
-
 .. toctree::
 :maxdepth: 2
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2009年08月11日 18:01:10
Revision: 7472
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7472&view=rev
Author: jdh2358
Date: 2009年08月11日 18:01:00 +0000 (2009年8月11日)
Log Message:
-----------
more examples on how to use the extensions
Modified Paths:
--------------
 trunk/sampledoc_tut/extensions.rst
Modified: trunk/sampledoc_tut/extensions.rst
===================================================================
--- trunk/sampledoc_tut/extensions.rst	2009年08月11日 12:41:05 UTC (rev 7471)
+++ trunk/sampledoc_tut/extensions.rst	2009年08月11日 18:01:00 UTC (rev 7472)
@@ -61,8 +61,22 @@
 ================
 
 Michael Droettboom contributed a sphinx extension which does pygments
-syntax highlighting on ipython sessions
+syntax highlighting on ipython sessions. Just use ipython as the
+language in the sourcecode directive::
 
+ .. sourcecode:: ipython
+
+ In [69]: lines = plot([1,2,3])
+
+ In [70]: setp(lines)
+ alpha: float
+ animated: [True | False]
+ antialiased or aa: [True | False]
+ ...snip
+
+
+and you will get the syntax highlighted output below.
+
 .. sourcecode:: ipython
 
 In [69]: lines = plot([1,2,3])
@@ -88,6 +102,19 @@
 
 W^{3\beta}_{\delta_1 \rho_1 \sigma_2} = U^{3\beta}_{\delta_1 \rho_1} + \frac{1}{8 \pi 2} \int^{\alpha_2}_{\alpha_2} d \alpha^\prime_2 \left[\frac{ U^{2\beta}_{\delta_1 \rho_1} - \alpha^\prime_2U^{1\beta}_{\rho_1 \sigma_2} }{U^{0\beta}_{\rho_1 \sigma_2}}\right]
 
+To include math in your document, just use the math directive; here is
+a simpler equation::
+
+ .. math::
+
+ W^{3\beta}_{\delta_1 \rho_1 \sigma_2} \approx U^{3\beta}_{\delta_1 \rho_1} 
+
+which is rendered as 
+
+.. math::
+
+ W^{3\beta}_{\delta_1 \rho_1 \sigma_2} \approx U^{3\beta}_{\delta_1 \rho_1} 
+
 This documentation framework includes a Sphinx extension,
 :file:`sphinxext/mathmpl.py`, that uses matplotlib to render math
 equations when generating HTML, and LaTeX itself when generating a
@@ -108,7 +135,7 @@
 All three of these options for math are designed to behave in the same
 way.
 
-.. _emacs-helpers:
+.. _pyplots:
 
 Inserting matplotlib plots
 ==========================
@@ -128,6 +155,35 @@
 .. plot:: pyplots/ellipses.py
 :include-source:
 
+
+You can also inline simple plots, and the code will be executed at
+documentation build time and the figure inserted into your docs; the
+following code::
+
+ .. plot::
+
+ import matplotlib.pyplot as plt
+ import numpy as np
+ x = np.random.randn(1000)
+ plt.hist( x, 20)
+ plt.grid()
+ plt.title(r'Normal: $\mu=%.2f, \sigma=%.2f$'%(x.mean(), x.std()))
+ plt.show()
+
+produces this output:
+
+.. plot::
+
+ import matplotlib.pyplot as plt
+ import numpy as np
+ x = np.random.randn(1000)
+ plt.hist( x, 20)
+ plt.grid()
+ plt.title(r'Normal: $\mu=%.2f, \sigma=%.2f$'%(x.mean(), x.std()))
+ plt.show()
+
+
+ 
 Inheritance diagrams
 ====================
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2009年08月11日 12:41:16
Revision: 7471
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7471&view=rev
Author: jdh2358
Date: 2009年08月11日 12:41:05 +0000 (2009年8月11日)
Log Message:
-----------
a few fixes from proofreading
Modified Paths:
--------------
 trunk/sampledoc_tut/custom_look.rst
 trunk/sampledoc_tut/getting_started.rst
Modified: trunk/sampledoc_tut/custom_look.rst
===================================================================
--- trunk/sampledoc_tut/custom_look.rst	2009年08月11日 12:29:52 UTC (rev 7470)
+++ trunk/sampledoc_tut/custom_look.rst	2009年08月11日 12:41:05 UTC (rev 7471)
@@ -6,8 +6,8 @@
 ******************************************
 
 The `sphinx <http://sphinx.pocoo.org/>`_ site itself looks better than
-the sites created with the default css, so here we'll invoke Tufte's
-phrase "Intelligence imitates but genious steals and grab their css
+the sites created with the default css, so here we'll invoke TS Elliots'
+maxim "Talen imitates, but genius steals" and grab their css
 and part of their layout. As before, you can either get the required
 files :file:`_static/default.css`, :file:`_templates:layout.html` and
 :file:`_static\logo.png` from the website or svn (see
Modified: trunk/sampledoc_tut/getting_started.rst
===================================================================
--- trunk/sampledoc_tut/getting_started.rst	2009年08月11日 12:29:52 UTC (rev 7470)
+++ trunk/sampledoc_tut/getting_started.rst	2009年08月11日 12:41:05 UTC (rev 7471)
@@ -77,11 +77,6 @@
 home:~/tmp> cp sampledoc_tut/_static/basic_screenshot.png \
 sampledoc/_static/
 
-Now we are ready to rebuild the docs. We used the image directory to
-include to the screenshot above with::
-
- .. image:: _static/basic_screenshot.png
-
 The last step is to modify :file:`index.rst` to include the
 getting_started file (be careful with the indentation, the
 "getting_started" should line up with the ':' in ``:maxdepth``::
@@ -93,11 +88,23 @@
 
 getting_started.rst
 
-and then rebuild the docs with ``make html``. When you reload the
-page, you should see a link to the "Getting Started" docs, and in
-there this page with the screenshot. `Voila!`
+and then rebuild the docs::
 
+ cd sampledoc
+ make html
 
+
+When you reload the page by refreshing your browser pointing to
+:file:`_build/html/index.html`, you should see a link to the
+"Getting Started" docs, and in there this page with the screenshot.
+`Voila!`
+
+Note we used the image directive to include to the screenshot above
+with::
+
+ .. image:: _static/basic_screenshot.png
+
+
 Next we'll customize the look and feel of our site to give it a logo,
 some custom css, and update the navigation panels to look more like
 the `sphinx <http://sphinx.pocoo.org/>`_ site itself -- see
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2009年08月11日 12:29:59
Revision: 7470
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7470&view=rev
Author: jdh2358
Date: 2009年08月11日 12:29:52 +0000 (2009年8月11日)
Log Message:
-----------
proper attribution
Modified Paths:
--------------
 trunk/sampledoc_tut/Makefile
 trunk/sampledoc_tut/conf.py
 trunk/sampledoc_tut/getting_started.rst
 trunk/sampledoc_tut/index.rst
Modified: trunk/sampledoc_tut/Makefile
===================================================================
--- trunk/sampledoc_tut/Makefile	2009年08月11日 12:08:25 UTC (rev 7469)
+++ trunk/sampledoc_tut/Makefile	2009年08月11日 12:29:52 UTC (rev 7470)
@@ -91,3 +91,9 @@
 	cd _build/html; \
 	rsync -avz . jdh2358,mat...@we...:/home/groups/m/ma/matplotlib/htdocs/sampledoc -essh --cvs-exclude
 
+
+sfpdf:
+	cd _build/latex; \
+	scp sampledoc.pdf jdh2358,mat...@we...:/home/groups/m/ma/matplotlib/htdocs/sampledoc/
+
+
Modified: trunk/sampledoc_tut/conf.py
===================================================================
--- trunk/sampledoc_tut/conf.py	2009年08月11日 12:08:25 UTC (rev 7469)
+++ trunk/sampledoc_tut/conf.py	2009年08月11日 12:29:52 UTC (rev 7470)
@@ -46,7 +46,7 @@
 
 # General information about the project.
 project = u'sampledoc'
-copyright = u'2009, jdh'
+copyright = u'2009, John Hunter, Fernando Perez, Michael Droettboom'
 
 # The version info for the project you're documenting, acts as replacement for
 # |version| and |release|, also used in various other places throughout the
@@ -181,7 +181,7 @@
 # (source start file, target name, title, author, documentclass [howto/manual]).
 latex_documents = [
 ('index', 'sampledoc.tex', u'sampledoc Documentation',
- u'jdh', 'manual'),
+ u'John Hunter, Fernando Perez, Michael Droettboom', 'manual'),
 ]
 
 # The name of an image file (relative to this directory) to place at the top of
Modified: trunk/sampledoc_tut/getting_started.rst
===================================================================
--- trunk/sampledoc_tut/getting_started.rst	2009年08月11日 12:08:25 UTC (rev 7469)
+++ trunk/sampledoc_tut/getting_started.rst	2009年08月11日 12:29:52 UTC (rev 7470)
@@ -37,7 +37,7 @@
 make html
 
 If you now point your browser to :file:`_build/html/index.html`, you
-should see a basic spinx site.
+should see a basic sphinx site.
 
 .. image:: _static/basic_screenshot.png
 
@@ -61,9 +61,8 @@
 home:~/tmp/sampledoc> pwd
 /Users/jdhunter/tmp/sampledoc
 home:~/tmp/sampledoc> cd ..
- home:~/tmp> svn co
- https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/\
- sampledoc_tut
+ home:~/tmp> svn co https://matplotlib.svn.sourceforge.net/svnroot/\
+ matplotlib/trunk/sampledoc_tut
 A sampledoc_tut/cheatsheet.rst
 A sampledoc_tut/_static
 A sampledoc_tut/_static/basic_screenshot.png
@@ -75,7 +74,8 @@
 A sampledoc_tut/index.rst
 Checked out revision 7449.
 home:~/tmp> cp sampledoc_tut/getting_started.rst sampledoc/
- home:~/tmp> cp sampledoc_tut/_static/basic_screenshot.png sampledoc/_static/
+ home:~/tmp> cp sampledoc_tut/_static/basic_screenshot.png \
+ sampledoc/_static/
 
 Now we are ready to rebuild the docs. We used the image directory to
 include to the screenshot above with::
Modified: trunk/sampledoc_tut/index.rst
===================================================================
--- trunk/sampledoc_tut/index.rst	2009年08月11日 12:08:25 UTC (rev 7469)
+++ trunk/sampledoc_tut/index.rst	2009年08月11日 12:29:52 UTC (rev 7470)
@@ -11,10 +11,12 @@
 installing sphinx, to customizing the look and feel, to using custom
 extensions for embedding plots, inheritance diagrams, syntax
 highlighted ipython sessions and more. If you follow along the
-tutorial, you'll start with nothing and end up with this site! The
-source code for this tutorial lives in mpl svn (see
-:ref:`fetching-the-data`)
+tutorial, you'll start with nothing and end up with this site -- it's
+the bootstrapping documentation tutorial that writes itself!
 
+The source code for this tutorial lives in mpl svn (see
+:ref:`fetching-the-data`) and the `sampledoc PDF <sampledoc.pdf>`_
+
 Contents:
 
 .. toctree::
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2009年08月11日 12:08:34
Revision: 7469
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7469&view=rev
Author: jdh2358
Date: 2009年08月11日 12:08:25 +0000 (2009年8月11日)
Log Message:
-----------
moved to trunk
Added Paths:
-----------
 trunk/sampledoc_tut/Makefile
 trunk/sampledoc_tut/_build/
 trunk/sampledoc_tut/_static/
 trunk/sampledoc_tut/_static/basic_screenshot.png
 trunk/sampledoc_tut/_static/fancy_screenshot.png
 trunk/sampledoc_tut/_static/logo.png
 trunk/sampledoc_tut/_templates/
 trunk/sampledoc_tut/cheatsheet.rst
 trunk/sampledoc_tut/conf.py
 trunk/sampledoc_tut/custom_look.rst
 trunk/sampledoc_tut/emacs_help.rst
 trunk/sampledoc_tut/extensions.rst
 trunk/sampledoc_tut/getting_started.rst
 trunk/sampledoc_tut/index.rst
 trunk/sampledoc_tut/pyplots/
 trunk/sampledoc_tut/sphinxext/
Removed Paths:
-------------
 trunk/sampledoc_tut/_static/basic_screenshot.png
Copied: trunk/sampledoc_tut/Makefile (from rev 7463, trunk/py4science/examples/sphinx_qs/Makefile)
===================================================================
--- trunk/sampledoc_tut/Makefile	 (rev 0)
+++ trunk/sampledoc_tut/Makefile	2009年08月11日 12:08:25 UTC (rev 7469)
@@ -0,0 +1,93 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS =
+SPHINXBUILD = sphinx-build
+PAPER =
+
+# Internal variables.
+PAPEROPT_a4 = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS = -d _build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest
+
+help:
+	@echo "Please use \`make <target>' where <target> is one of"
+	@echo " html to make standalone HTML files"
+	@echo " dirhtml to make HTML files named index.html in directories"
+	@echo " pickle to make pickle files"
+	@echo " json to make JSON files"
+	@echo " htmlhelp to make HTML files and a HTML help project"
+	@echo " qthelp to make HTML files and a qthelp project"
+	@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+	@echo " changes to make an overview of all changed/added/deprecated items"
+	@echo " linkcheck to check all external links for integrity"
+	@echo " doctest to run all doctests embedded in the documentation (if enabled)"
+
+clean:
+	-rm -rf _build/*
+
+html:
+	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html
+	@echo
+	@echo "Build finished. The HTML pages are in _build/html."
+
+dirhtml:
+	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) _build/dirhtml
+	@echo
+	@echo "Build finished. The HTML pages are in _build/dirhtml."
+
+pickle:
+	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) _build/pickle
+	@echo
+	@echo "Build finished; now you can process the pickle files."
+
+json:
+	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) _build/json
+	@echo
+	@echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp
+	@echo
+	@echo "Build finished; now you can run HTML Help Workshop with the" \
+	 ".hhp project file in _build/htmlhelp."
+
+qthelp:
+	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) _build/qthelp
+	@echo
+	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
+	 ".qhcp project file in _build/qthelp, like this:"
+	@echo "# qcollectiongenerator _build/qthelp/sampledoc.qhcp"
+	@echo "To view the help file:"
+	@echo "# assistant -collectionFile _build/qthelp/sampledoc.qhc"
+
+latex:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex
+	@echo
+	@echo "Build finished; the LaTeX files are in _build/latex."
+	@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
+	 "run these through (pdf)latex."
+
+changes:
+	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) _build/changes
+	@echo
+	@echo "The overview file is in _build/changes."
+
+linkcheck:
+	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) _build/linkcheck
+	@echo
+	@echo "Link check complete; look for any errors in the above output " \
+	 "or in _build/linkcheck/output.txt."
+
+doctest:
+	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) _build/doctest
+	@echo "Testing of doctests in the sources finished, look at the " \
+	 "results in _build/doctest/output.txt."
+
+sf:
+	cd _build/html; \
+	rsync -avz . jdh2358,mat...@we...:/home/groups/m/ma/matplotlib/htdocs/sampledoc -essh --cvs-exclude
+
Deleted: trunk/sampledoc_tut/_static/basic_screenshot.png
===================================================================
(Binary files differ)
Copied: trunk/sampledoc_tut/_static/basic_screenshot.png (from rev 7463, trunk/py4science/examples/sphinx_qs/_static/basic_screenshot.png)
===================================================================
(Binary files differ)
Copied: trunk/sampledoc_tut/_static/fancy_screenshot.png (from rev 7462, trunk/py4science/examples/sphinx_qs/_static/fancy_screenshot.png)
===================================================================
(Binary files differ)
Copied: trunk/sampledoc_tut/_static/logo.png (from rev 7461, trunk/py4science/examples/sphinx_qs/_static/logo.png)
===================================================================
(Binary files differ)
Copied: trunk/sampledoc_tut/cheatsheet.rst (from rev 7460, trunk/py4science/examples/sphinx_qs/cheatsheet.rst)
===================================================================
--- trunk/sampledoc_tut/cheatsheet.rst	 (rev 0)
+++ trunk/sampledoc_tut/cheatsheet.rst	2009年08月11日 12:08:25 UTC (rev 7469)
@@ -0,0 +1,98 @@
+.. _cheat-sheet:
+
+******************
+Sphinx cheat sheet
+******************
+
+Here is a quick and dirty cheat sheet for some common stuff you want
+to do in sphinx and ReST. You can see the literal source for this
+file at :ref:`cheatsheet
+-literal`.
+ 
+
+.. _formatting-text:
+
+Formatting text
+===============
+
+You use inline markup to make text *italics*, **bold**, or ``monotype``.
+
+You can represent code blocks fairly easily::
+
+ import numpy as np
+ x = np.random.rand(12)
+
+Or literally include code:
+
+.. literalinclude:: pyplots/ellipses.py
+
+.. _making-a-list:
+
+Making a list
+=============
+
+It is easy to make lists in rest
+
+Bullet points
+-------------
+
+This is a subsection making bullet points
+
+* point A
+
+* point B
+
+* point C
+
+
+Enumerated points
+------------------
+
+This is a subsection making numbered points
+
+#. point A
+
+#. point B
+
+#. point C
+
+
+.. _making-a-table:
+
+Making a table
+==============
+
+This shows you how to make a table -- if you only want to make a list see :ref:`making-a-list`.
+
+================== ============
+Name Age
+================== ============
+John D Hunter 40
+Cast of Thousands 41
+And Still More 42
+================== ============
+
+.. _making-links:
+
+Making links
+============
+
+It is easy to make a link to `yahoo <http://yahoo.com>`_ or to some
+section inside this document (see :ref:`making-a-table`) or another
+document.
+
+You can also reference classes, modules, functions, etc that are
+documented using the sphinx `autodoc
+<http://sphinx.pocoo.org/ext/autodoc.html>`_ facilites. For example,
+see the module :mod:`matplotlib.backend_bases` documentation, or the
+class :class:`~matplotlib.backend_bases.LocationEvent`, or the method
+:meth:`~matplotlib.backend_bases.FigureCanvasBase.mpl_connect`.
+
+
+
+.. _cheatsheet-literal:
+
+This file
+=========
+
+.. literalinclude:: cheatsheet.rst
Copied: trunk/sampledoc_tut/conf.py (from rev 7461, trunk/py4science/examples/sphinx_qs/conf.py)
===================================================================
--- trunk/sampledoc_tut/conf.py	 (rev 0)
+++ trunk/sampledoc_tut/conf.py	2009年08月11日 12:08:25 UTC (rev 7469)
@@ -0,0 +1,202 @@
+# -*- coding: utf-8 -*-
+#
+# sampledoc documentation build configuration file, created by
+# sphinx-quickstart on Tue Aug 11 05:04:40 2009.
+#
+# This file is execfile()d with the current directory set to its containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys, os
+
+# If your extensions are in another directory, add it here. If the directory
+# is relative to the documentation root, use os.path.abspath to make it
+# absolute, like shown here.
+sys.path.append(os.path.abspath('sphinxext'))
+
+# -- General configuration -----------------------------------------------------
+
+# Add any Sphinx extension module names here, as strings. They can be extensions
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+extensions = ['matplotlib.sphinxext.mathmpl',
+ 'matplotlib.sphinxext.only_directives',
+ 'matplotlib.sphinxext.plot_directive',
+ 'sphinx.ext.autodoc',
+ 'sphinx.ext.doctest',
+ 'ipython_console_highlighting',
+ 'inheritance_diagram',
+ 'numpydoc']
+
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The encoding of source files.
+#source_encoding = 'utf-8'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'sampledoc'
+copyright = u'2009, jdh'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = '1.0'
+# The full version, including alpha/beta/rc tags.
+release = '1.0'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of documents that shouldn't be included in the build.
+#unused_docs = []
+
+# List of directories, relative to source directory, that shouldn't be searched
+# for source files.
+exclude_trees = ['_build']
+
+# The reST default role (used for this markup: `text`) to use for all documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+
+# -- Options for HTML output ---------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages. Major themes that come with
+# Sphinx are currently 'default' and 'sphinxdoc'.
+html_theme = 'default'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further. For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# The name for this set of Sphinx documents. If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# A shorter title for the navigation bar. Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_use_modindex = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+#html_show_sourcelink = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it. The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = ''
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'sampledocdoc'
+
+
+# -- Options for LaTeX output --------------------------------------------------
+
+# The paper size ('letter' or 'a4').
+#latex_paper_size = 'letter'
+
+# The font size ('10pt', '11pt' or '12pt').
+#latex_font_size = '10pt'
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title, author, documentclass [howto/manual]).
+latex_documents = [
+ ('index', 'sampledoc.tex', u'sampledoc Documentation',
+ u'jdh', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# Additional stuff for the LaTeX preamble.
+#latex_preamble = ''
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_use_modindex = True
Copied: trunk/sampledoc_tut/custom_look.rst (from rev 7465, trunk/py4science/examples/sphinx_qs/custom_look.rst)
===================================================================
--- trunk/sampledoc_tut/custom_look.rst	 (rev 0)
+++ trunk/sampledoc_tut/custom_look.rst	2009年08月11日 12:08:25 UTC (rev 7469)
@@ -0,0 +1,62 @@
+.. _custom_look:
+
+
+******************************************
+Customizing the look and feel of the site
+******************************************
+
+The `sphinx <http://sphinx.pocoo.org/>`_ site itself looks better than
+the sites created with the default css, so here we'll invoke Tufte's
+phrase "Intelligence imitates but genious steals and grab their css
+and part of their layout. As before, you can either get the required
+files :file:`_static/default.css`, :file:`_templates:layout.html` and
+:file:`_static\logo.png` from the website or svn (see
+:ref:`fetching-the-data`). Since I did a svn checkout before, I will
+just copy the stuff I need from there::
+
+ home:~/tmp/sampledoc> cp ../sampledoc_tut/_static/default.css _static/
+ home:~/tmp/sampledoc> cp ../sampledoc_tut/_templates/layout.html _templates/
+ home:~/tmp/sampledoc> cp ../sampledoc_tut/_static/logo.png _static/
+ home:~/tmp/sampledoc> ls _static/ _templates/
+ _static/:
+ basic_screenshot.png	default.css		logo.png
+
+ _templates/:
+ layout.html
+
+Sphinx will automatically pick up the css and layout html files since
+we put them in the default places with the default names, but we have
+to manually include the logo in our :file:`layout.html`. Let's take a
+look at the layout file: the first part puts a horizontal navigation
+bar at the top of our page, like you see on the `sphinx
+<http://sphinx.pocoo.org>`_ and `matplotlib
+<http://matplotlib.sourceforge.net/>`_ sites, the second part includes
+a logo that when we click on it will take us `home` and the last part
+moves the vertical navigation panels to the right side of the page::
+
+ {% extends "!layout.html" %}
+
+
+ {% block rootrellink %}
+ <li><a href="{{ pathto('index') }}">home</a>|&nbsp;</li>
+ <li><a href="{{ pathto('search') }}">search</a>|&nbsp;</li>
+ <li><a href="{{ pathto('contents') }}">documentation </a> &raquo;</li>
+ {% endblock %}
+
+
+ {% block relbar1 %}
+
+ <div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px">
+ <a href="{{ pathto('index') }}"><img src="{{
+ pathto("_static/logo.png", 1) }}" border="0" alt="sampledoc"/></a>
+ </div>
+ {{ super() }}
+ {% endblock %}
+
+ {# put the sidebar before the body #}
+ {% block sidebar1 %}{{ sidebar() }}{% endblock %}
+ {% block sidebar2 %}{% endblock %}
+
+Once you rebuild the site with a ``make html`` and reload the page in your browser, you should see a fancier site that looks like this
+
+.. image:: _static/fancy_screenshot.png
Copied: trunk/sampledoc_tut/emacs_help.rst (from rev 7464, trunk/py4science/examples/sphinx_qs/emacs_help.rst)
===================================================================
--- trunk/sampledoc_tut/emacs_help.rst	 (rev 0)
+++ trunk/sampledoc_tut/emacs_help.rst	2009年08月11日 12:08:25 UTC (rev 7469)
@@ -0,0 +1,40 @@
+.. _working-with-emacs:
+
+*******************
+Emacs ReST support
+*******************
+
+Emacs helpers
+=============
+
+There is an emacs mode `rst.el
+<http://docutils.sourceforge.net/tools/editors/emacs/rst.el>`_ which
+automates many important ReST tasks like building and updateing
+table-of-contents, and promoting or demoting section headings. Here
+is the basic ``.emacs`` configuration::
+
+ (require 'rst)
+ (setq auto-mode-alist
+ (append '(("\\.txt$" . rst-mode)
+ ("\\.rst$" . rst-mode)
+ ("\\.rest$" . rst-mode)) auto-mode-alist))
+
+
+Some helpful functions::
+
+ C-c TAB - rst-toc-insert
+
+ Insert table of contents at point
+
+ C-c C-u - rst-toc-update
+
+ Update the table of contents at point
+
+ C-c C-l rst-shift-region-left
+
+ Shift region to the left
+
+ C-c C-r rst-shift-region-right
+
+ Shift region to the right
+
Copied: trunk/sampledoc_tut/extensions.rst (from rev 7465, trunk/py4science/examples/sphinx_qs/extensions.rst)
===================================================================
--- trunk/sampledoc_tut/extensions.rst	 (rev 0)
+++ trunk/sampledoc_tut/extensions.rst	2009年08月11日 12:08:25 UTC (rev 7469)
@@ -0,0 +1,154 @@
+.. _extensions:
+
+
+****************************************************
+Sphinx extensions for embedded plots, math and more
+****************************************************
+
+Sphinx is written in python, and supports the ability to write custom
+extensions. We've written a few for the matplotlib documentation,
+some of which are part of matplotlib itself in the
+matplotlib.sphinxext module, some of which are included only in the
+sphinx doc directory, and there are other extensions written by other
+groups, eg numpy and ipython. We're collecting these in this tutorial
+and showing you how to install and use them for your own project.
+First let's grab the python extension files from the :file:`sphinxext`
+directory from svn (see :ref:`fetching-the-data`, and install them in
+our :file:`sampledoc` project :file:`sphinxext` directory::
+
+ home:~/tmp/sampledoc> mkdir sphinxext
+ home:~/tmp/sampledoc> cp ../sampledoc_tut/sphinxext/*.py sphinxext/
+ home:~/tmp/sampledoc> ls sphinxext/
+ apigen.py inheritance_diagram.py
+ docscrape.py ipython_console_highlighting.py
+ docscrape_sphinx.py numpydoc.py
+
+In addition to the builtin matplotlib extensions for embedding pyplot
+plots and rendering math with matplotlib's native math engine, we also
+have extensions for syntax highlighting ipython sessions, making
+inhertiance diagrams, and more. 
+
+We need to inform sphinx of our new extensions in the :file:`conf.py`
+file by adding the following. First we tell it where to find the extensions::
+
+ # If your extensions are in another directory, add it here. If the
+ # directory is relative to the documentation root, use
+ # os.path.abspath to make it absolute, like shown here.
+ sys.path.append(os.path.abspath('sphinxext'))
+
+And then we tell it what extensions to load::
+ 
+ # Add any Sphinx extension module names here, as strings. They can
+ # be extensions coming with Sphinx (named 'sphinx.ext.*') or your
+ # custom ones.
+ extensions = ['matplotlib.sphinxext.mathmpl',
+ 'matplotlib.sphinxext.only_directives',
+ 'matplotlib.sphinxext.plot_directive',
+ 'sphinx.ext.autodoc',
+ 'sphinx.ext.doctest',
+ 'ipython_console_highlighting',
+ 'inheritance_diagram',
+ 'numpydoc']
+
+
+Now let's look at some of these in action. You can see the literal
+source for this file at :ref:`extensions-literal`.
+
+
+.. _ipython-highlighting:
+
+ipython sessions
+================
+
+Michael Droettboom contributed a sphinx extension which does pygments
+syntax highlighting on ipython sessions
+
+.. sourcecode:: ipython
+
+ In [69]: lines = plot([1,2,3])
+
+ In [70]: setp(lines)
+ alpha: float
+ animated: [True | False]
+ antialiased or aa: [True | False]
+ ...snip
+
+This support is included in this template, but will also be included
+in a future version of Pygments by default.
+
+.. _using-math:
+
+Using math
+==========
+
+In sphinx you can include inline math :math:`x\leftarrow y\ x\forall
+y\ x-y` or display math
+
+.. math::
+
+ W^{3\beta}_{\delta_1 \rho_1 \sigma_2} = U^{3\beta}_{\delta_1 \rho_1} + \frac{1}{8 \pi 2} \int^{\alpha_2}_{\alpha_2} d \alpha^\prime_2 \left[\frac{ U^{2\beta}_{\delta_1 \rho_1} - \alpha^\prime_2U^{1\beta}_{\rho_1 \sigma_2} }{U^{0\beta}_{\rho_1 \sigma_2}}\right]
+
+This documentation framework includes a Sphinx extension,
+:file:`sphinxext/mathmpl.py`, that uses matplotlib to render math
+equations when generating HTML, and LaTeX itself when generating a
+PDF. This can be useful on systems that have matplotlib, but not
+LaTeX, installed. To use it, add ``mathmpl`` to the list of
+extensions in :file:`conf.py`.
+
+Current SVN versions of Sphinx now include built-in support for math.
+There are two flavors:
+
+ - pngmath: uses dvipng to render the equation
+
+ - jsmath: renders the math in the browser using Javascript
+
+To use these extensions instead, add ``sphinx.ext.pngmath`` or
+``sphinx.ext.jsmath`` to the list of extensions in :file:`conf.py`.
+
+All three of these options for math are designed to behave in the same
+way.
+
+.. _emacs-helpers:
+
+Inserting matplotlib plots
+==========================
+
+Inserting automatically-generated plots is easy. Simply put the
+script to generate the plot in the :file:`pyplots` directory, and
+refer to it using the ``plot`` directive. To include the source code
+for the plot in the document, pass the ``include-source`` parameter::
+
+ .. plot:: pyplots/ellipses.py
+ :include-source:
+
+In the HTML version of the document, the plot includes links to the
+original source code, a high-resolution PNG and a PDF. In the PDF
+version of the document, the plot is included as a scalable PDF.
+
+.. plot:: pyplots/ellipses.py
+ :include-source:
+
+Inheritance diagrams
+====================
+
+Inheritance diagrams can be inserted directly into the document by
+providing a list of class or module names to the
+``inheritance-diagram`` directive.
+
+For example::
+
+ .. inheritance-diagram:: codecs
+
+produces:
+
+.. inheritance-diagram:: codecs
+
+
+.. _extensions-literal:
+
+This file
+=========
+
+.. literalinclude:: extensions.rst
+
+
Copied: trunk/sampledoc_tut/getting_started.rst (from rev 7465, trunk/py4science/examples/sphinx_qs/getting_started.rst)
===================================================================
--- trunk/sampledoc_tut/getting_started.rst	 (rev 0)
+++ trunk/sampledoc_tut/getting_started.rst	2009年08月11日 12:08:25 UTC (rev 7469)
@@ -0,0 +1,105 @@
+.. _getting_started:
+
+
+***************
+Getting started
+***************
+
+.. _installing-docdir:
+
+Installing your doc directory
+=============================
+
+You may already have sphinx `sphinx <http://sphinx.pocoo.org/>`_
+installed -- you can check by doing::
+
+ python -c 'import sphinx'
+
+If that fails grab the latest version of and install it with::
+
+ > sudo easy_install sphinx
+
+Now you are ready to build a template for your docs, using
+sphinx-quickstart::
+
+ > sphinx-quickstart
+
+accepting most of the defaults. I choose "sampledoc" as the name of my
+project. cd into your new directory and check the contents::
+
+ home:~/tmp/sampledoc> ls
+ Makefile	_static		conf.py
+ _build		_templates	index.rst
+
+The index.rst is the master ReST for your project, but before adding
+anything, let's see if we can build some html::
+
+ make html
+
+If you now point your browser to :file:`_build/html/index.html`, you
+should see a basic spinx site.
+
+.. image:: _static/basic_screenshot.png
+
+.. _fetching-the-data:
+
+Fetching the data
+-----------------
+
+Now we will start to customize out docs. Grab a couple of files from
+the `web site
+<http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/sampledoc_tut/>`_
+or svn. You will need :file:`getting_started.rst` and
+:file:`_static/basic_screenshot.png`. All of the files live in the
+"completed" version of this tutorial, but since this is a tutorial,
+we'll just grab them one at a time, so you can learn what needs to be
+changed where. Since we have more files to come, I'm going to grab
+the whole svn directory and just copy the files I need over for now.
+First, I'll cd to the directory containing my project, and get the
+"finished" product, and then copy in just the files I need::
+
+ home:~/tmp/sampledoc> pwd
+ /Users/jdhunter/tmp/sampledoc
+ home:~/tmp/sampledoc> cd ..
+ home:~/tmp> svn co
+ https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/\
+ sampledoc_tut
+ A sampledoc_tut/cheatsheet.rst
+ A sampledoc_tut/_static
+ A sampledoc_tut/_static/basic_screenshot.png
+ A sampledoc_tut/conf.py
+ A sampledoc_tut/Makefile
+ A sampledoc_tut/_templates
+ A sampledoc_tut/_build
+ A sampledoc_tut/getting_started.rst
+ A sampledoc_tut/index.rst
+ Checked out revision 7449.
+ home:~/tmp> cp sampledoc_tut/getting_started.rst sampledoc/
+ home:~/tmp> cp sampledoc_tut/_static/basic_screenshot.png sampledoc/_static/
+
+Now we are ready to rebuild the docs. We used the image directory to
+include to the screenshot above with::
+
+ .. image:: _static/basic_screenshot.png
+
+The last step is to modify :file:`index.rst` to include the
+getting_started file (be careful with the indentation, the
+"getting_started" should line up with the ':' in ``:maxdepth``::
+
+ Contents:
+
+ .. toctree::
+ :maxdepth: 2
+
+ getting_started.rst
+
+and then rebuild the docs with ``make html``. When you reload the
+page, you should see a link to the "Getting Started" docs, and in
+there this page with the screenshot. `Voila!`
+
+
+Next we'll customize the look and feel of our site to give it a logo,
+some custom css, and update the navigation panels to look more like
+the `sphinx <http://sphinx.pocoo.org/>`_ site itself -- see
+:ref:`custom_look`.
+
Copied: trunk/sampledoc_tut/index.rst (from rev 7465, trunk/py4science/examples/sphinx_qs/index.rst)
===================================================================
--- trunk/sampledoc_tut/index.rst	 (rev 0)
+++ trunk/sampledoc_tut/index.rst	2009年08月11日 12:08:25 UTC (rev 7469)
@@ -0,0 +1,35 @@
+.. sampledoc documentation master file, created by
+ sphinx-quickstart on Tue Aug 11 05:04:40 2009.
+ You can adapt this file completely to your liking, but it should at least
+ contain the root `toctree` directive.
+
+sampledoc tutorial
+==================
+
+This is a tutorial introduction to quickly get you up and running with
+your own sphinx documentation system. We'll cover everything from
+installing sphinx, to customizing the look and feel, to using custom
+extensions for embedding plots, inheritance diagrams, syntax
+highlighted ipython sessions and more. If you follow along the
+tutorial, you'll start with nothing and end up with this site! The
+source code for this tutorial lives in mpl svn (see
+:ref:`fetching-the-data`)
+
+Contents:
+
+.. toctree::
+ :maxdepth: 2
+
+ getting_started.rst
+ custom_look.rst
+ extensions.rst
+ cheatsheet.rst
+ emacs_help.rst
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2009年08月11日 12:08:07
Revision: 7468
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7468&view=rev
Author: jdh2358
Date: 2009年08月11日 12:07:57 +0000 (2009年8月11日)
Log Message:
-----------
moving to trunk
Removed Paths:
-------------
 trunk/py4science/examples/sphinx_qs/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2009年08月11日 12:07:41
Revision: 7467
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7467&view=rev
Author: jdh2358
Date: 2009年08月11日 12:07:35 +0000 (2009年8月11日)
Log Message:
-----------
moving to trunk
Removed Paths:
-------------
 trunk/py4science/examples/sphinx_qs/_build/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2009年08月11日 12:07:24
Revision: 7466
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7466&view=rev
Author: jdh2358
Date: 2009年08月11日 12:07:15 +0000 (2009年8月11日)
Log Message:
-----------
moving to trunk
Removed Paths:
-------------
 trunk/py4science/examples/sphinx_qs/custom_look.rst
 trunk/py4science/examples/sphinx_qs/emacs_help.rst
 trunk/py4science/examples/sphinx_qs/extensions.rst
 trunk/py4science/examples/sphinx_qs/getting_started.rst
 trunk/py4science/examples/sphinx_qs/index.rst
 trunk/py4science/examples/sphinx_qs/pyplots/
 trunk/py4science/examples/sphinx_qs/sphinxext/
Deleted: trunk/py4science/examples/sphinx_qs/custom_look.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/custom_look.rst	2009年08月11日 12:06:06 UTC (rev 7465)
+++ trunk/py4science/examples/sphinx_qs/custom_look.rst	2009年08月11日 12:07:15 UTC (rev 7466)
@@ -1,62 +0,0 @@
-.. _custom_look:
-
-
-******************************************
-Customizing the look and feel of the site
-******************************************
-
-The `sphinx <http://sphinx.pocoo.org/>`_ site itself looks better than
-the sites created with the default css, so here we'll invoke Tufte's
-phrase "Intelligence imitates but genious steals and grab their css
-and part of their layout. As before, you can either get the required
-files :file:`_static/default.css`, :file:`_templates:layout.html` and
-:file:`_static\logo.png` from the website or svn (see
-:ref:`fetching-the-data`). Since I did a svn checkout before, I will
-just copy the stuff I need from there::
-
- home:~/tmp/sampledoc> cp ../sampledoc_tut/_static/default.css _static/
- home:~/tmp/sampledoc> cp ../sampledoc_tut/_templates/layout.html _templates/
- home:~/tmp/sampledoc> cp ../sampledoc_tut/_static/logo.png _static/
- home:~/tmp/sampledoc> ls _static/ _templates/
- _static/:
- basic_screenshot.png	default.css		logo.png
-
- _templates/:
- layout.html
-
-Sphinx will automatically pick up the css and layout html files since
-we put them in the default places with the default names, but we have
-to manually include the logo in our :file:`layout.html`. Let's take a
-look at the layout file: the first part puts a horizontal navigation
-bar at the top of our page, like you see on the `sphinx
-<http://sphinx.pocoo.org>`_ and `matplotlib
-<http://matplotlib.sourceforge.net/>`_ sites, the second part includes
-a logo that when we click on it will take us `home` and the last part
-moves the vertical navigation panels to the right side of the page::
-
- {% extends "!layout.html" %}
-
-
- {% block rootrellink %}
- <li><a href="{{ pathto('index') }}">home</a>|&nbsp;</li>
- <li><a href="{{ pathto('search') }}">search</a>|&nbsp;</li>
- <li><a href="{{ pathto('contents') }}">documentation </a> &raquo;</li>
- {% endblock %}
-
-
- {% block relbar1 %}
-
- <div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px">
- <a href="{{ pathto('index') }}"><img src="{{
- pathto("_static/logo.png", 1) }}" border="0" alt="sampledoc"/></a>
- </div>
- {{ super() }}
- {% endblock %}
-
- {# put the sidebar before the body #}
- {% block sidebar1 %}{{ sidebar() }}{% endblock %}
- {% block sidebar2 %}{% endblock %}
-
-Once you rebuild the site with a ``make html`` and reload the page in your browser, you should see a fancier site that looks like this
-
-.. image:: _static/fancy_screenshot.png
Deleted: trunk/py4science/examples/sphinx_qs/emacs_help.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/emacs_help.rst	2009年08月11日 12:06:06 UTC (rev 7465)
+++ trunk/py4science/examples/sphinx_qs/emacs_help.rst	2009年08月11日 12:07:15 UTC (rev 7466)
@@ -1,40 +0,0 @@
-.. _working-with-emacs:
-
-*******************
-Emacs ReST support
-*******************
-
-Emacs helpers
-=============
-
-There is an emacs mode `rst.el
-<http://docutils.sourceforge.net/tools/editors/emacs/rst.el>`_ which
-automates many important ReST tasks like building and updateing
-table-of-contents, and promoting or demoting section headings. Here
-is the basic ``.emacs`` configuration::
-
- (require 'rst)
- (setq auto-mode-alist
- (append '(("\\.txt$" . rst-mode)
- ("\\.rst$" . rst-mode)
- ("\\.rest$" . rst-mode)) auto-mode-alist))
-
-
-Some helpful functions::
-
- C-c TAB - rst-toc-insert
-
- Insert table of contents at point
-
- C-c C-u - rst-toc-update
-
- Update the table of contents at point
-
- C-c C-l rst-shift-region-left
-
- Shift region to the left
-
- C-c C-r rst-shift-region-right
-
- Shift region to the right
-
Deleted: trunk/py4science/examples/sphinx_qs/extensions.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/extensions.rst	2009年08月11日 12:06:06 UTC (rev 7465)
+++ trunk/py4science/examples/sphinx_qs/extensions.rst	2009年08月11日 12:07:15 UTC (rev 7466)
@@ -1,154 +0,0 @@
-.. _extensions:
-
-
-****************************************************
-Sphinx extensions for embedded plots, math and more
-****************************************************
-
-Sphinx is written in python, and supports the ability to write custom
-extensions. We've written a few for the matplotlib documentation,
-some of which are part of matplotlib itself in the
-matplotlib.sphinxext module, some of which are included only in the
-sphinx doc directory, and there are other extensions written by other
-groups, eg numpy and ipython. We're collecting these in this tutorial
-and showing you how to install and use them for your own project.
-First let's grab the python extension files from the :file:`sphinxext`
-directory from svn (see :ref:`fetching-the-data`, and install them in
-our :file:`sampledoc` project :file:`sphinxext` directory::
-
- home:~/tmp/sampledoc> mkdir sphinxext
- home:~/tmp/sampledoc> cp ../sampledoc_tut/sphinxext/*.py sphinxext/
- home:~/tmp/sampledoc> ls sphinxext/
- apigen.py inheritance_diagram.py
- docscrape.py ipython_console_highlighting.py
- docscrape_sphinx.py numpydoc.py
-
-In addition to the builtin matplotlib extensions for embedding pyplot
-plots and rendering math with matplotlib's native math engine, we also
-have extensions for syntax highlighting ipython sessions, making
-inhertiance diagrams, and more. 
-
-We need to inform sphinx of our new extensions in the :file:`conf.py`
-file by adding the following. First we tell it where to find the extensions::
-
- # If your extensions are in another directory, add it here. If the
- # directory is relative to the documentation root, use
- # os.path.abspath to make it absolute, like shown here.
- sys.path.append(os.path.abspath('sphinxext'))
-
-And then we tell it what extensions to load::
- 
- # Add any Sphinx extension module names here, as strings. They can
- # be extensions coming with Sphinx (named 'sphinx.ext.*') or your
- # custom ones.
- extensions = ['matplotlib.sphinxext.mathmpl',
- 'matplotlib.sphinxext.only_directives',
- 'matplotlib.sphinxext.plot_directive',
- 'sphinx.ext.autodoc',
- 'sphinx.ext.doctest',
- 'ipython_console_highlighting',
- 'inheritance_diagram',
- 'numpydoc']
-
-
-Now let's look at some of these in action. You can see the literal
-source for this file at :ref:`extensions-literal`.
-
-
-.. _ipython-highlighting:
-
-ipython sessions
-================
-
-Michael Droettboom contributed a sphinx extension which does pygments
-syntax highlighting on ipython sessions
-
-.. sourcecode:: ipython
-
- In [69]: lines = plot([1,2,3])
-
- In [70]: setp(lines)
- alpha: float
- animated: [True | False]
- antialiased or aa: [True | False]
- ...snip
-
-This support is included in this template, but will also be included
-in a future version of Pygments by default.
-
-.. _using-math:
-
-Using math
-==========
-
-In sphinx you can include inline math :math:`x\leftarrow y\ x\forall
-y\ x-y` or display math
-
-.. math::
-
- W^{3\beta}_{\delta_1 \rho_1 \sigma_2} = U^{3\beta}_{\delta_1 \rho_1} + \frac{1}{8 \pi 2} \int^{\alpha_2}_{\alpha_2} d \alpha^\prime_2 \left[\frac{ U^{2\beta}_{\delta_1 \rho_1} - \alpha^\prime_2U^{1\beta}_{\rho_1 \sigma_2} }{U^{0\beta}_{\rho_1 \sigma_2}}\right]
-
-This documentation framework includes a Sphinx extension,
-:file:`sphinxext/mathmpl.py`, that uses matplotlib to render math
-equations when generating HTML, and LaTeX itself when generating a
-PDF. This can be useful on systems that have matplotlib, but not
-LaTeX, installed. To use it, add ``mathmpl`` to the list of
-extensions in :file:`conf.py`.
-
-Current SVN versions of Sphinx now include built-in support for math.
-There are two flavors:
-
- - pngmath: uses dvipng to render the equation
-
- - jsmath: renders the math in the browser using Javascript
-
-To use these extensions instead, add ``sphinx.ext.pngmath`` or
-``sphinx.ext.jsmath`` to the list of extensions in :file:`conf.py`.
-
-All three of these options for math are designed to behave in the same
-way.
-
-.. _emacs-helpers:
-
-Inserting matplotlib plots
-==========================
-
-Inserting automatically-generated plots is easy. Simply put the
-script to generate the plot in the :file:`pyplots` directory, and
-refer to it using the ``plot`` directive. To include the source code
-for the plot in the document, pass the ``include-source`` parameter::
-
- .. plot:: pyplots/ellipses.py
- :include-source:
-
-In the HTML version of the document, the plot includes links to the
-original source code, a high-resolution PNG and a PDF. In the PDF
-version of the document, the plot is included as a scalable PDF.
-
-.. plot:: pyplots/ellipses.py
- :include-source:
-
-Inheritance diagrams
-====================
-
-Inheritance diagrams can be inserted directly into the document by
-providing a list of class or module names to the
-``inheritance-diagram`` directive.
-
-For example::
-
- .. inheritance-diagram:: codecs
-
-produces:
-
-.. inheritance-diagram:: codecs
-
-
-.. _extensions-literal:
-
-This file
-=========
-
-.. literalinclude:: extensions.rst
-
-
Deleted: trunk/py4science/examples/sphinx_qs/getting_started.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/getting_started.rst	2009年08月11日 12:06:06 UTC (rev 7465)
+++ trunk/py4science/examples/sphinx_qs/getting_started.rst	2009年08月11日 12:07:15 UTC (rev 7466)
@@ -1,105 +0,0 @@
-.. _getting_started:
-
-
-***************
-Getting started
-***************
-
-.. _installing-docdir:
-
-Installing your doc directory
-=============================
-
-You may already have sphinx `sphinx <http://sphinx.pocoo.org/>`_
-installed -- you can check by doing::
-
- python -c 'import sphinx'
-
-If that fails grab the latest version of and install it with::
-
- > sudo easy_install sphinx
-
-Now you are ready to build a template for your docs, using
-sphinx-quickstart::
-
- > sphinx-quickstart
-
-accepting most of the defaults. I choose "sampledoc" as the name of my
-project. cd into your new directory and check the contents::
-
- home:~/tmp/sampledoc> ls
- Makefile	_static		conf.py
- _build		_templates	index.rst
-
-The index.rst is the master ReST for your project, but before adding
-anything, let's see if we can build some html::
-
- make html
-
-If you now point your browser to :file:`_build/html/index.html`, you
-should see a basic spinx site.
-
-.. image:: _static/basic_screenshot.png
-
-.. _fetching-the-data:
-
-Fetching the data
------------------
-
-Now we will start to customize out docs. Grab a couple of files from
-the `web site
-<http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/sampledoc_tut/>`_
-or svn. You will need :file:`getting_started.rst` and
-:file:`_static/basic_screenshot.png`. All of the files live in the
-"completed" version of this tutorial, but since this is a tutorial,
-we'll just grab them one at a time, so you can learn what needs to be
-changed where. Since we have more files to come, I'm going to grab
-the whole svn directory and just copy the files I need over for now.
-First, I'll cd to the directory containing my project, and get the
-"finished" product, and then copy in just the files I need::
-
- home:~/tmp/sampledoc> pwd
- /Users/jdhunter/tmp/sampledoc
- home:~/tmp/sampledoc> cd ..
- home:~/tmp> svn co
- https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/\
- sampledoc_tut
- A sampledoc_tut/cheatsheet.rst
- A sampledoc_tut/_static
- A sampledoc_tut/_static/basic_screenshot.png
- A sampledoc_tut/conf.py
- A sampledoc_tut/Makefile
- A sampledoc_tut/_templates
- A sampledoc_tut/_build
- A sampledoc_tut/getting_started.rst
- A sampledoc_tut/index.rst
- Checked out revision 7449.
- home:~/tmp> cp sampledoc_tut/getting_started.rst sampledoc/
- home:~/tmp> cp sampledoc_tut/_static/basic_screenshot.png sampledoc/_static/
-
-Now we are ready to rebuild the docs. We used the image directory to
-include to the screenshot above with::
-
- .. image:: _static/basic_screenshot.png
-
-The last step is to modify :file:`index.rst` to include the
-getting_started file (be careful with the indentation, the
-"getting_started" should line up with the ':' in ``:maxdepth``::
-
- Contents:
-
- .. toctree::
- :maxdepth: 2
-
- getting_started.rst
-
-and then rebuild the docs with ``make html``. When you reload the
-page, you should see a link to the "Getting Started" docs, and in
-there this page with the screenshot. `Voila!`
-
-
-Next we'll customize the look and feel of our site to give it a logo,
-some custom css, and update the navigation panels to look more like
-the `sphinx <http://sphinx.pocoo.org/>`_ site itself -- see
-:ref:`custom_look`.
-
Deleted: trunk/py4science/examples/sphinx_qs/index.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/index.rst	2009年08月11日 12:06:06 UTC (rev 7465)
+++ trunk/py4science/examples/sphinx_qs/index.rst	2009年08月11日 12:07:15 UTC (rev 7466)
@@ -1,35 +0,0 @@
-.. sampledoc documentation master file, created by
- sphinx-quickstart on Tue Aug 11 05:04:40 2009.
- You can adapt this file completely to your liking, but it should at least
- contain the root `toctree` directive.
-
-sampledoc tutorial
-==================
-
-This is a tutorial introduction to quickly get you up and running with
-your own sphinx documentation system. We'll cover everything from
-installing sphinx, to customizing the look and feel, to using custom
-extensions for embedding plots, inheritance diagrams, syntax
-highlighted ipython sessions and more. If you follow along the
-tutorial, you'll start with nothing and end up with this site! The
-source code for this tutorial lives in mpl svn (see
-:ref:`fetching-the-data`)
-
-Contents:
-
-.. toctree::
- :maxdepth: 2
-
- getting_started.rst
- custom_look.rst
- extensions.rst
- cheatsheet.rst
- emacs_help.rst
-
-Indices and tables
-==================
-
-* :ref:`genindex`
-* :ref:`modindex`
-* :ref:`search`
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2009年08月11日 12:06:14
Revision: 7465
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7465&view=rev
Author: jdh2358
Date: 2009年08月11日 12:06:06 +0000 (2009年8月11日)
Log Message:
-----------
moving to trunk
Modified Paths:
--------------
 trunk/py4science/examples/sphinx_qs/custom_look.rst
 trunk/py4science/examples/sphinx_qs/extensions.rst
 trunk/py4science/examples/sphinx_qs/getting_started.rst
 trunk/py4science/examples/sphinx_qs/index.rst
Removed Paths:
-------------
 trunk/py4science/examples/sphinx_qs/Makefile
 trunk/py4science/examples/sphinx_qs/_static/
 trunk/py4science/examples/sphinx_qs/_templates/
 trunk/py4science/examples/sphinx_qs/cheatsheet.rst
 trunk/py4science/examples/sphinx_qs/conf.py
Deleted: trunk/py4science/examples/sphinx_qs/Makefile
===================================================================
--- trunk/py4science/examples/sphinx_qs/Makefile	2009年08月11日 11:58:11 UTC (rev 7464)
+++ trunk/py4science/examples/sphinx_qs/Makefile	2009年08月11日 12:06:06 UTC (rev 7465)
@@ -1,93 +0,0 @@
-# Makefile for Sphinx documentation
-#
-
-# You can set these variables from the command line.
-SPHINXOPTS =
-SPHINXBUILD = sphinx-build
-PAPER =
-
-# Internal variables.
-PAPEROPT_a4 = -D latex_paper_size=a4
-PAPEROPT_letter = -D latex_paper_size=letter
-ALLSPHINXOPTS = -d _build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
-
-.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest
-
-help:
-	@echo "Please use \`make <target>' where <target> is one of"
-	@echo " html to make standalone HTML files"
-	@echo " dirhtml to make HTML files named index.html in directories"
-	@echo " pickle to make pickle files"
-	@echo " json to make JSON files"
-	@echo " htmlhelp to make HTML files and a HTML help project"
-	@echo " qthelp to make HTML files and a qthelp project"
-	@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
-	@echo " changes to make an overview of all changed/added/deprecated items"
-	@echo " linkcheck to check all external links for integrity"
-	@echo " doctest to run all doctests embedded in the documentation (if enabled)"
-
-clean:
-	-rm -rf _build/*
-
-html:
-	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html
-	@echo
-	@echo "Build finished. The HTML pages are in _build/html."
-
-dirhtml:
-	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) _build/dirhtml
-	@echo
-	@echo "Build finished. The HTML pages are in _build/dirhtml."
-
-pickle:
-	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) _build/pickle
-	@echo
-	@echo "Build finished; now you can process the pickle files."
-
-json:
-	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) _build/json
-	@echo
-	@echo "Build finished; now you can process the JSON files."
-
-htmlhelp:
-	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp
-	@echo
-	@echo "Build finished; now you can run HTML Help Workshop with the" \
-	 ".hhp project file in _build/htmlhelp."
-
-qthelp:
-	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) _build/qthelp
-	@echo
-	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
-	 ".qhcp project file in _build/qthelp, like this:"
-	@echo "# qcollectiongenerator _build/qthelp/sampledoc.qhcp"
-	@echo "To view the help file:"
-	@echo "# assistant -collectionFile _build/qthelp/sampledoc.qhc"
-
-latex:
-	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex
-	@echo
-	@echo "Build finished; the LaTeX files are in _build/latex."
-	@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
-	 "run these through (pdf)latex."
-
-changes:
-	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) _build/changes
-	@echo
-	@echo "The overview file is in _build/changes."
-
-linkcheck:
-	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) _build/linkcheck
-	@echo
-	@echo "Link check complete; look for any errors in the above output " \
-	 "or in _build/linkcheck/output.txt."
-
-doctest:
-	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) _build/doctest
-	@echo "Testing of doctests in the sources finished, look at the " \
-	 "results in _build/doctest/output.txt."
-
-sf:
-	cd _build/html; \
-	rsync -avz . jdh2358,mat...@we...:/home/groups/m/ma/matplotlib/htdocs/sampledoc -essh --cvs-exclude
-
Deleted: trunk/py4science/examples/sphinx_qs/cheatsheet.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/cheatsheet.rst	2009年08月11日 11:58:11 UTC (rev 7464)
+++ trunk/py4science/examples/sphinx_qs/cheatsheet.rst	2009年08月11日 12:06:06 UTC (rev 7465)
@@ -1,98 +0,0 @@
-.. _cheat-sheet:
-
-******************
-Sphinx cheat sheet
-******************
-
-Here is a quick and dirty cheat sheet for some common stuff you want
-to do in sphinx and ReST. You can see the literal source for this
-file at :ref:`cheatsheet
--literal`.
- 
-
-.. _formatting-text:
-
-Formatting text
-===============
-
-You use inline markup to make text *italics*, **bold**, or ``monotype``.
-
-You can represent code blocks fairly easily::
-
- import numpy as np
- x = np.random.rand(12)
-
-Or literally include code:
-
-.. literalinclude:: pyplots/ellipses.py
-
-.. _making-a-list:
-
-Making a list
-=============
-
-It is easy to make lists in rest
-
-Bullet points
--------------
-
-This is a subsection making bullet points
-
-* point A
-
-* point B
-
-* point C
-
-
-Enumerated points
-------------------
-
-This is a subsection making numbered points
-
-#. point A
-
-#. point B
-
-#. point C
-
-
-.. _making-a-table:
-
-Making a table
-==============
-
-This shows you how to make a table -- if you only want to make a list see :ref:`making-a-list`.
-
-================== ============
-Name Age
-================== ============
-John D Hunter 40
-Cast of Thousands 41
-And Still More 42
-================== ============
-
-.. _making-links:
-
-Making links
-============
-
-It is easy to make a link to `yahoo <http://yahoo.com>`_ or to some
-section inside this document (see :ref:`making-a-table`) or another
-document.
-
-You can also reference classes, modules, functions, etc that are
-documented using the sphinx `autodoc
-<http://sphinx.pocoo.org/ext/autodoc.html>`_ facilites. For example,
-see the module :mod:`matplotlib.backend_bases` documentation, or the
-class :class:`~matplotlib.backend_bases.LocationEvent`, or the method
-:meth:`~matplotlib.backend_bases.FigureCanvasBase.mpl_connect`.
-
-
-
-.. _cheatsheet-literal:
-
-This file
-=========
-
-.. literalinclude:: cheatsheet.rst
Deleted: trunk/py4science/examples/sphinx_qs/conf.py
===================================================================
--- trunk/py4science/examples/sphinx_qs/conf.py	2009年08月11日 11:58:11 UTC (rev 7464)
+++ trunk/py4science/examples/sphinx_qs/conf.py	2009年08月11日 12:06:06 UTC (rev 7465)
@@ -1,202 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# sampledoc documentation build configuration file, created by
-# sphinx-quickstart on Tue Aug 11 05:04:40 2009.
-#
-# This file is execfile()d with the current directory set to its containing dir.
-#
-# Note that not all possible configuration values are present in this
-# autogenerated file.
-#
-# All configuration values have a default; values that are commented out
-# serve to show the default.
-
-import sys, os
-
-# If your extensions are in another directory, add it here. If the directory
-# is relative to the documentation root, use os.path.abspath to make it
-# absolute, like shown here.
-sys.path.append(os.path.abspath('sphinxext'))
-
-# -- General configuration -----------------------------------------------------
-
-# Add any Sphinx extension module names here, as strings. They can be extensions
-# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['matplotlib.sphinxext.mathmpl',
- 'matplotlib.sphinxext.only_directives',
- 'matplotlib.sphinxext.plot_directive',
- 'sphinx.ext.autodoc',
- 'sphinx.ext.doctest',
- 'ipython_console_highlighting',
- 'inheritance_diagram',
- 'numpydoc']
-
-
-# Add any paths that contain templates here, relative to this directory.
-templates_path = ['_templates']
-
-# The suffix of source filenames.
-source_suffix = '.rst'
-
-# The encoding of source files.
-#source_encoding = 'utf-8'
-
-# The master toctree document.
-master_doc = 'index'
-
-# General information about the project.
-project = u'sampledoc'
-copyright = u'2009, jdh'
-
-# The version info for the project you're documenting, acts as replacement for
-# |version| and |release|, also used in various other places throughout the
-# built documents.
-#
-# The short X.Y version.
-version = '1.0'
-# The full version, including alpha/beta/rc tags.
-release = '1.0'
-
-# The language for content autogenerated by Sphinx. Refer to documentation
-# for a list of supported languages.
-#language = None
-
-# There are two options for replacing |today|: either, you set today to some
-# non-false value, then it is used:
-#today = ''
-# Else, today_fmt is used as the format for a strftime call.
-#today_fmt = '%B %d, %Y'
-
-# List of documents that shouldn't be included in the build.
-#unused_docs = []
-
-# List of directories, relative to source directory, that shouldn't be searched
-# for source files.
-exclude_trees = ['_build']
-
-# The reST default role (used for this markup: `text`) to use for all documents.
-#default_role = None
-
-# If true, '()' will be appended to :func: etc. cross-reference text.
-#add_function_parentheses = True
-
-# If true, the current module name will be prepended to all description
-# unit titles (such as .. function::).
-#add_module_names = True
-
-# If true, sectionauthor and moduleauthor directives will be shown in the
-# output. They are ignored by default.
-#show_authors = False
-
-# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'sphinx'
-
-# A list of ignored prefixes for module index sorting.
-#modindex_common_prefix = []
-
-
-# -- Options for HTML output ---------------------------------------------------
-
-# The theme to use for HTML and HTML Help pages. Major themes that come with
-# Sphinx are currently 'default' and 'sphinxdoc'.
-html_theme = 'default'
-
-# Theme options are theme-specific and customize the look and feel of a theme
-# further. For a list of options available for each theme, see the
-# documentation.
-#html_theme_options = {}
-
-# Add any paths that contain custom themes here, relative to this directory.
-#html_theme_path = []
-
-# The name for this set of Sphinx documents. If None, it defaults to
-# "<project> v<release> documentation".
-#html_title = None
-
-# A shorter title for the navigation bar. Default is the same as html_title.
-#html_short_title = None
-
-# The name of an image file (relative to this directory) to place at the top
-# of the sidebar.
-#html_logo = None
-
-# The name of an image file (within the static path) to use as favicon of the
-# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
-# pixels large.
-#html_favicon = None
-
-# Add any paths that contain custom static files (such as style sheets) here,
-# relative to this directory. They are copied after the builtin static files,
-# so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ['_static']
-
-# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
-# using the given strftime format.
-#html_last_updated_fmt = '%b %d, %Y'
-
-# If true, SmartyPants will be used to convert quotes and dashes to
-# typographically correct entities.
-#html_use_smartypants = True
-
-# Custom sidebar templates, maps document names to template names.
-#html_sidebars = {}
-
-# Additional templates that should be rendered to pages, maps page names to
-# template names.
-#html_additional_pages = {}
-
-# If false, no module index is generated.
-#html_use_modindex = True
-
-# If false, no index is generated.
-#html_use_index = True
-
-# If true, the index is split into individual pages for each letter.
-#html_split_index = False
-
-# If true, links to the reST sources are added to the pages.
-#html_show_sourcelink = True
-
-# If true, an OpenSearch description file will be output, and all pages will
-# contain a <link> tag referring to it. The value of this option must be the
-# base URL from which the finished HTML is served.
-#html_use_opensearch = ''
-
-# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
-#html_file_suffix = ''
-
-# Output file base name for HTML help builder.
-htmlhelp_basename = 'sampledocdoc'
-
-
-# -- Options for LaTeX output --------------------------------------------------
-
-# The paper size ('letter' or 'a4').
-#latex_paper_size = 'letter'
-
-# The font size ('10pt', '11pt' or '12pt').
-#latex_font_size = '10pt'
-
-# Grouping the document tree into LaTeX files. List of tuples
-# (source start file, target name, title, author, documentclass [howto/manual]).
-latex_documents = [
- ('index', 'sampledoc.tex', u'sampledoc Documentation',
- u'jdh', 'manual'),
-]
-
-# The name of an image file (relative to this directory) to place at the top of
-# the title page.
-#latex_logo = None
-
-# For "manual" documents, if this is true, then toplevel headings are parts,
-# not chapters.
-#latex_use_parts = False
-
-# Additional stuff for the LaTeX preamble.
-#latex_preamble = ''
-
-# Documents to append as an appendix to all manuals.
-#latex_appendices = []
-
-# If false, no module index is generated.
-#latex_use_modindex = True
Modified: trunk/py4science/examples/sphinx_qs/custom_look.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/custom_look.rst	2009年08月11日 11:58:11 UTC (rev 7464)
+++ trunk/py4science/examples/sphinx_qs/custom_look.rst	2009年08月11日 12:06:06 UTC (rev 7465)
@@ -14,9 +14,9 @@
 :ref:`fetching-the-data`). Since I did a svn checkout before, I will
 just copy the stuff I need from there::
 
- home:~/tmp/sampledoc> cp ../sphinx_qs/_static/default.css _static/
- home:~/tmp/sampledoc> cp ../sphinx_qs/_templates/layout.html _templates/
- home:~/tmp/sampledoc> cp ../sphinx_qs/_static/logo.png _static/
+ home:~/tmp/sampledoc> cp ../sampledoc_tut/_static/default.css _static/
+ home:~/tmp/sampledoc> cp ../sampledoc_tut/_templates/layout.html _templates/
+ home:~/tmp/sampledoc> cp ../sampledoc_tut/_static/logo.png _static/
 home:~/tmp/sampledoc> ls _static/ _templates/
 _static/:
 basic_screenshot.png	default.css		logo.png
Modified: trunk/py4science/examples/sphinx_qs/extensions.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/extensions.rst	2009年08月11日 11:58:11 UTC (rev 7464)
+++ trunk/py4science/examples/sphinx_qs/extensions.rst	2009年08月11日 12:06:06 UTC (rev 7465)
@@ -17,7 +17,7 @@
 our :file:`sampledoc` project :file:`sphinxext` directory::
 
 home:~/tmp/sampledoc> mkdir sphinxext
- home:~/tmp/sampledoc> cp ../sphinx_qs/sphinxext/*.py sphinxext/
+ home:~/tmp/sampledoc> cp ../sampledoc_tut/sphinxext/*.py sphinxext/
 home:~/tmp/sampledoc> ls sphinxext/
 apigen.py inheritance_diagram.py
 docscrape.py ipython_console_highlighting.py
Modified: trunk/py4science/examples/sphinx_qs/getting_started.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/getting_started.rst	2009年08月11日 11:58:11 UTC (rev 7464)
+++ trunk/py4science/examples/sphinx_qs/getting_started.rst	2009年08月11日 12:06:06 UTC (rev 7465)
@@ -48,7 +48,7 @@
 
 Now we will start to customize out docs. Grab a couple of files from
 the `web site
-<http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/py4science/examples/sphinx_qs/>`_
+<http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/sampledoc_tut/>`_
 or svn. You will need :file:`getting_started.rst` and
 :file:`_static/basic_screenshot.png`. All of the files live in the
 "completed" version of this tutorial, but since this is a tutorial,
@@ -63,19 +63,19 @@
 home:~/tmp/sampledoc> cd ..
 home:~/tmp> svn co
 https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/\
- py4science/examples/sphinx_qs
- A sphinx_qs/cheatsheet.rst
- A sphinx_qs/_static
- A sphinx_qs/_static/basic_screenshot.png
- A sphinx_qs/conf.py
- A sphinx_qs/Makefile
- A sphinx_qs/_templates
- A sphinx_qs/_build
- A sphinx_qs/getting_started.rst
- A sphinx_qs/index.rst
+ sampledoc_tut
+ A sampledoc_tut/cheatsheet.rst
+ A sampledoc_tut/_static
+ A sampledoc_tut/_static/basic_screenshot.png
+ A sampledoc_tut/conf.py
+ A sampledoc_tut/Makefile
+ A sampledoc_tut/_templates
+ A sampledoc_tut/_build
+ A sampledoc_tut/getting_started.rst
+ A sampledoc_tut/index.rst
 Checked out revision 7449.
- home:~/tmp> cp sphinx_qs/getting_started.rst sampledoc/
- home:~/tmp> cp sphinx_qs/_static/basic_screenshot.png sampledoc/_static/
+ home:~/tmp> cp sampledoc_tut/getting_started.rst sampledoc/
+ home:~/tmp> cp sampledoc_tut/_static/basic_screenshot.png sampledoc/_static/
 
 Now we are ready to rebuild the docs. We used the image directory to
 include to the screenshot above with::
Modified: trunk/py4science/examples/sphinx_qs/index.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/index.rst	2009年08月11日 11:58:11 UTC (rev 7464)
+++ trunk/py4science/examples/sphinx_qs/index.rst	2009年08月11日 12:06:06 UTC (rev 7465)
@@ -11,7 +11,9 @@
 installing sphinx, to customizing the look and feel, to using custom
 extensions for embedding plots, inheritance diagrams, syntax
 highlighted ipython sessions and more. If you follow along the
-tutorial, you'll start with nothing and end up with this site!
+tutorial, you'll start with nothing and end up with this site! The
+source code for this tutorial lives in mpl svn (see
+:ref:`fetching-the-data`)
 
 Contents:
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2009年08月11日 11:58:24
Revision: 7464
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7464&view=rev
Author: jdh2358
Date: 2009年08月11日 11:58:11 +0000 (2009年8月11日)
Log Message:
-----------
added sampledoc_tut
Modified Paths:
--------------
 trunk/py4science/examples/pyrex/nnbf/test_nnbf.py
 trunk/py4science/examples/skel/convolution_demo_skel.py
 trunk/py4science/examples/skel/glass_dots1_skel.py
 trunk/py4science/examples/skel/lotka_volterra_skel.py
 trunk/toolkits/basemap/geos-2.2.3/configure
 trunk/toolkits/basemap/geos-2.2.3/source/headers/config.h.in
Added Paths:
-----------
 trunk/sampledoc_tut/
Modified: trunk/py4science/examples/pyrex/nnbf/test_nnbf.py
===================================================================
--- trunk/py4science/examples/pyrex/nnbf/test_nnbf.py	2009年08月11日 11:55:35 UTC (rev 7463)
+++ trunk/py4science/examples/pyrex/nnbf/test_nnbf.py	2009年08月11日 11:58:11 UTC (rev 7464)
@@ -36,7 +36,8 @@
 
 
 
-def test_performance():
+if 1:
+#def test_performance():
 NUMDIM = 6
 nn = nnbf.NNBF(NUMDIM)
 
@@ -78,6 +79,6 @@
 
 if __name__=='__main__':
 
- nose.runmodule(argv=['-s','--with-doctest'], exit=False)
+ #nose.runmodule(argv=['-s','--with-doctest'], exit=False)
 pass
 
Modified: trunk/py4science/examples/skel/convolution_demo_skel.py
===================================================================
--- trunk/py4science/examples/skel/convolution_demo_skel.py	2009年08月11日 11:55:35 UTC (rev 7463)
+++ trunk/py4science/examples/skel/convolution_demo_skel.py	2009年08月11日 11:58:11 UTC (rev 7464)
@@ -13,7 +13,7 @@
 
 In this exercise, we will compute investigate the convolution of a
 white noise process with a double exponential impulse response
-function, and compute the results 
+function, and compute the results
 
 * using numpy.convolve
 
@@ -21,40 +21,40 @@
 temporal domain is a multiplication in the fourier domain
 """
 
-import numpy as npy
+import numpy as np
 import matplotlib.mlab as mlab
-from pylab import figure, show
+import matplotlib.pyplot as plt
 
 # build the time, input, output and response arrays
 dt = 0.01
-t = npy.arange(0.0, 20.0, dt) # the time vector from 0..20
+t = np.arange(0.0, 20.0, dt) # the time vector from 0..20
 Nt = len(t)
 
 def impulse_response(t):
 'double exponential response function'
- return (npy.exp(-t) - npy.exp(-5*t))*dt
+ return (np.exp(-t) - np.exp(-5*t))*dt
 
 
-x = npy.random.randn(Nt) # gaussian white noise
+x = np.random.randn(Nt) # gaussian white noise
 
 # evaluate the impulse response function, and numerically convolve it
 # with the input x
 r = impulse_response(t) # evaluate the impulse function
-y = npy.convolve(x, r, mode='full') # convultion of x with r
+y = np.convolve(x, r, mode='full') # convultion of x with r
 y = y[:Nt]
 
 # compute y by applying F^-1[F(x) * F(r)]. The fft assumes the signal
 # is periodic, so to avoid edge artificats, pad the fft with zeros up
 # to the length of r + x do avoid circular convolution artifacts
-R = npy.fft.fft(r, len(r)+len(x)-1)
-X = npy.fft.fft(x, len(r)+len(x)-1)
+R = np.fft.fft(r, len(r)+len(x)-1)
+X = np.fft.fft(x, len(r)+len(x)-1)
 Y = R*X
 
 # now inverse fft and extract just the part up to len(x)
-yi = npy.fft.ifft(Y)[:len(x)].real
+yi = np.fft.ifft(Y)[:len(x)].real
 
 # plot t vs x, t vs y and yi, and t vs r in three subplots
-fig = figure()
+fig = plt.figure()
 ax1 = fig.add_subplot(311)
 ax1.plot(t, x)
 ax1.set_ylabel('input x')
@@ -73,4 +73,4 @@
 
 fig.savefig('convolution_demo.png', dpi=150)
 fig.savefig('convolution_demo.eps')
-show()
+plt.show()
Modified: trunk/py4science/examples/skel/glass_dots1_skel.py
===================================================================
--- trunk/py4science/examples/skel/glass_dots1_skel.py	2009年08月11日 11:55:35 UTC (rev 7463)
+++ trunk/py4science/examples/skel/glass_dots1_skel.py	2009年08月11日 11:58:11 UTC (rev 7464)
@@ -6,10 +6,9 @@
 See L. Glass. 'Moire effect from random dots' Nature 223, 578580 (1969).
 """
 import cmath
-from numpy import cos, sin, pi, matrix
-import numpy as npy
+import numpy as np
 import numpy.linalg as linalg
-from pylab import figure, show
+import matplotlib.pyplot as plt
 
 
 def myeig(M):
@@ -18,10 +17,16 @@
 
 Solve quadratic:
 
- lamba^2 - tau*lambda + Delta = 0
+ lamba^2 - tau*lambda +/- Delta = 0
 
 where tau = trace(M) and Delta = Determinant(M)
- 
+
+ if M = | a b |
+ | c d |
+
+ the trace is a+d and the determinant is a*d-b*c
+
+ Return value is lambda1, lambda2
 """
 
 a,b = M[0,0], M[0,1]
@@ -32,31 +37,29 @@
 lambda1 = (tau + cmath.sqrt(tau**2 - 4*delta))/2.
 lambda2 = (tau - cmath.sqrt(tau**2 - 4*delta))/2.
 return lambda1, lambda2
- 
+
 # 2000 random x,y points in the interval[-0.5 ... 0.5]
-X1 = matrix(npy.random.rand(2,2000)
- )-0.5
+X1 = np.random.rand(2,2000)-0.5
 
-name = 'saddle'
-sx, sy, angle = 1.05, 0.95, 0.
+#name = 'saddle'
+#sx, sy, angle = 1.05, 0.95, 0.
 
-#name = 'center'
-#sx, sy, angle = 1., 1., 2.5
+name = 'center'
+sx, sy, angle = 1., 1., 2.5
 
 #name= 'stable focus' # spiral
 #sx, sy, angle = 0.95, 0.95, 2.5
 
-theta = angle * pi/180.
+theta = angle * cmath.pi/180.
 
+S = np.array([[sx, 0],
+ [0, sy]])
 
-S = matrix([[sx, 0],
- [0, sy]])
+R = np.array([[np.cos(theta), -np.sin(theta)],
+ [np.sin(theta), np.cos(theta)],])
 
-R = matrix([[cos(theta), -sin(theta)],
- [sin(theta), cos(theta)],])
+M = np.dot(S, R) # rotate then stretch
 
-M = S*R # rotate then stretch
-
 # compute the eigenvalues using numpy linear algebra
 vals, vecs = linalg.eig(M)
 print 'numpy eigenvalues', vals
@@ -66,17 +69,17 @@
 print 'analytic eigenvalues', avals
 
 # transform X1 by the matrix
-X2 = M*X1
+X2 = np.dot(M, X1)
 
 # plot the original x,y as green dots and the transformed x, y as red
 # dots
-fig = figure()
+fig = plt.figure()
 ax = fig.add_subplot(111)
 
-x1 = X1[0].flat
-y1 = X1[1].flat
-x2 = X2[0].flat
-y2 = X2[1].flat
+x1 = X1[0]
+y1 = X1[1]
+x2 = X2[0]
+y2 = X2[1]
 
 ax = fig.add_subplot(111)
 line1, line2 = ax.plot(x1, y1, 'go', x2, y2, 'ro', markersize=2)
@@ -85,4 +88,4 @@
 
 fig.savefig('glass_dots1.png', dpi=100)
 fig.savefig('glass_dots1.eps', dpi=100)
-show()
+plt.show()
Modified: trunk/py4science/examples/skel/lotka_volterra_skel.py
===================================================================
--- trunk/py4science/examples/skel/lotka_volterra_skel.py	2009年08月11日 11:55:35 UTC (rev 7463)
+++ trunk/py4science/examples/skel/lotka_volterra_skel.py	2009年08月11日 11:58:11 UTC (rev 7464)
@@ -9,7 +9,7 @@
 are scalars, 1D arrays or 2D arrays. The return value should have
 the same dimensionality (shape) as the inputs *r* and *f*.
 """
- raise NotImplementedError('insert missing code here')
+ raise NotImplementedError('Original solution has 1 line')
 
 def df(r, f):
 """
@@ -18,7 +18,7 @@
 are scalars, 1D arrays or 2D arrays. The return value should have
 the same dimensionality (shape) as the inputs *r* and *f*.
 """
- raise NotImplementedError('insert missing code here')
+ raise NotImplementedError('Original solution has 1 line')
 
 def derivs(state, t):
 """
@@ -29,9 +29,9 @@
 The return data should be [dr, df] which are the derivatives of r
 and f at position state and time *t*
 """
+ raise NotImplementedError('Original solution has 4 lines')
 
- raise NotImplementedError('insert missing code here')
-
+# the parameters for rabbit and fox growth and interactions
 alpha, delta = 1, .25
 beta, gamma = .2, .05
 
@@ -39,13 +39,23 @@
 r0 = 20
 f0 = 10
 
-t = np.arange(0.0, 100, 0.1)
+# create a time array from 0..100 sampled at 0.1 second steps
+raise NotImplementedError('Original solution has 1 line')
 
+
 y0 = [r0, f0] # the initial [rabbits, foxes] state vector
-y = integrate.odeint(derivs, y0, t)
-r = y[:,0] # extract the rabbits vector
-f = y[:,1] # extract the foxes vector
 
+# integrate your ODE using scipy.integrate. Read the help to see what
+# is available
+# HINT: see scipy.integrate.odeint
+raise NotImplementedError('Original solution has 1 line')
+
+# the return value from the integration is a Nx2 array. Extract it
+# into two 1D arrays caled r and f using numpy slice indexing
+raise NotImplementedError('Original solution has 2 lines')
+
+# time series plot: plot the population of rabbits and foxes as a
+# funciton of time
 plt.figure()
 plt.plot(t, r, label='rabbits')
 plt.plot(t, f, label='foxes')
@@ -57,35 +67,27 @@
 plt.savefig('lotka_volterra.png', dpi=150)
 plt.savefig('lotka_volterra.eps')
 
+# phase-plane plot: plot the population of foxes versus rabbits
+# make sure you include and xlabel, ylabel and title
+raise NotImplementedError('Original solution has 5 lines')
 
-plt.figure()
-plt.plot(r, f, color='red')
-plt.xlabel('rabbits')
-plt.ylabel('foxes')
-plt.title('phase plane')
 
+# Create 2D arrays for R and F to represent the entire phase plane --
+# the point (R[i,j], F[i,j]) is a single (rabbit, fox) combinations.
+# pass these arrays to the functions dr and df above to get 2D arrays
+# of dR and dF evaluated at every point in the phase plance.
+raise NotImplementedError('Original solution has 6 lines')
 
-# make a direction field plot with quiver
-rmax = 1.1 * r.max()
-fmax = 1.1 * f.max()
-R, F = np.meshgrid(np.arange(-1, rmax), np.arange(-1, fmax))
-dR = dr(R, F)
-dF = df(R, F)
-plt.quiver(R, F, dR, dF)
 
+# Now find the nul-clines, for dR and dF respectively. These are the
+# points where dR=0 and dF=0 in the (R, F) phase plane. You can use
+# matplotlib's countour routine to find the zero level. See the
+# levels keyword to contour. You will need a fine mesh of R and F,
+# reevaluate dr and df on the finer grid, and use contour to find the
+# level curves
+raise NotImplementedError('Original solution has 7 lines')
 
-R, F = np.meshgrid(np.arange(-1, rmax, .1), np.arange(-1, fmax, .1))
-dR = dr(R, F)
-dF = df(R, F)
-
-plt.contour(R, F, dR, levels=[0], linewidths=3, colors='blue')
-plt.contour(R, F, dF, levels=[0], linewidths=3, colors='green')
-plt.ylabel('foxes')
-plt.title('trajectory, direction field and null clines')
-
 plt.savefig('lotka_volterra_pplane.png', dpi=150)
 plt.savefig('lotka_volterra_pplane.eps')
-
-
 plt.show()
 
Modified: trunk/toolkits/basemap/geos-2.2.3/configure
===================================================================
--- trunk/toolkits/basemap/geos-2.2.3/configure	2009年08月11日 11:55:35 UTC (rev 7463)
+++ trunk/toolkits/basemap/geos-2.2.3/configure	2009年08月11日 11:58:11 UTC (rev 7464)
@@ -1,26 +1,55 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59.
+# Generated by GNU Autoconf 2.61.
 #
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 # This configure script is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
 ## --------------------- ##
 ## M4sh Initialization. ##
 ## --------------------- ##
 
-# Be Bourne compatible
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
 emulate sh
 NULLCMD=:
 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
 # is contrary to our usage. Disable this feature.
 alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
 fi
-DUALCASE=1; export DUALCASE # for MKS sh
 
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
 # Support unset when possible.
 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
 as_unset=unset
@@ -29,8 +58,43 @@
 fi
 
 
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" ""	$as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case 0ドル in
+ *[\\/]* ) as_myself=0ドル ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/0ドル" && as_myself=$as_dir/0ドル && break
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=0ドル
+fi
+if test ! -f "$as_myself"; then
+ echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ { (exit 1); exit 1; }
+fi
+
 # Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
 PS1='$ '
 PS2='> '
 PS4='+ '
@@ -44,18 +108,19 @@
 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
 eval $as_var=C; export $as_var
 else
- $as_unset $as_var
+ ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
 fi
 done
 
 # Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
 as_expr=expr
 else
 as_expr=false
 fi
 
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
 as_basename=basename
 else
 as_basename=false
@@ -63,157 +128,388 @@
 
 
 # Name of the executable.
-as_me=`$as_basename "0ドル" ||
+as_me=`$as_basename -- "0ドル" ||
 $as_expr X/"0ドル" : '.*/\([^/][^/]*\)/*$' \| \
 	 X"0ドル" : 'X\(//\)$' \| \
-	 X"0ドル" : 'X\(/\)$' \| \
-	 . : '\(.\)' 2>/dev/null ||
+	 X"0ドル" : 'X\(/\)' \| . 2>/dev/null ||
 echo X/"0ドル" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//1円/; q; }
- 	 /^X\/\(\/\/\)$/{ s//1円/; q; }
- 	 /^X\/\(\/\).*/{ s//1円/; q; }
- 	 s/.*/./; q'`
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+	 s//1円/
+	 q
+	 }
+	 /^X\/\(\/\/\)$/{
+	 s//1円/
+	 q
+	 }
+	 /^X\/\(\/\).*/{
+	 s//1円/
+	 q
+	 }
+	 s/.*/./; q'`
 
+# CDPATH.
+$as_unset CDPATH
 
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
 
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
+if test "x$CONFIG_SHELL" = x; then
+ if (eval ":") 2>/dev/null; then
+ as_have_required=yes
+else
+ as_have_required=no
 fi
 
+ if test $as_have_required = yes && 	 (eval ":
+(as_func_return () {
+ (exit \1ドル)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
 
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- case 0ドル in
- *[\\/]* ) as_myself=0ドル ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/0ドル" && as_myself=$as_dir/0ドル && break
-done
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
 
- ;;
- esac
- # We did not find ourselves, most probably we were run as `sh COMMAND'
- # in which case we are not to be found in the path.
- if test "x$as_myself" = x; then
- as_myself=0ドル
- fi
- if test ! -f "$as_myself"; then
- { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\1ドル\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0) || { (exit 1); exit 1; }
+
+(
+ as_lineno_1=\$LINENO
+ as_lineno_2=\$LINENO
+ test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
+ test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
+") 2> /dev/null; then
+ :
+else
+ as_candidate_shells=
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 do
 IFS=$as_save_IFS
 test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
-	 case $as_dir in
+ case $as_dir in
 	 /*)
-	 if ("$as_dir/$as_base" -c '
+	 for as_base in sh bash ksh sh5; do
+	 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+	 done;;
+ esac
+done
+IFS=$as_save_IFS
+
+
+ for as_shell in $as_candidate_shells $SHELL; do
+	 # Try only shells that exist, to save several forks.
+	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+		{ ("$as_shell") 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+_ASEOF
+}; then
+ CONFIG_SHELL=$as_shell
+	 as_have_required=yes
+	 if { "$as_shell" 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+(as_func_return () {
+ (exit 1ドル)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = "1ドル" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test $exitcode = 0) || { (exit 1); exit 1; }
+
+(
 as_lineno_1=$LINENO
 as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
 test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
-	 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
-	 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
-	 CONFIG_SHELL=$as_dir/$as_base
-	 export CONFIG_SHELL
-	 exec "$CONFIG_SHELL" "0ドル" ${1+"$@"}
-	 fi;;
-	 esac
- done
-done
-;;
- esac
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
 
+_ASEOF
+}; then
+ break
+fi
+
+fi
+
+ done
+
+ if test "x$CONFIG_SHELL" != x; then
+ for as_var in BASH_ENV ENV
+ do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ done
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+
+ if test $as_have_required = no; then
+ echo This script requires a shell more modern than all the
+ echo shells that I found on your system. Please install a
+ echo modern shell, or manually run the script under such a
+ echo shell if you do have one.
+ { (exit 1); exit 1; }
+fi
+
+
+fi
+
+fi
+
+
+
+(eval "as_func_return () {
+ (exit \1ドル)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\1ドル\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0") || {
+ echo No shell found that supports shell functions.
+ echo Please tell aut...@gn... about your system,
+ echo including any error possibly output before this
+ echo message
+}
+
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
 # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
+ # line-number line after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, and appends
+ # trailing '-' during substitution so that $LINENO is not a special
+ # case at line end.
 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
+ # scripts with optimization help from Paolo Bonzini. Blame Lee
+ # E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
 sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
 N
- s,,ドル-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),1円2円1円3,円
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/2円1円2円/
 t loop
- s,-,,ドル
- s,^['$as_cr_digits']*\n,,
+ s/-\n.*//
 ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
+ chmod +x "$as_me.lineno" ||
 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
 { (exit 1); exit 1; }; }
 
 # Don't try to exec as it changes $[0], causing all sort of problems
 # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensible to this).
- . ./$as_me.lineno
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
 # Exit status is that of the last command.
 exit
 }
 
 
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T='	' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
 esac
 
-if expr a : '\(a\)' >/dev/null 2>&1; then
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
 as_expr=expr
 else
 as_expr=false
 fi
 
 rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir
+fi
 echo >conf$$.file
 if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
 as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
 elif ln conf$$.file conf$$ 2>/dev/null; then
 as_ln_s=ln
 else
 as_ln_s='cp -p'
 fi
-rm -f conf$$ conf$$.exe conf$$.file
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
 
 if mkdir -p . 2>/dev/null; then
 as_mkdir_p=:
@@ -222,7 +518,28 @@
 as_mkdir_p=false
 fi
 
-as_executable_p="test -f"
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "1ドル"; then
+ test -d "1ドル/.";
+ else
+	case 1ドル in
+ -*)set "./1ドル";;
+	esac;
+	case `ls -ld'$as_ls_L_option' "1ドル" 2>/dev/null` in
+	???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -231,17 +548,8 @@
 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" 	$as_nl"
 
-# CDPATH.
-$as_unset CDPATH
 
-
-
 # Check that we are running under the correct shell.
 SHELL=${CONFIG_SHELL-/bin/sh}
 
@@ -395,29 +703,26 @@
 
 tagnames=${tagnames+${tagnames},}F77
 
+exec 7<&0 </dev/null 6>&1
+
 # Name of the host.
 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
 # so uname gets run too.
 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 
-exec 6>&1
-
 #
 # Initializations.
 #
 ac_default_prefix=/usr/local
+ac_clean_files=
 ac_config_libobj_dir=.
+LIBOBJS=
 cross_compiling=no
 subdirs=
 MFLAGS=
 MAKEFLAGS=
 SHELL=${CONFIG_SHELL-/bin/sh}
 
-# Maximum number of lines to put in a shell here document.
-# This variable seems obsolete. It should probably be removed, and
-# only ac_max_sed_lines should be used.
-: ${ac_max_here_lines=38}
-
 # Identity of this package.
 PACKAGE_NAME=
 PACKAGE_TARNAME=
@@ -429,43 +734,181 @@
 # Factoring default headers for most tests.
 ac_includes_default="\
 #include <stdio.h>
-#if HAVE_SYS_TYPES_H
+#ifdef HAVE_SYS_TYPES_H
 # include <sys/types.h>
 #endif
-#if HAVE_SYS_STAT_H
+#ifdef HAVE_SYS_STAT_H
 # include <sys/stat.h>
 #endif
-#if STDC_HEADERS
+#ifdef STDC_HEADERS
 # include <stdlib.h>
 # include <stddef.h>
 #else
-# if HAVE_STDLIB_H
+# ifdef HAVE_STDLIB_H
 # include <stdlib.h>
 # endif
 #endif
-#if HAVE_STRING_H
-# if !STDC_HEADERS && HAVE_MEMORY_H
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
 # include <memory.h>
 # endif
 # include <string.h>
 #endif
-#if HAVE_STRINGS_H
+#ifdef HAVE_STRINGS_H
 # include <strings.h>
 #endif
-#if HAVE_INTTYPES_H
+#ifdef HAVE_INTTYPES_H
 # include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-# include <stdint.h>
-# endif
 #endif
-#if HAVE_UNISTD_H
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB DLLTOOL ac_ct_DLLTOOL AS ac_ct_AS OBJDUMP ac_ct_OBJDUMP CPP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS ALLOCA VERSION VERSION_MAJOR VERSION_MINOR VERSION_PATCH INTERFACE_CURRENT INTERFACE_REVISION INTERFACE_AGE JTS_PORT CAPI_VERSION CAPI_VERSION_MAJOR CAPI_VERSION_MINOR CAPI_VERSION_PATCH CAPI_INTERFACE_CURRENT CAPI_INTERFACE_REVISION CAPI_INTERFACE_AGE LTLIBOBJS'
+ac_subst_vars='SHELL
+PATH_SEPARATOR
+PACKAGE_NAME
+PACKAGE_TARNAME
+PACKAGE_VERSION
+PACKAGE_STRING
+PACKAGE_BUGREPORT
+exec_prefix
+prefix
+program_transform_name
+bindir
+sbindir
+libexecdir
+datarootdir
+datadir
+sysconfdir
+sharedstatedir
+localstatedir
+includedir
+oldincludedir
+docdir
+infodir
+htmldir
+dvidir
+pdfdir
+psdir
+libdir
+localedir
+mandir
+DEFS
+ECHO_C
+ECHO_N
+ECHO_T
+LIBS
+build_alias
+host_alias
+target_alias
+build
+build_cpu
+build_vendor
+build_os
+host
+host_cpu
+host_vendor
+host_os
+target
+target_cpu
+target_vendor
+target_os
+INSTALL_PROGRAM
+INSTALL_SCRIPT
+INSTALL_DATA
+CYGPATH_W
+PACKAGE
+VERSION
+ACLOCAL
+AUTOCONF
+AUTOMAKE
+AUTOHEADER
+MAKEINFO
+install_sh
+STRIP
+INSTALL_STRIP_PROGRAM
+mkdir_p
+AWK
+SET_MAKE
+am__leading_dot
+AMTAR
+am__tar
+am__untar
+CC
+CFLAGS
+LDFLAGS
+CPPFLAGS
+ac_ct_CC
+EXEEXT
+OBJEXT
+DEPDIR
+am__include
+am__quote
+AMDEP_TRUE
+AMDEP_FALSE
+AMDEPBACKSLASH
+CCDEPMODE
+am__fastdepCC_TRUE
+am__fastdepCC_FALSE
+CXX
+CXXFLAGS
+ac_ct_CXX
+CXXDEPMODE
+am__fastdepCXX_TRUE
+am__fastdepCXX_FALSE
+GREP
+EGREP
+LN_S
+ECHO
+AR
+RANLIB
+DLLTOOL
+AS
+OBJDUMP
+CPP
+CXXCPP
+F77
+FFLAGS
+ac_ct_F77
+LIBTOOL
+LIBOBJS
+ALLOCA
+VERSION_MAJOR
+VERSION_MINOR
+VERSION_PATCH
+INTERFACE_CURRENT
+INTERFACE_REVISION
+INTERFACE_AGE
+JTS_PORT
+CAPI_VERSION
+CAPI_VERSION_MAJOR
+CAPI_VERSION_MINOR
+CAPI_VERSION_PATCH
+CAPI_INTERFACE_CURRENT
+CAPI_INTERFACE_REVISION
+CAPI_INTERFACE_AGE
+LTLIBOBJS'
 ac_subst_files=''
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CXX
+CXXFLAGS
+CCC
+CPP
+CXXCPP
+F77
+FFLAGS'
 
+
 # Initialize some variables set by options.
 ac_init_help=
 ac_init_version=false
@@ -491,34 +934,48 @@
 # and all the variables that are supposed to be based on exec_prefix
 # by default will actually change.
 # Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
 bindir='${exec_prefix}/bin'
 sbindir='${exec_prefix}/sbin'
 libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
+docdir='${datarootdir}/doc/${PACKAGE}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
 
 ac_prev=
+ac_dashdash=
 for ac_option
 do
 # If the previous option needs an argument, assign it.
 if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
+ eval $ac_prev=\$ac_option
 ac_prev=
 continue
 fi
 
- ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+ case $ac_option in
+ *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *)	ac_optarg=yes ;;
+ esac
 
 # Accept the important Cygnus configure options, so we can diagnose typos.
 
- case $ac_option in
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
 
 -bindir | --bindir | --bindi | --bind | --bin | --bi)
 ac_prev=bindir ;;
@@ -540,33 +997,45 @@
 --config-cache | -C)
 cache_file=config.cache ;;
 
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ -datadir | --datadir | --datadi | --datad)
 ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
 datadir=$ac_optarg ;;
 
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
 -disable-* | --disable-*)
 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
 # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
 { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- eval "enable_$ac_feature=no" ;;
+ ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+ eval enable_$ac_feature=no ;;
 
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
 -enable-* | --enable-*)
 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
 # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
 { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_$ac_feature='$ac_optarg'" ;;
+ ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+ eval enable_$ac_feature=\$ac_optarg ;;
 
 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -593,6 +1062,12 @@
 -host=* | --host=* | --hos=* | --ho=*)
 host_alias=$ac_optarg ;;
 
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
 -includedir | --includedir | --includedi | --included | --include \
 | --includ | --inclu | --incl | --inc)
 ac_prev=includedir ;;
@@ -617,13 +1092,16 @@
 | --libexe=* | --libex=* | --libe=*)
 libexecdir=$ac_optarg ;;
 
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
 -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
+ | --localstate | --localstat | --localsta | --localst | --locals)
 ac_prev=localstatedir ;;
 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
 localstatedir=$ac_optarg ;;
 
 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
@@ -688,6 +1166,16 @@
 | --progr-tra=* | --program-tr=* | --program-t=*)
 program_transform_name=$ac_optarg ;;
 
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
 | -silent | --silent | --silen | --sile | --sil)
 silent=yes ;;
@@ -740,24 +1228,20 @@
 -with-* | --with-*)
 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
 # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
 { echo "$as_me: error: invalid package name: $ac_package" >&2
 { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "with_$ac_package='$ac_optarg'" ;;
+ ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+ eval with_$ac_package=\$ac_optarg ;;
 
 -without-* | --without-*)
 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
 # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
 { echo "$as_me: error: invalid package name: $ac_package" >&2
 { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/-/_/g'`
- eval "with_$ac_package=no" ;;
+ ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+ eval with_$ac_package=no ;;
 
 --x)
 # Obsolete; use --with-x.
@@ -788,8 +1272,7 @@
 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
 { (exit 1); exit 1; }; }
- ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
- eval "$ac_envvar='$ac_optarg'"
+ eval $ac_envvar=\$ac_optarg
 export $ac_envvar ;;
 
 *)
@@ -809,29 +1292,21 @@
 { (exit 1); exit 1; }; }
 fi
 
-# Be sure to have absolute paths.
-for ac_var in exec_prefix prefix
+# Be sure to have absolute directory names.
+for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
+		datadir sysconfdir sharedstatedir localstatedir includedir \
+		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+		libdir localedir mandir
 do
- eval ac_val=$`echo $ac_var`
+ eval ac_val=\$$ac_var
 case $ac_val in
- [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
 esac
+ { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; }
 done
 
-# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
-	 localstatedir libdir includedir oldincludedir infodir mandir
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
- esac
-done
-
 # There might be people who depend on the old broken behavior: `$host'
 # used to hold the argument of --host etc.
 # FIXME: To remove some day.
@@ -856,94 +1331,76 @@
 test "$silent" = yes && exec 6>/dev/null
 
 
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ { echo "$as_me: error: Working directory cannot be determined" >&2
+ { (exit 1); exit 1; }; }
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ { echo "$as_me: error: pwd does not report name of working directory" >&2
+ { (exit 1); exit 1; }; }
+
+
 # Find the source files, if location was not specified.
 if test -z "$srcdir"; then
 ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_confdir=`(dirname "0ドル") 2>/dev/null ||
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "0ドル" ||
 $as_expr X"0ドル" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 	 X"0ドル" : 'X\(//\)[^/]' \| \
 	 X"0ドル" : 'X\(//\)$' \| \
-	 X"0ドル" : 'X\(/\)' \| \
-	 . : '\(.\)' 2>/dev/null ||
+	 X"0ドル" : 'X\(/\)' \| . 2>/dev/null ||
 echo X"0ドル" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//1円/; q; }
- 	 /^X\(\/\/\)[^/].*/{ s//1円/; q; }
- 	 /^X\(\/\/\)$/{ s//1円/; q; }
- 	 /^X\(\/\).*/{ s//1円/; q; }
- 	 s/.*/./; q'`
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	 s//1円/
+	 q
+	 }
+	 /^X\(\/\/\)[^/].*/{
+	 s//1円/
+	 q
+	 }
+	 /^X\(\/\/\)$/{
+	 s//1円/
+	 q
+	 }
+	 /^X\(\/\).*/{
+	 s//1円/
+	 q
+	 }
+	 s/.*/./; q'`
 srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
+ if test ! -r "$srcdir/$ac_unique_file"; then
 srcdir=..
 fi
 else
 ac_srcdir_defaulted=no
 fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
 { (exit 1); exit 1; }; }
- else
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+	cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
 { (exit 1); exit 1; }; }
- fi
+	pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
 fi
-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
- { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
- { (exit 1); exit 1; }; }
-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%1円%'`
-ac_env_build_alias_set=${build_alias+set}
-ac_env_build_alias_value=$build_alias
-ac_cv_env_build_alias_set=${build_alias+set}
-ac_cv_env_build_alias_value=$build_alias
-ac_env_host_alias_set=${host_alias+set}
-ac_env_host_alias_value=$host_alias
-ac_cv_env_host_alias_set=${host_alias+set}
-ac_cv_env_host_alias_value=$host_alias
-ac_env_target_alias_set=${target_alias+set}
-ac_env_target_alias_value=$target_alias
-ac_cv_env_target_alias_set=${target_alias+set}
-ac_cv_env_target_alias_value=$target_alias
-ac_env_CC_set=${CC+set}
-ac_env_CC_value=$CC
-ac_cv_env_CC_set=${CC+set}
-ac_cv_env_CC_value=$CC
-ac_env_CFLAGS_set=${CFLAGS+set}
-ac_env_CFLAGS_value=$CFLAGS
-ac_cv_env_CFLAGS_set=${CFLAGS+set}
-ac_cv_env_CFLAGS_value=$CFLAGS
-ac_env_LDFLAGS_set=${LDFLAGS+set}
-ac_env_LDFLAGS_value=$LDFLAGS
-ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
-ac_cv_env_LDFLAGS_value=$LDFLAGS
-ac_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_env_CPPFLAGS_value=$CPPFLAGS
-ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_cv_env_CPPFLAGS_value=$CPPFLAGS
-ac_env_CXX_set=${CXX+set}
-ac_env_CXX_value=$CXX
-ac_cv_env_CXX_set=${CXX+set}
-ac_cv_env_CXX_value=$CXX
-ac_env_CXXFLAGS_set=${CXXFLAGS+set}
-ac_env_CXXFLAGS_value=$CXXFLAGS
-ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
-ac_cv_env_CXXFLAGS_value=$CXXFLAGS
-ac_env_CPP_set=${CPP+set}
-ac_env_CPP_value=$CPP
-ac_cv_env_CPP_set=${CPP+set}
-ac_cv_env_CPP_value=$CPP
-ac_env_CXXCPP_set=${CXXCPP+set}
-ac_env_CXXCPP_value=$CXXCPP
-ac_cv_env_CXXCPP_set=${CXXCPP+set}
-ac_cv_env_CXXCPP_value=$CXXCPP
-ac_env_F77_set=${F77+set}
-ac_env_F77_value=$F77
-ac_cv_env_F77_set=${F77+set}
-ac_cv_env_F77_value=$F77
-ac_env_FFLAGS_set=${FFLAGS+set}
-ac_env_FFLAGS_value=$FFLAGS
-ac_cv_env_FFLAGS_set=${FFLAGS+set}
-ac_cv_env_FFLAGS_value=$FFLAGS
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
 
 #
 # Report the --help message.
@@ -972,9 +1429,6 @@
 -n, --no-create do not create output files
 --srcdir=DIR find the sources in DIR [configure dir or \`..']
 
-_ACEOF
-
- cat <<_ACEOF
 Installation directories:
 --prefix=PREFIX install architecture-independent files in PREFIX
 			 [$ac_default_prefix]
@@ -992,15 +1446,22 @@
 --bindir=DIR user executables [EPREFIX/bin]
 --sbindir=DIR system admin executables [EPREFIX/sbin]
 --libexecdir=DIR program executables [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data [PREFIX/share]
 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
 --libdir=DIR object code libraries [EPREFIX/lib]
 --includedir=DIR C header files [PREFIX/include]
 --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --infodir=DIR info documentation [PREFIX/info]
- --mandir=DIR man documentation [PREFIX/man]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
 _ACEOF
 
 cat <<\_ACEOF
@@ -1026,10 +1487,8 @@
 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
 --disable-dependency-tracking speeds up one-time build
 --enable-dependency-tracking do not reject slow dependency extractors
- --enable-shared[=PKGS]
- build shared libraries [default=yes]
- --enable-static[=PKGS]
- build static libraries [default=yes]
+ --enable-shared[=PKGS] build shared libraries [default=yes]
+ --enable-static[=PKGS] build static libraries [default=yes]
 --enable-fast-install[=PKGS]
 optimize for fast installation [default=yes]
 --disable-libtool-lock avoid locking (might break parallel builds)
@@ -1040,16 +1499,16 @@
 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
 --with-pic try to use only PIC/non-PIC objects [default=use
 both]
- --with-tags[=TAGS]
- include additional configurations [automatic]
+ --with-tags[=TAGS] include additional configurations [automatic]
 
 Some influential environment variables:
 CC C compiler command
 CFLAGS C compiler flags
 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
 nonstandard directory <lib dir>
- CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
- headers in a nonstandard directory <include dir>
+ LIBS libraries to pass to the linker, e.g. -l<library>
+ CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+ you have headers in a nonstandard directory <include dir>
 CXX C++ compiler command
 CXXFLAGS C++ compiler flags
 CPP C preprocessor
@@ -1061,118 +1520,86 @@
 it to find libraries and programs with nonstandard names/locations.
 
 _ACEOF
+ac_status=$?
 fi
 
 if test "$ac_init_help" = "recursive"; then
 # If there are subdirs, report their specific --help.
- ac_popdir=`pwd`
 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d $ac_dir || continue
+ test -d "$ac_dir" || continue
 ac_builddir=.
 
-if test "$ac_dir" != .; then
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
 
 case $srcdir in
- .) # No --srcdir option. We are building in place.
+ .) # We are building in place.
 ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/,,ドル'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
 ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
 esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
 
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
- cd $ac_dir
- # Check for guested configure; otherwise get Cygnus style configure.
- if test -f $ac_srcdir/configure.gnu; then
- echo
- $SHELL $ac_srcdir/configure.gnu --help=recursive
- elif test -f $ac_srcdir/configure; then
- echo
- $SHELL $ac_srcdir/configure --help=recursive
- elif test -f $ac_srcdir/configure.ac ||
-	 test -f $ac_srcdir/configure.in; then
- echo
- $ac_configure --help
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
 else
 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi
- cd $ac_popdir
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
 done
 fi
 
-test -n "$ac_init_help" && exit 0
+test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
 cat <<\_ACEOF
+configure
+generated by GNU Autoconf 2.61
 
-Copyright (C) 2003 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 _ACEOF
- exit 0
+ exit
 fi
-exec 5>config.log
-cat >&5 <<_ACEOF
+cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
 It was created by $as_me, which was
-generated by GNU Autoconf 2.59. Invocation command line was
+generated by GNU Autoconf 2.61. Invocation command line was
 
 $ 0ドル $@
 
 _ACEOF
+exec 5>>config.log
 {
 cat <<_ASUNAME
 ## --------- ##
@@ -1191,7 +1618,7 @@
 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
@@ -1205,6 +1632,7 @@
 test -z "$as_dir" && as_dir=.
 echo "PATH: $as_dir"
 done
+IFS=$as_save_IFS
 
 } >&5
 
@@ -1226,7 +1654,6 @@
 ac_configure_args=
 ac_configure_args0=
 ac_configure_args1=
-ac_sep=
 ac_must_keep_next=false
 for ac_pass in 1 2
 do
@@ -1237,7 +1664,7 @@
 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
 | -silent | --silent | --silen | --sile | --sil)
 continue ;;
- *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ *\'*)
 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
 esac
 case $ac_pass in
@@ -1259,9 +1686,7 @@
 	 -* ) ac_must_keep_next=true ;;
 	esac
 fi
- ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
- # Get rid of the leading space.
- ac_sep=" "
+ ac_configure_args="$ac_configure_args '$ac_arg'"
 ;;
 esac
 done
@@ -1272,8 +1697,8 @@
 # When interrupted or exit'd, cleanup temporary files, and complete
 # config.log. We remove comments because anyway the quotes in there
 # would cause problems or look ugly.
-# WARNING: Be sure not to use single quotes in there, as some shells,
-# such as our DU 5.0 friend, will then `close' the trap.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
 trap 'exit_status=$?
 # Save into config.log some information that might help in debugging.
 {
@@ -1286,20 +1711,34 @@
 _ASBOX
 echo
 # The following way of writing the cache mishandles newlines in values,
-{
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/1円/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ *) $as_unset $ac_var ;;
+ esac ;;
+ esac
+ done
 (set) 2>&1 |
- case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
 sed -n \
-	"s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
-	 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\1円='"'"'\2円'"'"'/p"
- ;;
+	"s/'\''/'\''\\\\'\'''\''/g;
+	 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\1円='\''\2円'\''/p"
+ ;; #(
 *)
- sed -n \
-	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\1円=\2円/p"
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
 ;;
- esac;
-}
+ esac |
+ sort
+)
 echo
 
 cat <<\_ASBOX
@@ -1310,22 +1749,28 @@
 echo
 for ac_var in $ac_subst_vars
 do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ echo "$ac_var='\''$ac_val'\''"
 done | sort
 echo
 
 if test -n "$ac_subst_files"; then
 cat <<\_ASBOX
-## ------------- ##
-## Output files. ##
-## ------------- ##
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
 _ASBOX
 echo
 for ac_var in $ac_subst_files
 do
-	eval ac_val=$`echo $ac_var`
-	echo "$ac_var='"'"'$ac_val'"'"'"
+	eval ac_val=\$$ac_var
+	case $ac_val in
+	*\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+	esac
+	echo "$ac_var='\''$ac_val'\''"
 done | sort
 echo
 fi
@@ -1337,26 +1782,24 @@
 ## ----------- ##
 _ASBOX
 echo
- sed "/^$/d" confdefs.h | sort
+ cat confdefs.h
 echo
 fi
 test "$ac_signal" != 0 &&
 echo "$as_me: caught signal $ac_signal"
 echo "$as_me: exit $exit_status"
 } >&5
- rm -f core *.core &&
- rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
 exit $exit_status
- ' 0
+' 0
 for ac_signal in 1 2 13 15; do
 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
 done
 ac_signal=0
 
 # confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo >confdefs.h
+rm -f -r conftest* confdefs.h
 
 # Predefined preprocessor variables.
 
@@ -1387,14 +1830,17 @@
 
 # Let the site file select an alternate cache file if it wants to.
 # Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
+if test -n "$CONFIG_SITE"; then
+ set x "$CONFIG_SITE"
+elif test "x$prefix" != xNONE; then
+ set x "$prefix/share/config.site" "$prefix/etc/config.site"
+else
+ set x "$ac_default_prefix/share/config.site" \
+	"$ac_default_prefix/etc/config.site"
 fi
-for ac_site_file in $CONFIG_SITE; do
+shift
+for ac_site_file
+do
 if test -r "$ac_site_file"; then
 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
 echo "$as_me: loading site script $ac_site_file" >&6;}
@@ -1410,8 +1856,8 @@
 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
 echo "$as_me: loading cache $cache_file" >&6;}
 case $cache_file in
- [\\/]* | ?:[\\/]* ) . $cache_file;;
- *) . ./$cache_file;;
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
 esac
 fi
 else
@@ -1423,12 +1869,11 @@
 # Che...
 
[truncated message content]
From: <jd...@us...> - 2009年08月11日 11:55:42
Revision: 7463
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7463&view=rev
Author: jdh2358
Date: 2009年08月11日 11:55:35 +0000 (2009年8月11日)
Log Message:
-----------
fixed the screenshot to reflect sampledoc name
Modified Paths:
--------------
 trunk/py4science/examples/sphinx_qs/Makefile
 trunk/py4science/examples/sphinx_qs/_static/basic_screenshot.png
 trunk/py4science/examples/sphinx_qs/getting_started.rst
 trunk/py4science/examples/sphinx_qs/index.rst
Modified: trunk/py4science/examples/sphinx_qs/Makefile
===================================================================
--- trunk/py4science/examples/sphinx_qs/Makefile	2009年08月11日 11:41:29 UTC (rev 7462)
+++ trunk/py4science/examples/sphinx_qs/Makefile	2009年08月11日 11:55:35 UTC (rev 7463)
@@ -86,3 +86,8 @@
 	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) _build/doctest
 	@echo "Testing of doctests in the sources finished, look at the " \
 	 "results in _build/doctest/output.txt."
+
+sf:
+	cd _build/html; \
+	rsync -avz . jdh2358,mat...@we...:/home/groups/m/ma/matplotlib/htdocs/sampledoc -essh --cvs-exclude
+
Modified: trunk/py4science/examples/sphinx_qs/_static/basic_screenshot.png
===================================================================
(Binary files differ)
Modified: trunk/py4science/examples/sphinx_qs/getting_started.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/getting_started.rst	2009年08月11日 11:41:29 UTC (rev 7462)
+++ trunk/py4science/examples/sphinx_qs/getting_started.rst	2009年08月11日 11:55:35 UTC (rev 7463)
@@ -5,9 +5,6 @@
 Getting started
 ***************
 
-Cheat sheet on how to make this site and install these extensions and
-other goodies. 
-
 .. _installing-docdir:
 
 Installing your doc directory
Modified: trunk/py4science/examples/sphinx_qs/index.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/index.rst	2009年08月11日 11:41:29 UTC (rev 7462)
+++ trunk/py4science/examples/sphinx_qs/index.rst	2009年08月11日 11:55:35 UTC (rev 7463)
@@ -6,6 +6,13 @@
 sampledoc tutorial
 ==================
 
+This is a tutorial introduction to quickly get you up and running with
+your own sphinx documentation system. We'll cover everything from
+installing sphinx, to customizing the look and feel, to using custom
+extensions for embedding plots, inheritance diagrams, syntax
+highlighted ipython sessions and more. If you follow along the
+tutorial, you'll start with nothing and end up with this site!
+
 Contents:
 
 .. toctree::
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 7462
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7462&view=rev
Author: jdh2358
Date: 2009年08月11日 11:41:29 +0000 (2009年8月11日)
Log Message:
-----------
update screenshots
Modified Paths:
--------------
 trunk/py4science/examples/sphinx_qs/_static/fancy_screenshot.png
Modified: trunk/py4science/examples/sphinx_qs/_static/fancy_screenshot.png
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2009年08月11日 11:40:07
Revision: 7461
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7461&view=rev
Author: jdh2358
Date: 2009年08月11日 11:40:00 +0000 (2009年8月11日)
Log Message:
-----------
rename project sampledoc
Modified Paths:
--------------
 trunk/py4science/examples/sphinx_qs/Makefile
 trunk/py4science/examples/sphinx_qs/_static/logo.png
 trunk/py4science/examples/sphinx_qs/conf.py
 trunk/py4science/examples/sphinx_qs/custom_look.rst
 trunk/py4science/examples/sphinx_qs/extensions.rst
 trunk/py4science/examples/sphinx_qs/getting_started.rst
 trunk/py4science/examples/sphinx_qs/index.rst
Modified: trunk/py4science/examples/sphinx_qs/Makefile
===================================================================
--- trunk/py4science/examples/sphinx_qs/Makefile	2009年08月11日 11:33:59 UTC (rev 7460)
+++ trunk/py4science/examples/sphinx_qs/Makefile	2009年08月11日 11:40:00 UTC (rev 7461)
@@ -60,9 +60,9 @@
 	@echo
 	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
 	 ".qhcp project file in _build/qthelp, like this:"
-	@echo "# qcollectiongenerator _build/qthelp/py4sci.qhcp"
+	@echo "# qcollectiongenerator _build/qthelp/sampledoc.qhcp"
 	@echo "To view the help file:"
-	@echo "# assistant -collectionFile _build/qthelp/py4sci.qhc"
+	@echo "# assistant -collectionFile _build/qthelp/sampledoc.qhc"
 
 latex:
 	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex
Modified: trunk/py4science/examples/sphinx_qs/_static/logo.png
===================================================================
(Binary files differ)
Modified: trunk/py4science/examples/sphinx_qs/conf.py
===================================================================
--- trunk/py4science/examples/sphinx_qs/conf.py	2009年08月11日 11:33:59 UTC (rev 7460)
+++ trunk/py4science/examples/sphinx_qs/conf.py	2009年08月11日 11:40:00 UTC (rev 7461)
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 #
-# py4sci documentation build configuration file, created by
+# sampledoc documentation build configuration file, created by
 # sphinx-quickstart on Tue Aug 11 05:04:40 2009.
 #
 # This file is execfile()d with the current directory set to its containing dir.
@@ -45,7 +45,7 @@
 master_doc = 'index'
 
 # General information about the project.
-project = u'py4sci'
+project = u'sampledoc'
 copyright = u'2009, jdh'
 
 # The version info for the project you're documenting, acts as replacement for
@@ -166,7 +166,7 @@
 #html_file_suffix = ''
 
 # Output file base name for HTML help builder.
-htmlhelp_basename = 'py4scidoc'
+htmlhelp_basename = 'sampledocdoc'
 
 
 # -- Options for LaTeX output --------------------------------------------------
@@ -180,7 +180,7 @@
 # Grouping the document tree into LaTeX files. List of tuples
 # (source start file, target name, title, author, documentclass [howto/manual]).
 latex_documents = [
- ('index', 'py4sci.tex', u'py4sci Documentation',
+ ('index', 'sampledoc.tex', u'sampledoc Documentation',
 u'jdh', 'manual'),
 ]
 
Modified: trunk/py4science/examples/sphinx_qs/custom_look.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/custom_look.rst	2009年08月11日 11:33:59 UTC (rev 7460)
+++ trunk/py4science/examples/sphinx_qs/custom_look.rst	2009年08月11日 11:40:00 UTC (rev 7461)
@@ -14,10 +14,10 @@
 :ref:`fetching-the-data`). Since I did a svn checkout before, I will
 just copy the stuff I need from there::
 
- home:~/tmp/py4sci> cp ../sphinx_qs/_static/default.css _static/
- home:~/tmp/py4sci> cp ../sphinx_qs/_templates/layout.html _templates/
- home:~/tmp/py4sci> cp ../sphinx_qs/_static/logo.png _static/
- home:~/tmp/py4sci> ls _static/ _templates/
+ home:~/tmp/sampledoc> cp ../sphinx_qs/_static/default.css _static/
+ home:~/tmp/sampledoc> cp ../sphinx_qs/_templates/layout.html _templates/
+ home:~/tmp/sampledoc> cp ../sphinx_qs/_static/logo.png _static/
+ home:~/tmp/sampledoc> ls _static/ _templates/
 _static/:
 basic_screenshot.png	default.css		logo.png
 
@@ -48,7 +48,7 @@
 
 <div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px">
 <a href="{{ pathto('index') }}"><img src="{{
- pathto("_static/logo.png", 1) }}" border="0" alt="py4sci"/></a>
+ pathto("_static/logo.png", 1) }}" border="0" alt="sampledoc"/></a>
 </div>
 {{ super() }}
 {% endblock %}
Modified: trunk/py4science/examples/sphinx_qs/extensions.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/extensions.rst	2009年08月11日 11:33:59 UTC (rev 7460)
+++ trunk/py4science/examples/sphinx_qs/extensions.rst	2009年08月11日 11:40:00 UTC (rev 7461)
@@ -14,11 +14,11 @@
 and showing you how to install and use them for your own project.
 First let's grab the python extension files from the :file:`sphinxext`
 directory from svn (see :ref:`fetching-the-data`, and install them in
-our :file:`py4sci` project :file:`sphinxext` directory::
+our :file:`sampledoc` project :file:`sphinxext` directory::
 
- home:~/tmp/py4sci> mkdir sphinxext
- home:~/tmp/py4sci> cp ../sphinx_qs/sphinxext/*.py sphinxext/
- home:~/tmp/py4sci> ls sphinxext/
+ home:~/tmp/sampledoc> mkdir sphinxext
+ home:~/tmp/sampledoc> cp ../sphinx_qs/sphinxext/*.py sphinxext/
+ home:~/tmp/sampledoc> ls sphinxext/
 apigen.py inheritance_diagram.py
 docscrape.py ipython_console_highlighting.py
 docscrape_sphinx.py numpydoc.py
Modified: trunk/py4science/examples/sphinx_qs/getting_started.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/getting_started.rst	2009年08月11日 11:33:59 UTC (rev 7460)
+++ trunk/py4science/examples/sphinx_qs/getting_started.rst	2009年08月11日 11:40:00 UTC (rev 7461)
@@ -27,10 +27,10 @@
 
 > sphinx-quickstart
 
-accepting most of the defaults. I choose "py4sci" as the name of my
+accepting most of the defaults. I choose "sampledoc" as the name of my
 project. cd into your new directory and check the contents::
 
- home:~/tmp/py4sci> ls
+ home:~/tmp/sampledoc> ls
 Makefile	_static		conf.py
 _build		_templates	index.rst
 
@@ -61,9 +61,9 @@
 First, I'll cd to the directory containing my project, and get the
 "finished" product, and then copy in just the files I need::
 
- home:~/tmp/py4sci> pwd
- /Users/jdhunter/tmp/py4sci
- home:~/tmp/py4sci> cd ..
+ home:~/tmp/sampledoc> pwd
+ /Users/jdhunter/tmp/sampledoc
+ home:~/tmp/sampledoc> cd ..
 home:~/tmp> svn co
 https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/\
 py4science/examples/sphinx_qs
@@ -77,8 +77,8 @@
 A sphinx_qs/getting_started.rst
 A sphinx_qs/index.rst
 Checked out revision 7449.
- home:~/tmp> cp sphinx_qs/getting_started.rst py4sci/
- home:~/tmp> cp sphinx_qs/_static/basic_screenshot.png py4sci/_static/
+ home:~/tmp> cp sphinx_qs/getting_started.rst sampledoc/
+ home:~/tmp> cp sphinx_qs/_static/basic_screenshot.png sampledoc/_static/
 
 Now we are ready to rebuild the docs. We used the image directory to
 include to the screenshot above with::
Modified: trunk/py4science/examples/sphinx_qs/index.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/index.rst	2009年08月11日 11:33:59 UTC (rev 7460)
+++ trunk/py4science/examples/sphinx_qs/index.rst	2009年08月11日 11:40:00 UTC (rev 7461)
@@ -1,10 +1,10 @@
-.. py4sci documentation master file, created by
+.. sampledoc documentation master file, created by
 sphinx-quickstart on Tue Aug 11 05:04:40 2009.
 You can adapt this file completely to your liking, but it should at least
 contain the root `toctree` directive.
 
-Welcome to py4sci's documentation!
-==================================
+sampledoc tutorial
+==================
 
 Contents:
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2009年08月11日 11:34:08
Revision: 7460
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7460&view=rev
Author: jdh2358
Date: 2009年08月11日 11:33:59 +0000 (2009年8月11日)
Log Message:
-----------
cleaned up some build errors and warnings
Modified Paths:
--------------
 trunk/py4science/examples/sphinx_qs/cheatsheet.rst
 trunk/py4science/examples/sphinx_qs/extensions.rst
 trunk/py4science/examples/sphinx_qs/getting_started.rst
Modified: trunk/py4science/examples/sphinx_qs/cheatsheet.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/cheatsheet.rst	2009年08月11日 11:27:30 UTC (rev 7459)
+++ trunk/py4science/examples/sphinx_qs/cheatsheet.rst	2009年08月11日 11:33:59 UTC (rev 7460)
@@ -24,10 +24,8 @@
 
 Or literally include code:
 
-.. literalinclude:: ../pyplots/ellipses.py
+.. literalinclude:: pyplots/ellipses.py
 
-
-
 .. _making-a-list:
 
 Making a list
@@ -81,7 +79,7 @@
 
 It is easy to make a link to `yahoo <http://yahoo.com>`_ or to some
 section inside this document (see :ref:`making-a-table`) or another
-document (see :ref:`final-results`).
+document.
 
 You can also reference classes, modules, functions, etc that are
 documented using the sphinx `autodoc
@@ -92,68 +90,6 @@
 
 
 
-.. _making-a-list:
-
-Making a list
-=============
-
-It is easy to make lists in rest
-
-Bullet points
--------------
-
-This is a subsection making bullet points
-
-* point A
-
-* point B
-
-* point C
-
-
-Enumerated points
-------------------
-
-This is a subsection making numbered points
-
-#. point A
-
-#. point B
-
-#. point C
-
-
-.. _making-a-table:
-
-Making a table
-==============
-
-This shows you how to make a table -- if you only want to make a list see :ref:`making-a-list`.
-
-================== ============
-Name Age
-================== ============
-John D Hunter 40
-Cast of Thousands 41
-And Still More 42
-================== ============
-
-.. _making-links:
-
-Making links
-============
-
-It is easy to make a link to `yahoo <http://yahoo.com>`_ or to some
-section inside this document (see :ref:`making-a-table`) or another
-document (see :ref:`final-results`).
-
-You can also reference classes, modules, functions, etc that are
-documented using the sphinx `autodoc
-<http://sphinx.pocoo.org/ext/autodoc.html>`_ facilites. For example,
-see the module :mod:`matplotlib.backend_bases` documentation, or the
-class :class:`~matplotlib.backend_bases.LocationEvent`, or the method
-:meth:`~matplotlib.backend_bases.FigureCanvasBase.mpl_connect`.
-
 .. _cheatsheet-literal:
 
 This file
Modified: trunk/py4science/examples/sphinx_qs/extensions.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/extensions.rst	2009年08月11日 11:27:30 UTC (rev 7459)
+++ trunk/py4science/examples/sphinx_qs/extensions.rst	2009年08月11日 11:33:59 UTC (rev 7460)
@@ -13,7 +13,7 @@
 groups, eg numpy and ipython. We're collecting these in this tutorial
 and showing you how to install and use them for your own project.
 First let's grab the python extension files from the :file:`sphinxext`
-directory from svn (see :ref:`getting-the-data`, and install them in
+directory from svn (see :ref:`fetching-the-data`, and install them in
 our :file:`py4sci` project :file:`sphinxext` directory::
 
 home:~/tmp/py4sci> mkdir sphinxext
@@ -118,7 +118,7 @@
 refer to it using the ``plot`` directive. To include the source code
 for the plot in the document, pass the ``include-source`` parameter::
 
- .. plot:: ../pyplots/ellipses.py
+ .. plot:: pyplots/ellipses.py
 :include-source:
 
 In the HTML version of the document, the plot includes links to the
Modified: trunk/py4science/examples/sphinx_qs/getting_started.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/getting_started.rst	2009年08月11日 11:27:30 UTC (rev 7459)
+++ trunk/py4science/examples/sphinx_qs/getting_started.rst	2009年08月11日 11:33:59 UTC (rev 7460)
@@ -9,6 +9,7 @@
 other goodies. 
 
 .. _installing-docdir:
+
 Installing your doc directory
 =============================
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2009年08月11日 11:27:39
Revision: 7459
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7459&view=rev
Author: jdh2358
Date: 2009年08月11日 11:27:30 +0000 (2009年8月11日)
Log Message:
-----------
fixed some build errors
Modified Paths:
--------------
 trunk/py4science/examples/sphinx_qs/conf.py
 trunk/py4science/examples/sphinx_qs/extensions.rst
 trunk/py4science/examples/sphinx_qs/index.rst
Modified: trunk/py4science/examples/sphinx_qs/conf.py
===================================================================
--- trunk/py4science/examples/sphinx_qs/conf.py	2009年08月11日 11:24:27 UTC (rev 7458)
+++ trunk/py4science/examples/sphinx_qs/conf.py	2009年08月11日 11:27:30 UTC (rev 7459)
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 #
 # py4sci documentation build configuration file, created by
-# sphinx-quickstart on Tue Aug 11 04:33:46 2009.
+# sphinx-quickstart on Tue Aug 11 05:04:40 2009.
 #
 # This file is execfile()d with the current directory set to its containing dir.
 #
@@ -13,17 +13,25 @@
 
 import sys, os
 
-# If extensions (or modules to document with autodoc) are in another directory,
-# add these directories to sys.path here. If the directory is relative to the
-# documentation root, use os.path.abspath to make it absolute, like shown here.
-#sys.path.append(os.path.abspath('.'))
+# If your extensions are in another directory, add it here. If the directory
+# is relative to the documentation root, use os.path.abspath to make it
+# absolute, like shown here.
+sys.path.append(os.path.abspath('sphinxext'))
 
 # -- General configuration -----------------------------------------------------
 
 # Add any Sphinx extension module names here, as strings. They can be extensions
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.autodoc']
+extensions = ['matplotlib.sphinxext.mathmpl',
+ 'matplotlib.sphinxext.only_directives',
+ 'matplotlib.sphinxext.plot_directive',
+ 'sphinx.ext.autodoc',
+ 'sphinx.ext.doctest',
+ 'ipython_console_highlighting',
+ 'inheritance_diagram',
+ 'numpydoc']
 
+
 # Add any paths that contain templates here, relative to this directory.
 templates_path = ['_templates']
 
@@ -45,9 +53,9 @@
 # built documents.
 #
 # The short X.Y version.
-version = '0.1'
+version = '1.0'
 # The full version, including alpha/beta/rc tags.
-release = '0.1'
+release = '1.0'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
Modified: trunk/py4science/examples/sphinx_qs/extensions.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/extensions.rst	2009年08月11日 11:24:27 UTC (rev 7458)
+++ trunk/py4science/examples/sphinx_qs/extensions.rst	2009年08月11日 11:27:30 UTC (rev 7459)
@@ -125,7 +125,7 @@
 original source code, a high-resolution PNG and a PDF. In the PDF
 version of the document, the plot is included as a scalable PDF.
 
-.. plot:: pyplots/elegant.py
+.. plot:: pyplots/ellipses.py
 :include-source:
 
 Inheritance diagrams
Modified: trunk/py4science/examples/sphinx_qs/index.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/index.rst	2009年08月11日 11:24:27 UTC (rev 7458)
+++ trunk/py4science/examples/sphinx_qs/index.rst	2009年08月11日 11:27:30 UTC (rev 7459)
@@ -14,6 +14,8 @@
 getting_started.rst
 custom_look.rst
 extensions.rst
+ cheatsheet.rst
+ emacs_help.rst
 
 Indices and tables
 ==================
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2009年08月11日 11:24:36
Revision: 7458
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7458&view=rev
Author: jdh2358
Date: 2009年08月11日 11:24:27 +0000 (2009年8月11日)
Log Message:
-----------
rename extensions
Modified Paths:
--------------
 trunk/py4science/examples/sphinx_qs/index.rst
Added Paths:
-----------
 trunk/py4science/examples/sphinx_qs/extensions.rst
Removed Paths:
-------------
 trunk/py4science/examples/sphinx_qs/sphinx_extensions.rst
Copied: trunk/py4science/examples/sphinx_qs/extensions.rst (from rev 7457, trunk/py4science/examples/sphinx_qs/sphinx_extensions.rst)
===================================================================
--- trunk/py4science/examples/sphinx_qs/extensions.rst	 (rev 0)
+++ trunk/py4science/examples/sphinx_qs/extensions.rst	2009年08月11日 11:24:27 UTC (rev 7458)
@@ -0,0 +1,154 @@
+.. _extensions:
+
+
+****************************************************
+Sphinx extensions for embedded plots, math and more
+****************************************************
+
+Sphinx is written in python, and supports the ability to write custom
+extensions. We've written a few for the matplotlib documentation,
+some of which are part of matplotlib itself in the
+matplotlib.sphinxext module, some of which are included only in the
+sphinx doc directory, and there are other extensions written by other
+groups, eg numpy and ipython. We're collecting these in this tutorial
+and showing you how to install and use them for your own project.
+First let's grab the python extension files from the :file:`sphinxext`
+directory from svn (see :ref:`getting-the-data`, and install them in
+our :file:`py4sci` project :file:`sphinxext` directory::
+
+ home:~/tmp/py4sci> mkdir sphinxext
+ home:~/tmp/py4sci> cp ../sphinx_qs/sphinxext/*.py sphinxext/
+ home:~/tmp/py4sci> ls sphinxext/
+ apigen.py inheritance_diagram.py
+ docscrape.py ipython_console_highlighting.py
+ docscrape_sphinx.py numpydoc.py
+
+In addition to the builtin matplotlib extensions for embedding pyplot
+plots and rendering math with matplotlib's native math engine, we also
+have extensions for syntax highlighting ipython sessions, making
+inhertiance diagrams, and more. 
+
+We need to inform sphinx of our new extensions in the :file:`conf.py`
+file by adding the following. First we tell it where to find the extensions::
+
+ # If your extensions are in another directory, add it here. If the
+ # directory is relative to the documentation root, use
+ # os.path.abspath to make it absolute, like shown here.
+ sys.path.append(os.path.abspath('sphinxext'))
+
+And then we tell it what extensions to load::
+ 
+ # Add any Sphinx extension module names here, as strings. They can
+ # be extensions coming with Sphinx (named 'sphinx.ext.*') or your
+ # custom ones.
+ extensions = ['matplotlib.sphinxext.mathmpl',
+ 'matplotlib.sphinxext.only_directives',
+ 'matplotlib.sphinxext.plot_directive',
+ 'sphinx.ext.autodoc',
+ 'sphinx.ext.doctest',
+ 'ipython_console_highlighting',
+ 'inheritance_diagram',
+ 'numpydoc']
+
+
+Now let's look at some of these in action. You can see the literal
+source for this file at :ref:`extensions-literal`.
+
+
+.. _ipython-highlighting:
+
+ipython sessions
+================
+
+Michael Droettboom contributed a sphinx extension which does pygments
+syntax highlighting on ipython sessions
+
+.. sourcecode:: ipython
+
+ In [69]: lines = plot([1,2,3])
+
+ In [70]: setp(lines)
+ alpha: float
+ animated: [True | False]
+ antialiased or aa: [True | False]
+ ...snip
+
+This support is included in this template, but will also be included
+in a future version of Pygments by default.
+
+.. _using-math:
+
+Using math
+==========
+
+In sphinx you can include inline math :math:`x\leftarrow y\ x\forall
+y\ x-y` or display math
+
+.. math::
+
+ W^{3\beta}_{\delta_1 \rho_1 \sigma_2} = U^{3\beta}_{\delta_1 \rho_1} + \frac{1}{8 \pi 2} \int^{\alpha_2}_{\alpha_2} d \alpha^\prime_2 \left[\frac{ U^{2\beta}_{\delta_1 \rho_1} - \alpha^\prime_2U^{1\beta}_{\rho_1 \sigma_2} }{U^{0\beta}_{\rho_1 \sigma_2}}\right]
+
+This documentation framework includes a Sphinx extension,
+:file:`sphinxext/mathmpl.py`, that uses matplotlib to render math
+equations when generating HTML, and LaTeX itself when generating a
+PDF. This can be useful on systems that have matplotlib, but not
+LaTeX, installed. To use it, add ``mathmpl`` to the list of
+extensions in :file:`conf.py`.
+
+Current SVN versions of Sphinx now include built-in support for math.
+There are two flavors:
+
+ - pngmath: uses dvipng to render the equation
+
+ - jsmath: renders the math in the browser using Javascript
+
+To use these extensions instead, add ``sphinx.ext.pngmath`` or
+``sphinx.ext.jsmath`` to the list of extensions in :file:`conf.py`.
+
+All three of these options for math are designed to behave in the same
+way.
+
+.. _emacs-helpers:
+
+Inserting matplotlib plots
+==========================
+
+Inserting automatically-generated plots is easy. Simply put the
+script to generate the plot in the :file:`pyplots` directory, and
+refer to it using the ``plot`` directive. To include the source code
+for the plot in the document, pass the ``include-source`` parameter::
+
+ .. plot:: ../pyplots/ellipses.py
+ :include-source:
+
+In the HTML version of the document, the plot includes links to the
+original source code, a high-resolution PNG and a PDF. In the PDF
+version of the document, the plot is included as a scalable PDF.
+
+.. plot:: pyplots/elegant.py
+ :include-source:
+
+Inheritance diagrams
+====================
+
+Inheritance diagrams can be inserted directly into the document by
+providing a list of class or module names to the
+``inheritance-diagram`` directive.
+
+For example::
+
+ .. inheritance-diagram:: codecs
+
+produces:
+
+.. inheritance-diagram:: codecs
+
+
+.. _extensions-literal:
+
+This file
+=========
+
+.. literalinclude:: extensions.rst
+
+
Modified: trunk/py4science/examples/sphinx_qs/index.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/index.rst	2009年08月11日 11:22:28 UTC (rev 7457)
+++ trunk/py4science/examples/sphinx_qs/index.rst	2009年08月11日 11:24:27 UTC (rev 7458)
@@ -13,7 +13,7 @@
 
 getting_started.rst
 custom_look.rst
- sphinx_extensions.rst
+ extensions.rst
 
 Indices and tables
 ==================
Deleted: trunk/py4science/examples/sphinx_qs/sphinx_extensions.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/sphinx_extensions.rst	2009年08月11日 11:22:28 UTC (rev 7457)
+++ trunk/py4science/examples/sphinx_qs/sphinx_extensions.rst	2009年08月11日 11:24:27 UTC (rev 7458)
@@ -1,154 +0,0 @@
-.. _extensions:
-
-
-****************************************************
-Sphinx extensions for embedded plots, math and more
-****************************************************
-
-Sphinx is written in python, and supports the ability to write custom
-extensions. We've written a few for the matplotlib documentation,
-some of which are part of matplotlib itself in the
-matplotlib.sphinxext module, some of which are included only in the
-sphinx doc directory, and there are other extensions written by other
-groups, eg numpy and ipython. We're collecting these in this tutorial
-and showing you how to install and use them for your own project.
-First let's grab the python extension files from the :file:`sphinxext`
-directory from svn (see :ref:`getting-the-data`, and install them in
-our :file:`py4sci` project :file:`sphinxext` directory::
-
- home:~/tmp/py4sci> mkdir sphinxext
- home:~/tmp/py4sci> cp ../sphinx_qs/sphinxext/*.py sphinxext/
- home:~/tmp/py4sci> ls sphinxext/
- apigen.py inheritance_diagram.py
- docscrape.py ipython_console_highlighting.py
- docscrape_sphinx.py numpydoc.py
-
-In addition to the builtin matplotlib extensions for embedding pyplot
-plots and rendering math with matplotlib's native math engine, we also
-have extensions for syntax highlighting ipython sessions, making
-inhertiance diagrams, and more. 
-
-We need to inform sphinx of our new extensions in the :file:`conf.py`
-file by adding the following. First we tell it where to find the extensions::
-
- # If your extensions are in another directory, add it here. If the
- # directory is relative to the documentation root, use
- # os.path.abspath to make it absolute, like shown here.
- sys.path.append(os.path.abspath('sphinxext'))
-
-And then we tell it what extensions to load::
- 
- # Add any Sphinx extension module names here, as strings. They can
- # be extensions coming with Sphinx (named 'sphinx.ext.*') or your
- # custom ones.
- extensions = ['matplotlib.sphinxext.mathmpl',
- 'matplotlib.sphinxext.only_directives',
- 'matplotlib.sphinxext.plot_directive',
- 'sphinx.ext.autodoc',
- 'sphinx.ext.doctest',
- 'ipython_console_highlighting',
- 'inheritance_diagram',
- 'numpydoc']
-
-
-Now let's look at some of these in action. You can see the literal
-source for this file at :ref:`sphinx-extensions-literal`.
-
-
-.. _ipython-highlighting:
-
-ipython sessions
-================
-
-Michael Droettboom contributed a sphinx extension which does pygments
-syntax highlighting on ipython sessions
-
-.. sourcecode:: ipython
-
- In [69]: lines = plot([1,2,3])
-
- In [70]: setp(lines)
- alpha: float
- animated: [True | False]
- antialiased or aa: [True | False]
- ...snip
-
-This support is included in this template, but will also be included
-in a future version of Pygments by default.
-
-.. _using-math:
-
-Using math
-==========
-
-In sphinx you can include inline math :math:`x\leftarrow y\ x\forall
-y\ x-y` or display math
-
-.. math::
-
- W^{3\beta}_{\delta_1 \rho_1 \sigma_2} = U^{3\beta}_{\delta_1 \rho_1} + \frac{1}{8 \pi 2} \int^{\alpha_2}_{\alpha_2} d \alpha^\prime_2 \left[\frac{ U^{2\beta}_{\delta_1 \rho_1} - \alpha^\prime_2U^{1\beta}_{\rho_1 \sigma_2} }{U^{0\beta}_{\rho_1 \sigma_2}}\right]
-
-This documentation framework includes a Sphinx extension,
-:file:`sphinxext/mathmpl.py`, that uses matplotlib to render math
-equations when generating HTML, and LaTeX itself when generating a
-PDF. This can be useful on systems that have matplotlib, but not
-LaTeX, installed. To use it, add ``mathmpl`` to the list of
-extensions in :file:`conf.py`.
-
-Current SVN versions of Sphinx now include built-in support for math.
-There are two flavors:
-
- - pngmath: uses dvipng to render the equation
-
- - jsmath: renders the math in the browser using Javascript
-
-To use these extensions instead, add ``sphinx.ext.pngmath`` or
-``sphinx.ext.jsmath`` to the list of extensions in :file:`conf.py`.
-
-All three of these options for math are designed to behave in the same
-way.
-
-.. _emacs-helpers:
-
-Inserting matplotlib plots
-==========================
-
-Inserting automatically-generated plots is easy. Simply put the
-script to generate the plot in the :file:`pyplots` directory, and
-refer to it using the ``plot`` directive. To include the source code
-for the plot in the document, pass the ``include-source`` parameter::
-
- .. plot:: ../pyplots/ellipses.py
- :include-source:
-
-In the HTML version of the document, the plot includes links to the
-original source code, a high-resolution PNG and a PDF. In the PDF
-version of the document, the plot is included as a scalable PDF.
-
-.. plot:: pyplots/elegant.py
- :include-source:
-
-Inheritance diagrams
-====================
-
-Inheritance diagrams can be inserted directly into the document by
-providing a list of class or module names to the
-``inheritance-diagram`` directive.
-
-For example::
-
- .. inheritance-diagram:: codecs
-
-produces:
-
-.. inheritance-diagram:: codecs
-
-
-.. _sphinx-extensions-literal:
-
-This file
-=========
-
-.. literalinclude:: sphinx_extensions.rst
-
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2009年08月11日 11:22:35
Revision: 7457
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7457&view=rev
Author: jdh2358
Date: 2009年08月11日 11:22:28 +0000 (2009年8月11日)
Log Message:
-----------
added pyplots and extensions
Modified Paths:
--------------
 trunk/py4science/examples/sphinx_qs/cheatsheet.rst
 trunk/py4science/examples/sphinx_qs/custom_look.rst
 trunk/py4science/examples/sphinx_qs/getting_started.rst
 trunk/py4science/examples/sphinx_qs/index.rst
Added Paths:
-----------
 trunk/py4science/examples/sphinx_qs/emacs_help.rst
 trunk/py4science/examples/sphinx_qs/pyplots/
 trunk/py4science/examples/sphinx_qs/pyplots/ellipses.py
 trunk/py4science/examples/sphinx_qs/sphinx_extensions.rst
Modified: trunk/py4science/examples/sphinx_qs/cheatsheet.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/cheatsheet.rst	2009年08月11日 10:59:31 UTC (rev 7456)
+++ trunk/py4science/examples/sphinx_qs/cheatsheet.rst	2009年08月11日 11:22:28 UTC (rev 7457)
@@ -1,38 +1,162 @@
-.. _sphinx_helpers:
-
-
-******************
-Sphinx Cheat Sheet
-******************
-
-Cheat sheet on how to make this site and install these extensions and
-other goodies. You can see a literal version of this file below in
-:ref:`sphinx-literal`.
-
-.. _installing-docdir:
-Installing your doc directory
-=============================
-
-You may already have sphinx `sphinx <http://sphinx.pocoo.org/>`_
-installed -- you can check by doing::
-
- python -c 'import sphinx'
-
-If that fails grab the latest version of and install it with::
-
- > sudo easy_install sphinx
-
-Now you are ready to build a template for your docs, using
-sphinx-quickstart::
-
- > sphinx-quickstart
-
-accepting most of the defaults. I choose "py4sci" as the name of my project
-
-We can test the installation by changing into the project directory,
-and typing `make html`::
-
- cd py4sci
- make html
-
-
+.. _cheat-sheet:
+
+******************
+Sphinx cheat sheet
+******************
+
+Here is a quick and dirty cheat sheet for some common stuff you want
+to do in sphinx and ReST. You can see the literal source for this
+file at :ref:`cheatsheet
+-literal`.
+ 
+
+.. _formatting-text:
+
+Formatting text
+===============
+
+You use inline markup to make text *italics*, **bold**, or ``monotype``.
+
+You can represent code blocks fairly easily::
+
+ import numpy as np
+ x = np.random.rand(12)
+
+Or literally include code:
+
+.. literalinclude:: ../pyplots/ellipses.py
+
+
+
+.. _making-a-list:
+
+Making a list
+=============
+
+It is easy to make lists in rest
+
+Bullet points
+-------------
+
+This is a subsection making bullet points
+
+* point A
+
+* point B
+
+* point C
+
+
+Enumerated points
+------------------
+
+This is a subsection making numbered points
+
+#. point A
+
+#. point B
+
+#. point C
+
+
+.. _making-a-table:
+
+Making a table
+==============
+
+This shows you how to make a table -- if you only want to make a list see :ref:`making-a-list`.
+
+================== ============
+Name Age
+================== ============
+John D Hunter 40
+Cast of Thousands 41
+And Still More 42
+================== ============
+
+.. _making-links:
+
+Making links
+============
+
+It is easy to make a link to `yahoo <http://yahoo.com>`_ or to some
+section inside this document (see :ref:`making-a-table`) or another
+document (see :ref:`final-results`).
+
+You can also reference classes, modules, functions, etc that are
+documented using the sphinx `autodoc
+<http://sphinx.pocoo.org/ext/autodoc.html>`_ facilites. For example,
+see the module :mod:`matplotlib.backend_bases` documentation, or the
+class :class:`~matplotlib.backend_bases.LocationEvent`, or the method
+:meth:`~matplotlib.backend_bases.FigureCanvasBase.mpl_connect`.
+
+
+
+.. _making-a-list:
+
+Making a list
+=============
+
+It is easy to make lists in rest
+
+Bullet points
+-------------
+
+This is a subsection making bullet points
+
+* point A
+
+* point B
+
+* point C
+
+
+Enumerated points
+------------------
+
+This is a subsection making numbered points
+
+#. point A
+
+#. point B
+
+#. point C
+
+
+.. _making-a-table:
+
+Making a table
+==============
+
+This shows you how to make a table -- if you only want to make a list see :ref:`making-a-list`.
+
+================== ============
+Name Age
+================== ============
+John D Hunter 40
+Cast of Thousands 41
+And Still More 42
+================== ============
+
+.. _making-links:
+
+Making links
+============
+
+It is easy to make a link to `yahoo <http://yahoo.com>`_ or to some
+section inside this document (see :ref:`making-a-table`) or another
+document (see :ref:`final-results`).
+
+You can also reference classes, modules, functions, etc that are
+documented using the sphinx `autodoc
+<http://sphinx.pocoo.org/ext/autodoc.html>`_ facilites. For example,
+see the module :mod:`matplotlib.backend_bases` documentation, or the
+class :class:`~matplotlib.backend_bases.LocationEvent`, or the method
+:meth:`~matplotlib.backend_bases.FigureCanvasBase.mpl_connect`.
+
+.. _cheatsheet-literal:
+
+This file
+=========
+
+.. literalinclude:: cheatsheet.rst
Modified: trunk/py4science/examples/sphinx_qs/custom_look.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/custom_look.rst	2009年08月11日 10:59:31 UTC (rev 7456)
+++ trunk/py4science/examples/sphinx_qs/custom_look.rst	2009年08月11日 11:22:28 UTC (rev 7457)
@@ -1,9 +1,9 @@
 .. _custom_look:
 
 
-*********************
-Customizing the site
-*********************
+******************************************
+Customizing the look and feel of the site
+******************************************
 
 The `sphinx <http://sphinx.pocoo.org/>`_ site itself looks better than
 the sites created with the default css, so here we'll invoke Tufte's
Added: trunk/py4science/examples/sphinx_qs/emacs_help.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/emacs_help.rst	 (rev 0)
+++ trunk/py4science/examples/sphinx_qs/emacs_help.rst	2009年08月11日 11:22:28 UTC (rev 7457)
@@ -0,0 +1,40 @@
+.. _working-with-emacs:
+
+*******************
+Emacs ReST support
+*******************
+
+Emacs helpers
+=============
+
+There is an emacs mode `rst.el
+<http://docutils.sourceforge.net/tools/editors/emacs/rst.el>`_ which
+automates many important ReST tasks like building and updateing
+table-of-contents, and promoting or demoting section headings. Here
+is the basic ``.emacs`` configuration::
+
+ (require 'rst)
+ (setq auto-mode-alist
+ (append '(("\\.txt$" . rst-mode)
+ ("\\.rst$" . rst-mode)
+ ("\\.rest$" . rst-mode)) auto-mode-alist))
+
+
+Some helpful functions::
+
+ C-c TAB - rst-toc-insert
+
+ Insert table of contents at point
+
+ C-c C-u - rst-toc-update
+
+ Update the table of contents at point
+
+ C-c C-l rst-shift-region-left
+
+ Shift region to the left
+
+ C-c C-r rst-shift-region-right
+
+ Shift region to the right
+
Modified: trunk/py4science/examples/sphinx_qs/getting_started.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/getting_started.rst	2009年08月11日 10:59:31 UTC (rev 7456)
+++ trunk/py4science/examples/sphinx_qs/getting_started.rst	2009年08月11日 11:22:28 UTC (rev 7457)
@@ -6,8 +6,7 @@
 ***************
 
 Cheat sheet on how to make this site and install these extensions and
-other goodies. You can see a literal version of this file below in
-:ref:`sphinx-literal`.
+other goodies. 
 
 .. _installing-docdir:
 Installing your doc directory
@@ -106,4 +105,3 @@
 the `sphinx <http://sphinx.pocoo.org/>`_ site itself -- see
 :ref:`custom_look`.
 
-
Modified: trunk/py4science/examples/sphinx_qs/index.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/index.rst	2009年08月11日 10:59:31 UTC (rev 7456)
+++ trunk/py4science/examples/sphinx_qs/index.rst	2009年08月11日 11:22:28 UTC (rev 7457)
@@ -13,6 +13,7 @@
 
 getting_started.rst
 custom_look.rst
+ sphinx_extensions.rst
 
 Indices and tables
 ==================
Added: trunk/py4science/examples/sphinx_qs/pyplots/ellipses.py
===================================================================
--- trunk/py4science/examples/sphinx_qs/pyplots/ellipses.py	 (rev 0)
+++ trunk/py4science/examples/sphinx_qs/pyplots/ellipses.py	2009年08月11日 11:22:28 UTC (rev 7457)
@@ -0,0 +1,19 @@
+from pylab import *
+from matplotlib.patches import Ellipse
+
+delta = 45.0 # degrees
+
+angles = arange(0, 360+delta, delta)
+ells = [Ellipse((1, 1), 4, 2, a) for a in angles]
+
+a = subplot(111, aspect='equal')
+
+for e in ells:
+ e.set_clip_box(a.bbox)
+ e.set_alpha(0.1)
+ a.add_artist(e)
+
+xlim(-2, 4)
+ylim(-1, 3)
+
+show()
Added: trunk/py4science/examples/sphinx_qs/sphinx_extensions.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/sphinx_extensions.rst	 (rev 0)
+++ trunk/py4science/examples/sphinx_qs/sphinx_extensions.rst	2009年08月11日 11:22:28 UTC (rev 7457)
@@ -0,0 +1,154 @@
+.. _extensions:
+
+
+****************************************************
+Sphinx extensions for embedded plots, math and more
+****************************************************
+
+Sphinx is written in python, and supports the ability to write custom
+extensions. We've written a few for the matplotlib documentation,
+some of which are part of matplotlib itself in the
+matplotlib.sphinxext module, some of which are included only in the
+sphinx doc directory, and there are other extensions written by other
+groups, eg numpy and ipython. We're collecting these in this tutorial
+and showing you how to install and use them for your own project.
+First let's grab the python extension files from the :file:`sphinxext`
+directory from svn (see :ref:`getting-the-data`, and install them in
+our :file:`py4sci` project :file:`sphinxext` directory::
+
+ home:~/tmp/py4sci> mkdir sphinxext
+ home:~/tmp/py4sci> cp ../sphinx_qs/sphinxext/*.py sphinxext/
+ home:~/tmp/py4sci> ls sphinxext/
+ apigen.py inheritance_diagram.py
+ docscrape.py ipython_console_highlighting.py
+ docscrape_sphinx.py numpydoc.py
+
+In addition to the builtin matplotlib extensions for embedding pyplot
+plots and rendering math with matplotlib's native math engine, we also
+have extensions for syntax highlighting ipython sessions, making
+inhertiance diagrams, and more. 
+
+We need to inform sphinx of our new extensions in the :file:`conf.py`
+file by adding the following. First we tell it where to find the extensions::
+
+ # If your extensions are in another directory, add it here. If the
+ # directory is relative to the documentation root, use
+ # os.path.abspath to make it absolute, like shown here.
+ sys.path.append(os.path.abspath('sphinxext'))
+
+And then we tell it what extensions to load::
+ 
+ # Add any Sphinx extension module names here, as strings. They can
+ # be extensions coming with Sphinx (named 'sphinx.ext.*') or your
+ # custom ones.
+ extensions = ['matplotlib.sphinxext.mathmpl',
+ 'matplotlib.sphinxext.only_directives',
+ 'matplotlib.sphinxext.plot_directive',
+ 'sphinx.ext.autodoc',
+ 'sphinx.ext.doctest',
+ 'ipython_console_highlighting',
+ 'inheritance_diagram',
+ 'numpydoc']
+
+
+Now let's look at some of these in action. You can see the literal
+source for this file at :ref:`sphinx-extensions-literal`.
+
+
+.. _ipython-highlighting:
+
+ipython sessions
+================
+
+Michael Droettboom contributed a sphinx extension which does pygments
+syntax highlighting on ipython sessions
+
+.. sourcecode:: ipython
+
+ In [69]: lines = plot([1,2,3])
+
+ In [70]: setp(lines)
+ alpha: float
+ animated: [True | False]
+ antialiased or aa: [True | False]
+ ...snip
+
+This support is included in this template, but will also be included
+in a future version of Pygments by default.
+
+.. _using-math:
+
+Using math
+==========
+
+In sphinx you can include inline math :math:`x\leftarrow y\ x\forall
+y\ x-y` or display math
+
+.. math::
+
+ W^{3\beta}_{\delta_1 \rho_1 \sigma_2} = U^{3\beta}_{\delta_1 \rho_1} + \frac{1}{8 \pi 2} \int^{\alpha_2}_{\alpha_2} d \alpha^\prime_2 \left[\frac{ U^{2\beta}_{\delta_1 \rho_1} - \alpha^\prime_2U^{1\beta}_{\rho_1 \sigma_2} }{U^{0\beta}_{\rho_1 \sigma_2}}\right]
+
+This documentation framework includes a Sphinx extension,
+:file:`sphinxext/mathmpl.py`, that uses matplotlib to render math
+equations when generating HTML, and LaTeX itself when generating a
+PDF. This can be useful on systems that have matplotlib, but not
+LaTeX, installed. To use it, add ``mathmpl`` to the list of
+extensions in :file:`conf.py`.
+
+Current SVN versions of Sphinx now include built-in support for math.
+There are two flavors:
+
+ - pngmath: uses dvipng to render the equation
+
+ - jsmath: renders the math in the browser using Javascript
+
+To use these extensions instead, add ``sphinx.ext.pngmath`` or
+``sphinx.ext.jsmath`` to the list of extensions in :file:`conf.py`.
+
+All three of these options for math are designed to behave in the same
+way.
+
+.. _emacs-helpers:
+
+Inserting matplotlib plots
+==========================
+
+Inserting automatically-generated plots is easy. Simply put the
+script to generate the plot in the :file:`pyplots` directory, and
+refer to it using the ``plot`` directive. To include the source code
+for the plot in the document, pass the ``include-source`` parameter::
+
+ .. plot:: ../pyplots/ellipses.py
+ :include-source:
+
+In the HTML version of the document, the plot includes links to the
+original source code, a high-resolution PNG and a PDF. In the PDF
+version of the document, the plot is included as a scalable PDF.
+
+.. plot:: pyplots/elegant.py
+ :include-source:
+
+Inheritance diagrams
+====================
+
+Inheritance diagrams can be inserted directly into the document by
+providing a list of class or module names to the
+``inheritance-diagram`` directive.
+
+For example::
+
+ .. inheritance-diagram:: codecs
+
+produces:
+
+.. inheritance-diagram:: codecs
+
+
+.. _sphinx-extensions-literal:
+
+This file
+=========
+
+.. literalinclude:: sphinx_extensions.rst
+
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2009年08月11日 10:59:39
Revision: 7456
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7456&view=rev
Author: jdh2358
Date: 2009年08月11日 10:59:31 +0000 (2009年8月11日)
Log Message:
-----------
added sphinxext
Added Paths:
-----------
 trunk/py4science/examples/sphinx_qs/sphinxext/
 trunk/py4science/examples/sphinx_qs/sphinxext/apigen.py
 trunk/py4science/examples/sphinx_qs/sphinxext/docscrape.py
 trunk/py4science/examples/sphinx_qs/sphinxext/docscrape_sphinx.py
 trunk/py4science/examples/sphinx_qs/sphinxext/inheritance_diagram.py
 trunk/py4science/examples/sphinx_qs/sphinxext/ipython_console_highlighting.py
 trunk/py4science/examples/sphinx_qs/sphinxext/numpydoc.py
Added: trunk/py4science/examples/sphinx_qs/sphinxext/apigen.py
===================================================================
--- trunk/py4science/examples/sphinx_qs/sphinxext/apigen.py	 (rev 0)
+++ trunk/py4science/examples/sphinx_qs/sphinxext/apigen.py	2009年08月11日 10:59:31 UTC (rev 7456)
@@ -0,0 +1,426 @@
+"""Attempt to generate templates for module reference with Sphinx
+
+XXX - we exclude extension modules
+
+To include extension modules, first identify them as valid in the
+``_uri2path`` method, then handle them in the ``_parse_module`` script.
+
+We get functions and classes by parsing the text of .py files.
+Alternatively we could import the modules for discovery, and we'd have
+to do that for extension modules. This would involve changing the
+``_parse_module`` method to work via import and introspection, and
+might involve changing ``discover_modules`` (which determines which
+files are modules, and therefore which module URIs will be passed to
+``_parse_module``).
+
+NOTE: this is a modified version of a script originally shipped with the
+PyMVPA project, which we've adapted for NIPY use. PyMVPA is an MIT-licensed
+project."""
+
+# Stdlib imports
+import os
+import re
+
+# Functions and classes
+class ApiDocWriter(object):
+ ''' Class for automatic detection and parsing of API docs
+ to Sphinx-parsable reST format'''
+
+ # only separating first two levels
+ rst_section_levels = ['*', '=', '-', '~', '^']
+
+ def __init__(self,
+ package_name,
+ rst_extension='.rst',
+ package_skip_patterns=None,
+ module_skip_patterns=None,
+ ):
+ ''' Initialize package for parsing
+
+ Parameters
+ ----------
+ package_name : string
+ Name of the top-level package. *package_name* must be the
+ name of an importable package
+ rst_extension : string, optional
+ Extension for reST files, default '.rst'
+ package_skip_patterns : None or sequence of {strings, regexps}
+ Sequence of strings giving URIs of packages to be excluded
+ Operates on the package path, starting at (including) the
+ first dot in the package path, after *package_name* - so,
+ if *package_name* is ``sphinx``, then ``sphinx.util`` will
+ result in ``.util`` being passed for earching by these
+ regexps. If is None, gives default. Default is:
+ ['\.tests$']
+ module_skip_patterns : None or sequence
+ Sequence of strings giving URIs of modules to be excluded
+ Operates on the module name including preceding URI path,
+ back to the first dot after *package_name*. For example
+ ``sphinx.util.console`` results in the string to search of
+ ``.util.console``
+ If is None, gives default. Default is:
+ ['\.setup$', '\._']
+ '''
+ if package_skip_patterns is None:
+ package_skip_patterns = ['\\.tests$']
+ if module_skip_patterns is None:
+ module_skip_patterns = ['\\.setup$', '\\._']
+ self.package_name = package_name
+ self.rst_extension = rst_extension
+ self.package_skip_patterns = package_skip_patterns
+ self.module_skip_patterns = module_skip_patterns
+
+ def get_package_name(self):
+ return self._package_name
+
+ def set_package_name(self, package_name):
+ ''' Set package_name
+
+ >>> docwriter = ApiDocWriter('sphinx')
+ >>> import sphinx
+ >>> docwriter.root_path == sphinx.__path__[0]
+ True
+ >>> docwriter.package_name = 'docutils'
+ >>> import docutils
+ >>> docwriter.root_path == docutils.__path__[0]
+ True
+ '''
+ # It's also possible to imagine caching the module parsing here
+ self._package_name = package_name
+ self.root_module = __import__(package_name)
+ self.root_path = self.root_module.__path__[0]
+ self.written_modules = None
+
+ package_name = property(get_package_name, set_package_name, None,
+ 'get/set package_name')
+
+ def _get_object_name(self, line):
+ ''' Get second token in line
+ >>> docwriter = ApiDocWriter('sphinx')
+ >>> docwriter._get_object_name(" def func(): ")
+ 'func'
+ >>> docwriter._get_object_name(" class Klass(object): ")
+ 'Klass'
+ >>> docwriter._get_object_name(" class Klass: ")
+ 'Klass'
+ '''
+ name = line.split()[1].split('(')[0].strip()
+ # in case we have classes which are not derived from object
+ # ie. old style classes
+ return name.rstrip(':')
+
+ def _uri2path(self, uri):
+ ''' Convert uri to absolute filepath
+
+ Parameters
+ ----------
+ uri : string
+ URI of python module to return path for
+
+ Returns
+ -------
+ path : None or string
+ Returns None if there is no valid path for this URI
+ Otherwise returns absolute file system path for URI
+
+ Examples
+ --------
+ >>> docwriter = ApiDocWriter('sphinx')
+ >>> import sphinx
+ >>> modpath = sphinx.__path__[0]
+ >>> res = docwriter._uri2path('sphinx.builder')
+ >>> res == os.path.join(modpath, 'builder.py')
+ True
+ >>> res = docwriter._uri2path('sphinx')
+ >>> res == os.path.join(modpath, '__init__.py')
+ True
+ >>> docwriter._uri2path('sphinx.does_not_exist')
+
+ '''
+ if uri == self.package_name:
+ return os.path.join(self.root_path, '__init__.py')
+ path = uri.replace('.', os.path.sep)
+ path = path.replace(self.package_name + os.path.sep, '')
+ path = os.path.join(self.root_path, path)
+ # XXX maybe check for extensions as well?
+ if os.path.exists(path + '.py'): # file
+ path += '.py'
+ elif os.path.exists(os.path.join(path, '__init__.py')):
+ path = os.path.join(path, '__init__.py')
+ else:
+ return None
+ return path
+
+ def _path2uri(self, dirpath):
+ ''' Convert directory path to uri '''
+ relpath = dirpath.replace(self.root_path, self.package_name)
+ if relpath.startswith(os.path.sep):
+ relpath = relpath[1:]
+ return relpath.replace(os.path.sep, '.')
+
+ def _parse_module(self, uri):
+ ''' Parse module defined in *uri* '''
+ filename = self._uri2path(uri)
+ if filename is None:
+ # nothing that we could handle here.
+ return ([],[])
+ f = open(filename, 'rt')
+ functions, classes = self._parse_lines(f)
+ f.close()
+ return functions, classes
+ 
+ def _parse_lines(self, linesource):
+ ''' Parse lines of text for functions and classes '''
+ functions = []
+ classes = []
+ for line in linesource:
+ if line.startswith('def ') and line.count('('):
+ # exclude private stuff
+ name = self._get_object_name(line)
+ if not name.startswith('_'):
+ functions.append(name)
+ elif line.startswith('class '):
+ # exclude private stuff
+ name = self._get_object_name(line)
+ if not name.startswith('_'):
+ classes.append(name)
+ else:
+ pass
+ functions.sort()
+ classes.sort()
+ return functions, classes
+
+ def generate_api_doc(self, uri):
+ '''Make autodoc documentation template string for a module
+
+ Parameters
+ ----------
+ uri : string
+ python location of module - e.g 'sphinx.builder'
+
+ Returns
+ -------
+ S : string
+ Contents of API doc
+ '''
+ # get the names of all classes and functions
+ functions, classes = self._parse_module(uri)
+ if not len(functions) and not len(classes):
+ print 'WARNING: Empty -',uri # dbg
+ return ''
+
+ # Make a shorter version of the uri that omits the package name for
+ # titles 
+ uri_short = re.sub(r'^%s\.' % self.package_name,'',uri)
+ 
+ ad = '.. AUTO-GENERATED FILE -- DO NOT EDIT!\n\n'
+
+ chap_title = uri_short
+ ad += (chap_title+'\n'+ self.rst_section_levels[1] * len(chap_title)
+ + '\n\n')
+
+ # Set the chapter title to read 'module' for all modules except for the
+ # main packages
+ if '.' in uri:
+ title = 'Module: :mod:`' + uri_short + '`'
+ else:
+ title = ':mod:`' + uri_short + '`'
+ ad += title + '\n' + self.rst_section_levels[2] * len(title)
+
+ if len(classes):
+ ad += '\nInheritance diagram for ``%s``:\n\n' % uri
+ ad += '.. inheritance-diagram:: %s \n' % uri
+ ad += ' :parts: 3\n'
+
+ ad += '\n.. automodule:: ' + uri + '\n'
+ ad += '\n.. currentmodule:: ' + uri + '\n'
+ multi_class = len(classes) > 1
+ multi_fx = len(functions) > 1
+ if multi_class:
+ ad += '\n' + 'Classes' + '\n' + \
+ self.rst_section_levels[2] * 7 + '\n'
+ elif len(classes) and multi_fx:
+ ad += '\n' + 'Class' + '\n' + \
+ self.rst_section_levels[2] * 5 + '\n'
+ for c in classes:
+ ad += '\n:class:`' + c + '`\n' \
+ + self.rst_section_levels[multi_class + 2 ] * \
+ (len(c)+9) + '\n\n'
+ ad += '\n.. autoclass:: ' + c + '\n'
+ # must NOT exclude from index to keep cross-refs working
+ ad += ' :members:\n' \
+ ' :undoc-members:\n' \
+ ' :show-inheritance:\n' \
+ '\n' \
+ ' .. automethod:: __init__\n'
+ if multi_fx:
+ ad += '\n' + 'Functions' + '\n' + \
+ self.rst_section_levels[2] * 9 + '\n\n'
+ elif len(functions) and multi_class:
+ ad += '\n' + 'Function' + '\n' + \
+ self.rst_section_levels[2] * 8 + '\n\n'
+ for f in functions:
+ # must NOT exclude from index to keep cross-refs working
+ ad += '\n.. autofunction:: ' + uri + '.' + f + '\n\n'
+ return ad
+
+ def _survives_exclude(self, matchstr, match_type):
+ ''' Returns True if *matchstr* does not match patterns
+
+ ``self.package_name`` removed from front of string if present
+
+ Examples
+ --------
+ >>> dw = ApiDocWriter('sphinx')
+ >>> dw._survives_exclude('sphinx.okpkg', 'package')
+ True
+ >>> dw.package_skip_patterns.append('^\\.badpkg$')
+ >>> dw._survives_exclude('sphinx.badpkg', 'package')
+ False
+ >>> dw._survives_exclude('sphinx.badpkg', 'module')
+ True
+ >>> dw._survives_exclude('sphinx.badmod', 'module')
+ True
+ >>> dw.module_skip_patterns.append('^\\.badmod$')
+ >>> dw._survives_exclude('sphinx.badmod', 'module')
+ False
+ '''
+ if match_type == 'module':
+ patterns = self.module_skip_patterns
+ elif match_type == 'package':
+ patterns = self.package_skip_patterns
+ else:
+ raise ValueError('Cannot interpret match type "%s"' 
+ % match_type)
+ # Match to URI without package name
+ L = len(self.package_name)
+ if matchstr[:L] == self.package_name:
+ matchstr = matchstr[L:]
+ for pat in patterns:
+ try:
+ pat.search
+ except AttributeError:
+ pat = re.compile(pat)
+ if pat.search(matchstr):
+ return False
+ return True
+
+ def discover_modules(self):
+ ''' Return module sequence discovered from ``self.package_name`` 
+
+
+ Parameters
+ ----------
+ None
+
+ Returns
+ -------
+ mods : sequence
+ Sequence of module names within ``self.package_name``
+
+ Examples
+ --------
+ >>> dw = ApiDocWriter('sphinx')
+ >>> mods = dw.discover_modules()
+ >>> 'sphinx.util' in mods
+ True
+ >>> dw.package_skip_patterns.append('\.util$')
+ >>> 'sphinx.util' in dw.discover_modules()
+ False
+ >>> 
+ '''
+ modules = [self.package_name]
+ # raw directory parsing
+ for dirpath, dirnames, filenames in os.walk(self.root_path):
+ # Check directory names for packages
+ root_uri = self._path2uri(os.path.join(self.root_path,
+ dirpath))
+ for dirname in dirnames[:]: # copy list - we modify inplace
+ package_uri = '.'.join((root_uri, dirname))
+ if (self._uri2path(package_uri) and
+ self._survives_exclude(package_uri, 'package')):
+ modules.append(package_uri)
+ else:
+ dirnames.remove(dirname)
+ # Check filenames for modules
+ for filename in filenames:
+ module_name = filename[:-3]
+ module_uri = '.'.join((root_uri, module_name))
+ if (self._uri2path(module_uri) and
+ self._survives_exclude(module_uri, 'module')):
+ modules.append(module_uri)
+ return sorted(modules)
+ 
+ def write_modules_api(self, modules,outdir):
+ # write the list
+ written_modules = []
+ for m in modules:
+ api_str = self.generate_api_doc(m)
+ if not api_str:
+ continue
+ # write out to file
+ outfile = os.path.join(outdir,
+ m + self.rst_extension)
+ fileobj = open(outfile, 'wt')
+ fileobj.write(api_str)
+ fileobj.close()
+ written_modules.append(m)
+ self.written_modules = written_modules
+
+ def write_api_docs(self, outdir):
+ """Generate API reST files.
+
+ Parameters
+ ----------
+ outdir : string
+ Directory name in which to store files
+ We create automatic filenames for each module
+ 
+ Returns
+ -------
+ None
+
+ Notes
+ -----
+ Sets self.written_modules to list of written modules
+ """
+ if not os.path.exists(outdir):
+ os.mkdir(outdir)
+ # compose list of modules
+ modules = self.discover_modules()
+ self.write_modules_api(modules,outdir)
+ 
+ def write_index(self, outdir, froot='gen', relative_to=None):
+ """Make a reST API index file from written files
+
+ Parameters
+ ----------
+ path : string
+ Filename to write index to
+ outdir : string
+ Directory to which to write generated index file
+ froot : string, optional
+ root (filename without extension) of filename to write to
+ Defaults to 'gen'. We add ``self.rst_extension``.
+ relative_to : string
+ path to which written filenames are relative. This
+ component of the written file path will be removed from
+ outdir, in the generated index. Default is None, meaning,
+ leave path as it is.
+ """
+ if self.written_modules is None:
+ raise ValueError('No modules written')
+ # Get full filename path
+ path = os.path.join(outdir, froot+self.rst_extension)
+ # Path written into index is relative to rootpath
+ if relative_to is not None:
+ relpath = outdir.replace(relative_to + os.path.sep, '')
+ else:
+ relpath = outdir
+ idx = open(path,'wt')
+ w = idx.write
+ w('.. AUTO-GENERATED FILE -- DO NOT EDIT!\n\n')
+ w('.. toctree::\n\n')
+ for f in self.written_modules:
+ w(' %s\n' % os.path.join(relpath,f))
+ idx.close()
Added: trunk/py4science/examples/sphinx_qs/sphinxext/docscrape.py
===================================================================
--- trunk/py4science/examples/sphinx_qs/sphinxext/docscrape.py	 (rev 0)
+++ trunk/py4science/examples/sphinx_qs/sphinxext/docscrape.py	2009年08月11日 10:59:31 UTC (rev 7456)
@@ -0,0 +1,497 @@
+"""Extract reference documentation from the NumPy source tree.
+
+"""
+
+import inspect
+import textwrap
+import re
+import pydoc
+from StringIO import StringIO
+from warnings import warn
+4
+class Reader(object):
+ """A line-based string reader.
+
+ """
+ def __init__(self, data):
+ """
+ Parameters
+ ----------
+ data : str
+ String with lines separated by '\n'.
+
+ """
+ if isinstance(data,list):
+ self._str = data
+ else:
+ self._str = data.split('\n') # store string as list of lines
+
+ self.reset()
+
+ def __getitem__(self, n):
+ return self._str[n]
+
+ def reset(self):
+ self._l = 0 # current line nr
+
+ def read(self):
+ if not self.eof():
+ out = self[self._l]
+ self._l += 1
+ return out
+ else:
+ return ''
+
+ def seek_next_non_empty_line(self):
+ for l in self[self._l:]:
+ if l.strip():
+ break
+ else:
+ self._l += 1
+
+ def eof(self):
+ return self._l >= len(self._str)
+
+ def read_to_condition(self, condition_func):
+ start = self._l
+ for line in self[start:]:
+ if condition_func(line):
+ return self[start:self._l]
+ self._l += 1
+ if self.eof():
+ return self[start:self._l+1]
+ return []
+
+ def read_to_next_empty_line(self):
+ self.seek_next_non_empty_line()
+ def is_empty(line):
+ return not line.strip()
+ return self.read_to_condition(is_empty)
+
+ def read_to_next_unindented_line(self):
+ def is_unindented(line):
+ return (line.strip() and (len(line.lstrip()) == len(line)))
+ return self.read_to_condition(is_unindented)
+
+ def peek(self,n=0):
+ if self._l + n < len(self._str):
+ return self[self._l + n]
+ else:
+ return ''
+
+ def is_empty(self):
+ return not ''.join(self._str).strip()
+
+
+class NumpyDocString(object):
+ def __init__(self,docstring):
+ docstring = textwrap.dedent(docstring).split('\n')
+
+ self._doc = Reader(docstring)
+ self._parsed_data = {
+ 'Signature': '',
+ 'Summary': [''],
+ 'Extended Summary': [],
+ 'Parameters': [],
+ 'Returns': [],
+ 'Raises': [],
+ 'Warns': [],
+ 'Other Parameters': [],
+ 'Attributes': [],
+ 'Methods': [],
+ 'See Also': [],
+ 'Notes': [],
+ 'Warnings': [],
+ 'References': '',
+ 'Examples': '',
+ 'index': {}
+ }
+
+ self._parse()
+
+ def __getitem__(self,key):
+ return self._parsed_data[key]
+
+ def __setitem__(self,key,val):
+ if not self._parsed_data.has_key(key):
+ warn("Unknown section %s" % key)
+ else:
+ self._parsed_data[key] = val
+
+ def _is_at_section(self):
+ self._doc.seek_next_non_empty_line()
+
+ if self._doc.eof():
+ return False
+
+ l1 = self._doc.peek().strip() # e.g. Parameters
+
+ if l1.startswith('.. index::'):
+ return True
+
+ l2 = self._doc.peek(1).strip() # ---------- or ==========
+ return l2.startswith('-'*len(l1)) or l2.startswith('='*len(l1))
+
+ def _strip(self,doc):
+ i = 0
+ j = 0
+ for i,line in enumerate(doc):
+ if line.strip(): break
+
+ for j,line in enumerate(doc[::-1]):
+ if line.strip(): break
+
+ return doc[i:len(doc)-j]
+
+ def _read_to_next_section(self):
+ section = self._doc.read_to_next_empty_line()
+
+ while not self._is_at_section() and not self._doc.eof():
+ if not self._doc.peek(-1).strip(): # previous line was empty
+ section += ['']
+
+ section += self._doc.read_to_next_empty_line()
+
+ return section
+
+ def _read_sections(self):
+ while not self._doc.eof():
+ data = self._read_to_next_section()
+ name = data[0].strip()
+
+ if name.startswith('..'): # index section
+ yield name, data[1:]
+ elif len(data) < 2:
+ yield StopIteration
+ else:
+ yield name, self._strip(data[2:])
+
+ def _parse_param_list(self,content):
+ r = Reader(content)
+ params = []
+ while not r.eof():
+ header = r.read().strip()
+ if ' : ' in header:
+ arg_name, arg_type = header.split(' : ')[:2]
+ else:
+ arg_name, arg_type = header, ''
+
+ desc = r.read_to_next_unindented_line()
+ desc = dedent_lines(desc)
+
+ params.append((arg_name,arg_type,desc))
+
+ return params
+
+ 
+ _name_rgx = re.compile(r"^\s*(:(?P<role>\w+):`(?P<name>[a-zA-Z0-9_.-]+)`|"
+ r" (?P<name2>[a-zA-Z0-9_.-]+))\s*", re.X)
+ def _parse_see_also(self, content):
+ """
+ func_name : Descriptive text
+ continued text
+ another_func_name : Descriptive text
+ func_name1, func_name2, :meth:`func_name`, func_name3
+
+ """
+ items = []
+
+ def parse_item_name(text):
+ """Match ':role:`name`' or 'name'"""
+ m = self._name_rgx.match(text)
+ if m:
+ g = m.groups()
+ if g[1] is None:
+ return g[3], None
+ else:
+ return g[2], g[1]
+ raise ValueError("%s is not a item name" % text)
+
+ def push_item(name, rest):
+ if not name:
+ return
+ name, role = parse_item_name(name)
+ items.append((name, list(rest), role))
+ del rest[:]
+
+ current_func = None
+ rest = []
+ 
+ for line in content:
+ if not line.strip(): continue
+
+ m = self._name_rgx.match(line)
+ if m and line[m.end():].strip().startswith(':'):
+ push_item(current_func, rest)
+ current_func, line = line[:m.end()], line[m.end():]
+ rest = [line.split(':', 1)[1].strip()]
+ if not rest[0]:
+ rest = []
+ elif not line.startswith(' '):
+ push_item(current_func, rest)
+ current_func = None
+ if ',' in line:
+ for func in line.split(','):
+ push_item(func, [])
+ elif line.strip():
+ current_func = line
+ elif current_func is not None:
+ rest.append(line.strip())
+ push_item(current_func, rest)
+ return items
+
+ def _parse_index(self, section, content):
+ """
+ .. index: default
+ :refguide: something, else, and more
+
+ """
+ def strip_each_in(lst):
+ return [s.strip() for s in lst]
+
+ out = {}
+ section = section.split('::')
+ if len(section) > 1:
+ out['default'] = strip_each_in(section[1].split(','))[0]
+ for line in content:
+ line = line.split(':')
+ if len(line) > 2:
+ out[line[1]] = strip_each_in(line[2].split(','))
+ return out
+ 
+ def _parse_summary(self):
+ """Grab signature (if given) and summary"""
+ if self._is_at_section():
+ return
+
+ summary = self._doc.read_to_next_empty_line()
+ summary_str = " ".join([s.strip() for s in summary]).strip()
+ if re.compile('^([\w., ]+=)?\s*[\w\.]+\(.*\)$').match(summary_str):
+ self['Signature'] = summary_str
+ if not self._is_at_section():
+ self['Summary'] = self._doc.read_to_next_empty_line()
+ else:
+ self['Summary'] = summary
+
+ if not self._is_at_section():
+ self['Extended Summary'] = self._read_to_next_section()
+ 
+ def _parse(self):
+ self._doc.reset()
+ self._parse_summary()
+
+ for (section,content) in self._read_sections():
+ if not section.startswith('..'):
+ section = ' '.join([s.capitalize() for s in section.split(' ')])
+ if section in ('Parameters', 'Attributes', 'Methods',
+ 'Returns', 'Raises', 'Warns'):
+ self[section] = self._parse_param_list(content)
+ elif section.startswith('.. index::'):
+ self['index'] = self._parse_index(section, content)
+ elif section == 'See Also':
+ self['See Also'] = self._parse_see_also(content)
+ else:
+ self[section] = content
+
+ # string conversion routines
+
+ def _str_header(self, name, symbol='-'):
+ return [name, len(name)*symbol]
+
+ def _str_indent(self, doc, indent=4):
+ out = []
+ for line in doc:
+ out += [' '*indent + line]
+ return out
+
+ def _str_signature(self):
+ if self['Signature']:
+ return [self['Signature'].replace('*','\*')] + ['']
+ else:
+ return ['']
+
+ def _str_summary(self):
+ if self['Summary']:
+ return self['Summary'] + ['']
+ else:
+ return []
+
+ def _str_extended_summary(self):
+ if self['Extended Summary']:
+ return self['Extended Summary'] + ['']
+ else:
+ return []
+
+ def _str_param_list(self, name):
+ out = []
+ if self[name]:
+ out += self._str_header(name)
+ for param,param_type,desc in self[name]:
+ out += ['%s : %s' % (param, param_type)]
+ out += self._str_indent(desc)
+ out += ['']
+ return out
+
+ def _str_section(self, name):
+ out = []
+ if self[name]:
+ out += self._str_header(name)
+ out += self[name]
+ out += ['']
+ return out
+
+ def _str_see_also(self, func_role):
+ if not self['See Also']: return []
+ out = []
+ out += self._str_header("See Also")
+ last_had_desc = True
+ for func, desc, role in self['See Also']:
+ if role:
+ link = ':%s:`%s`' % (role, func)
+ elif func_role:
+ link = ':%s:`%s`' % (func_role, func)
+ else:
+ link = "`%s`_" % func
+ if desc or last_had_desc:
+ out += ['']
+ out += [link]
+ else:
+ out[-1] += ", %s" % link
+ if desc:
+ out += self._str_indent([' '.join(desc)])
+ last_had_desc = True
+ else:
+ last_had_desc = False
+ out += ['']
+ return out
+
+ def _str_index(self):
+ idx = self['index']
+ out = []
+ out += ['.. index:: %s' % idx.get('default','')]
+ for section, references in idx.iteritems():
+ if section == 'default':
+ continue
+ out += [' :%s: %s' % (section, ', '.join(references))]
+ return out
+
+ def __str__(self, func_role=''):
+ out = []
+ out += self._str_signature()
+ out += self._str_summary()
+ out += self._str_extended_summary()
+ for param_list in ('Parameters','Returns','Raises'):
+ out += self._str_param_list(param_list)
+ out += self._str_section('Warnings')
+ out += self._str_see_also(func_role)
+ for s in ('Notes','References','Examples'):
+ out += self._str_section(s)
+ out += self._str_index()
+ return '\n'.join(out)
+
+
+def indent(str,indent=4):
+ indent_str = ' '*indent
+ if str is None:
+ return indent_str
+ lines = str.split('\n')
+ return '\n'.join(indent_str + l for l in lines)
+
+def dedent_lines(lines):
+ """Deindent a list of lines maximally"""
+ return textwrap.dedent("\n".join(lines)).split("\n")
+
+def header(text, style='-'):
+ return text + '\n' + style*len(text) + '\n'
+
+
+class FunctionDoc(NumpyDocString):
+ def __init__(self, func, role='func', doc=None):
+ self._f = func
+ self._role = role # e.g. "func" or "meth"
+ if doc is None:
+ doc = inspect.getdoc(func) or ''
+ try:
+ NumpyDocString.__init__(self, doc)
+ except ValueError, e:
+ print '*'*78
+ print "ERROR: '%s' while parsing `%s`" % (e, self._f)
+ print '*'*78
+ #print "Docstring follows:"
+ #print doclines
+ #print '='*78
+
+ if not self['Signature']:
+ func, func_name = self.get_func()
+ try:
+ # try to read signature
+ argspec = inspect.getargspec(func)
+ argspec = inspect.formatargspec(*argspec)
+ argspec = argspec.replace('*','\*')
+ signature = '%s%s' % (func_name, argspec)
+ except TypeError, e:
+ signature = '%s()' % func_name
+ self['Signature'] = signature
+
+ def get_func(self):
+ func_name = getattr(self._f, '__name__', self.__class__.__name__)
+ if inspect.isclass(self._f):
+ func = getattr(self._f, '__call__', self._f.__init__)
+ else:
+ func = self._f
+ return func, func_name
+ 
+ def __str__(self):
+ out = ''
+
+ func, func_name = self.get_func()
+ signature = self['Signature'].replace('*', '\*')
+
+ roles = {'func': 'function',
+ 'meth': 'method'}
+
+ if self._role:
+ if not roles.has_key(self._role):
+ print "Warning: invalid role %s" % self._role
+ out += '.. %s:: %s\n \n\n' % (roles.get(self._role,''),
+ func_name)
+
+ out += super(FunctionDoc, self).__str__(func_role=self._role)
+ return out
+
+
+class ClassDoc(NumpyDocString):
+ def __init__(self,cls,modulename='',func_doc=FunctionDoc,doc=None):
+ if not inspect.isclass(cls):
+ raise ValueError("Initialise using a class. Got %r" % cls)
+ self._cls = cls
+
+ if modulename and not modulename.endswith('.'):
+ modulename += '.'
+ self._mod = modulename
+ self._name = cls.__name__
+ self._func_doc = func_doc
+
+ if doc is None:
+ doc = pydoc.getdoc(cls)
+
+ NumpyDocString.__init__(self, doc)
+
+ @property
+ def methods(self):
+ return [name for name,func in inspect.getmembers(self._cls)
+ if not name.startswith('_') and callable(func)]
+
+ def __str__(self):
+ out = ''
+ out += super(ClassDoc, self).__str__()
+ out += "\n\n"
+
+ #for m in self.methods:
+ # print "Parsing `%s`" % m
+ # out += str(self._func_doc(getattr(self._cls,m), 'meth')) + '\n\n'
+ # out += '.. index::\n single: %s; %s\n\n' % (self._name, m)
+
+ return out
+
+
Added: trunk/py4science/examples/sphinx_qs/sphinxext/docscrape_sphinx.py
===================================================================
--- trunk/py4science/examples/sphinx_qs/sphinxext/docscrape_sphinx.py	 (rev 0)
+++ trunk/py4science/examples/sphinx_qs/sphinxext/docscrape_sphinx.py	2009年08月11日 10:59:31 UTC (rev 7456)
@@ -0,0 +1,136 @@
+import re, inspect, textwrap, pydoc
+from docscrape import NumpyDocString, FunctionDoc, ClassDoc
+
+class SphinxDocString(NumpyDocString):
+ # string conversion routines
+ def _str_header(self, name, symbol='`'):
+ return ['.. rubric:: ' + name, '']
+
+ def _str_field_list(self, name):
+ return [':' + name + ':']
+
+ def _str_indent(self, doc, indent=4):
+ out = []
+ for line in doc:
+ out += [' '*indent + line]
+ return out
+
+ def _str_signature(self):
+ return ['']
+ if self['Signature']:
+ return ['``%s``' % self['Signature']] + ['']
+ else:
+ return ['']
+
+ def _str_summary(self):
+ return self['Summary'] + ['']
+
+ def _str_extended_summary(self):
+ return self['Extended Summary'] + ['']
+
+ def _str_param_list(self, name):
+ out = []
+ if self[name]:
+ out += self._str_field_list(name)
+ out += ['']
+ for param,param_type,desc in self[name]:
+ out += self._str_indent(['**%s** : %s' % (param.strip(),
+ param_type)])
+ out += ['']
+ out += self._str_indent(desc,8)
+ out += ['']
+ return out
+
+ def _str_section(self, name):
+ out = []
+ if self[name]:
+ out += self._str_header(name)
+ out += ['']
+ content = textwrap.dedent("\n".join(self[name])).split("\n")
+ out += content
+ out += ['']
+ return out
+
+ def _str_see_also(self, func_role):
+ out = []
+ if self['See Also']:
+ see_also = super(SphinxDocString, self)._str_see_also(func_role)
+ out = ['.. seealso::', '']
+ out += self._str_indent(see_also[2:])
+ return out
+
+ def _str_warnings(self):
+ out = []
+ if self['Warnings']:
+ out = ['.. warning::', '']
+ out += self._str_indent(self['Warnings'])
+ return out
+
+ def _str_index(self):
+ idx = self['index']
+ out = []
+ if len(idx) == 0:
+ return out
+
+ out += ['.. index:: %s' % idx.get('default','')]
+ for section, references in idx.iteritems():
+ if section == 'default':
+ continue
+ elif section == 'refguide':
+ out += [' single: %s' % (', '.join(references))]
+ else:
+ out += [' %s: %s' % (section, ','.join(references))]
+ return out
+
+ def _str_references(self):
+ out = []
+ if self['References']:
+ out += self._str_header('References')
+ if isinstance(self['References'], str):
+ self['References'] = [self['References']]
+ out.extend(self['References'])
+ out += ['']
+ return out
+
+ def __str__(self, indent=0, func_role="obj"):
+ out = []
+ out += self._str_signature()
+ out += self._str_index() + ['']
+ out += self._str_summary()
+ out += self._str_extended_summary()
+ for param_list in ('Parameters', 'Attributes', 'Methods',
+ 'Returns','Raises'):
+ out += self._str_param_list(param_list)
+ out += self._str_warnings()
+ out += self._str_see_also(func_role)
+ out += self._str_section('Notes')
+ out += self._str_references()
+ out += self._str_section('Examples')
+ out = self._str_indent(out,indent)
+ return '\n'.join(out)
+
+class SphinxFunctionDoc(SphinxDocString, FunctionDoc):
+ pass
+
+class SphinxClassDoc(SphinxDocString, ClassDoc):
+ pass
+
+def get_doc_object(obj, what=None, doc=None):
+ if what is None:
+ if inspect.isclass(obj):
+ what = 'class'
+ elif inspect.ismodule(obj):
+ what = 'module'
+ elif callable(obj):
+ what = 'function'
+ else:
+ what = 'object'
+ if what == 'class':
+ return SphinxClassDoc(obj, '', func_doc=SphinxFunctionDoc, doc=doc)
+ elif what in ('function', 'method'):
+ return SphinxFunctionDoc(obj, '', doc=doc)
+ else:
+ if doc is None:
+ doc = pydoc.getdoc(obj)
+ return SphinxDocString(doc)
+
Added: trunk/py4science/examples/sphinx_qs/sphinxext/inheritance_diagram.py
===================================================================
--- trunk/py4science/examples/sphinx_qs/sphinxext/inheritance_diagram.py	 (rev 0)
+++ trunk/py4science/examples/sphinx_qs/sphinxext/inheritance_diagram.py	2009年08月11日 10:59:31 UTC (rev 7456)
@@ -0,0 +1,407 @@
+"""
+Defines a docutils directive for inserting inheritance diagrams.
+
+Provide the directive with one or more classes or modules (separated
+by whitespace). For modules, all of the classes in that module will
+be used.
+
+Example::
+
+ Given the following classes:
+
+ class A: pass
+ class B(A): pass
+ class C(A): pass
+ class D(B, C): pass
+ class E(B): pass
+
+ .. inheritance-diagram: D E
+
+ Produces a graph like the following:
+
+ A
+ / \
+ B C
+ / \ /
+ E D
+
+The graph is inserted as a PNG+image map into HTML and a PDF in
+LaTeX.
+"""
+
+import inspect
+import os
+import re
+import subprocess
+try:
+ from hashlib import md5
+except ImportError:
+ from md5 import md5
+
+from docutils.nodes import Body, Element
+from docutils.parsers.rst import directives
+from sphinx.roles import xfileref_role
+
+def my_import(name):
+ """Module importer - taken from the python documentation.
+
+ This function allows importing names with dots in them."""
+ 
+ mod = __import__(name)
+ components = name.split('.')
+ for comp in components[1:]:
+ mod = getattr(mod, comp)
+ return mod
+
+class DotException(Exception):
+ pass
+
+class InheritanceGraph(object):
+ """
+ Given a list of classes, determines the set of classes that
+ they inherit from all the way to the root "object", and then
+ is able to generate a graphviz dot graph from them.
+ """
+ def __init__(self, class_names, show_builtins=False):
+ """
+ *class_names* is a list of child classes to show bases from.
+
+ If *show_builtins* is True, then Python builtins will be shown
+ in the graph.
+ """
+ self.class_names = class_names
+ self.classes = self._import_classes(class_names)
+ self.all_classes = self._all_classes(self.classes)
+ if len(self.all_classes) == 0:
+ raise ValueError("No classes found for inheritance diagram")
+ self.show_builtins = show_builtins
+
+ py_sig_re = re.compile(r'''^([\w.]*\.)? # class names
+ (\w+) \s* $ # optionally arguments
+ ''', re.VERBOSE)
+
+ def _import_class_or_module(self, name):
+ """
+ Import a class using its fully-qualified *name*.
+ """
+ try:
+ path, base = self.py_sig_re.match(name).groups()
+ except:
+ raise ValueError(
+ "Invalid class or module '%s' specified for inheritance diagram" % name)
+ fullname = (path or '') + base
+ path = (path and path.rstrip('.'))
+ if not path:
+ path = base
+ try:
+ module = __import__(path, None, None, [])
+ # We must do an import of the fully qualified name. Otherwise if a
+ # subpackage 'a.b' is requested where 'import a' does NOT provide
+ # 'a.b' automatically, then 'a.b' will not be found below. This
+ # second call will force the equivalent of 'import a.b' to happen
+ # after the top-level import above.
+ my_import(fullname)
+ 
+ except ImportError:
+ raise ValueError(
+ "Could not import class or module '%s' specified for inheritance diagram" % name)
+
+ try:
+ todoc = module
+ for comp in fullname.split('.')[1:]:
+ todoc = getattr(todoc, comp)
+ except AttributeError:
+ raise ValueError(
+ "Could not find class or module '%s' specified for inheritance diagram" % name)
+
+ # If a class, just return it
+ if inspect.isclass(todoc):
+ return [todoc]
+ elif inspect.ismodule(todoc):
+ classes = []
+ for cls in todoc.__dict__.values():
+ if inspect.isclass(cls) and cls.__module__ == todoc.__name__:
+ classes.append(cls)
+ return classes
+ raise ValueError(
+ "'%s' does not resolve to a class or module" % name)
+
+ def _import_classes(self, class_names):
+ """
+ Import a list of classes.
+ """
+ classes = []
+ for name in class_names:
+ classes.extend(self._import_class_or_module(name))
+ return classes
+
+ def _all_classes(self, classes):
+ """
+ Return a list of all classes that are ancestors of *classes*.
+ """
+ all_classes = {}
+
+ def recurse(cls):
+ all_classes[cls] = None
+ for c in cls.__bases__:
+ if c not in all_classes:
+ recurse(c)
+
+ for cls in classes:
+ recurse(cls)
+
+ return all_classes.keys()
+
+ def class_name(self, cls, parts=0):
+ """
+ Given a class object, return a fully-qualified name. This
+ works for things I've tested in matplotlib so far, but may not
+ be completely general.
+ """
+ module = cls.__module__
+ if module == '__builtin__':
+ fullname = cls.__name__
+ else:
+ fullname = "%s.%s" % (module, cls.__name__)
+ if parts == 0:
+ return fullname
+ name_parts = fullname.split('.')
+ return '.'.join(name_parts[-parts:])
+
+ def get_all_class_names(self):
+ """
+ Get all of the class names involved in the graph.
+ """
+ return [self.class_name(x) for x in self.all_classes]
+
+ # These are the default options for graphviz
+ default_graph_options = {
+ "rankdir": "LR",
+ "size": '"8.0, 12.0"'
+ }
+ default_node_options = {
+ "shape": "box",
+ "fontsize": 10,
+ "height": 0.25,
+ "fontname": "Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",
+ "style": '"setlinewidth(0.5)"'
+ }
+ default_edge_options = {
+ "arrowsize": 0.5,
+ "style": '"setlinewidth(0.5)"'
+ }
+
+ def _format_node_options(self, options):
+ return ','.join(["%s=%s" % x for x in options.items()])
+ def _format_graph_options(self, options):
+ return ''.join(["%s=%s;\n" % x for x in options.items()])
+
+ def generate_dot(self, fd, name, parts=0, urls={},
+ graph_options={}, node_options={},
+ edge_options={}):
+ """
+ Generate a graphviz dot graph from the classes that
+ were passed in to __init__.
+
+ *fd* is a Python file-like object to write to.
+
+ *name* is the name of the graph
+
+ *urls* is a dictionary mapping class names to http urls
+
+ *graph_options*, *node_options*, *edge_options* are
+ dictionaries containing key/value pairs to pass on as graphviz
+ properties.
+ """
+ g_options = self.default_graph_options.copy()
+ g_options.update(graph_options)
+ n_options = self.default_node_options.copy()
+ n_options.update(node_options)
+ e_options = self.default_edge_options.copy()
+ e_options.update(edge_options)
+
+ fd.write('digraph %s {\n' % name)
+ fd.write(self._format_graph_options(g_options))
+
+ for cls in self.all_classes:
+ if not self.show_builtins and cls in __builtins__.values():
+ continue
+
+ name = self.class_name(cls, parts)
+
+ # Write the node
+ this_node_options = n_options.copy()
+ url = urls.get(self.class_name(cls))
+ if url is not None:
+ this_node_options['URL'] = '"%s"' % url
+ fd.write(' "%s" [%s];\n' %
+ (name, self._format_node_options(this_node_options)))
+
+ # Write the edges
+ for base in cls.__bases__:
+ if not self.show_builtins and base in __builtins__.values():
+ continue
+
+ base_name = self.class_name(base, parts)
+ fd.write(' "%s" -> "%s" [%s];\n' %
+ (base_name, name,
+ self._format_node_options(e_options)))
+ fd.write('}\n')
+
+ def run_dot(self, args, name, parts=0, urls={},
+ graph_options={}, node_options={}, edge_options={}):
+ """
+ Run graphviz 'dot' over this graph, returning whatever 'dot'
+ writes to stdout.
+
+ *args* will be passed along as commandline arguments.
+
+ *name* is the name of the graph
+
+ *urls* is a dictionary mapping class names to http urls
+
+ Raises DotException for any of the many os and
+ installation-related errors that may occur.
+ """
+ try:
+ dot = subprocess.Popen(['dot'] + list(args),
+ stdin=subprocess.PIPE, stdout=subprocess.PIPE,
+ close_fds=True)
+ except OSError:
+ raise DotException("Could not execute 'dot'. Are you sure you have 'graphviz' installed?")
+ except ValueError:
+ raise DotException("'dot' called with invalid arguments")
+ except:
+ raise DotException("Unexpected error calling 'dot'")
+
+ self.generate_dot(dot.stdin, name, parts, urls, graph_options,
+ node_options, edge_options)
+ dot.stdin.close()
+ result = dot.stdout.read()
+ returncode = dot.wait()
+ if returncode != 0:
+ raise DotException("'dot' returned the errorcode %d" % returncode)
+ return result
+
+class inheritance_diagram(Body, Element):
+ """
+ A docutils node to use as a placeholder for the inheritance
+ diagram.
+ """
+ pass
+
+def inheritance_diagram_directive(name, arguments, options, content, lineno,
+ content_offset, block_text, state,
+ state_machine):
+ """
+ Run when the inheritance_diagram directive is first encountered.
+ """
+ node = inheritance_diagram()
+
+ class_names = arguments
+
+ # Create a graph starting with the list of classes
+ graph = InheritanceGraph(class_names)
+
+ # Create xref nodes for each target of the graph's image map and
+ # add them to the doc tree so that Sphinx can resolve the
+ # references to real URLs later. These nodes will eventually be
+ # removed from the doctree after we're done with them.
+ for name in graph.get_all_class_names():
+ refnodes, x = xfileref_role(
+ 'class', ':class:`%s`' % name, name, 0, state)
+ node.extend(refnodes)
+ # Store the graph object so we can use it to generate the
+ # dot file later
+ node['graph'] = graph
+ # Store the original content for use as a hash
+ node['parts'] = options.get('parts', 0)
+ node['content'] = " ".join(class_names)
+ return [node]
+
+def get_graph_hash(node):
+ return md5(node['content'] + str(node['parts'])).hexdigest()[-10:]
+
+def html_output_graph(self, node):
+ """
+ Output the graph for HTML. This will insert a PNG with clickable
+ image map.
+ """
+ graph = node['graph']
+ parts = node['parts']
+
+ graph_hash = get_graph_hash(node)
+ name = "inheritance%s" % graph_hash
+ path = '_images'
+ dest_path = os.path.join(setup.app.builder.outdir, path)
+ if not os.path.exists(dest_path):
+ os.makedirs(dest_path)
+ png_path = os.path.join(dest_path, name + ".png")
+ path = setup.app.builder.imgpath
+
+ # Create a mapping from fully-qualified class names to URLs.
+ urls = {}
+ for child in node:
+ if child.get('refuri') is not None:
+ urls[child['reftitle']] = child.get('refuri')
+ elif child.get('refid') is not None:
+ urls[child['reftitle']] = '#' + child.get('refid')
+
+ # These arguments to dot will save a PNG file to disk and write
+ # an HTML image map to stdout.
+ image_map = graph.run_dot(['-Tpng', '-o%s' % png_path, '-Tcmapx'],
+ name, parts, urls)
+ return ('<img src="%s/%s.png" usemap="#%s" class="inheritance"/>%s' %
+ (path, name, name, image_map))
+
+def latex_output_graph(self, node):
+ """
+ Output the graph for LaTeX. This will insert a PDF.
+ """
+ graph = node['graph']
+ parts = node['parts']
+
+ graph_hash = get_graph_hash(node)
+ name = "inheritance%s" % graph_hash
+ dest_path = os.path.abspath(os.path.join(setup.app.builder.outdir, '_images'))
+ if not os.path.exists(dest_path):
+ os.makedirs(dest_path)
+ pdf_path = os.path.abspath(os.path.join(dest_path, name + ".pdf"))
+
+ graph.run_dot(['-Tpdf', '-o%s' % pdf_path],
+ name, parts, graph_options={'size': '"6.0,6.0"'})
+ return '\n\\includegraphics{%s}\n\n' % pdf_path
+
+def visit_inheritance_diagram(inner_func):
+ """
+ This is just a wrapper around html/latex_output_graph to make it
+ easier to handle errors and insert warnings.
+ """
+ def visitor(self, node):
+ try:
+ content = inner_func(self, node)
+ except DotException, e:
+ # Insert the exception as a warning in the document
+ warning = self.document.reporter.warning(str(e), line=node.line)
+ warning.parent = node
+ node.children = [warning]
+ else:
+ source = self.document.attributes['source']
+ self.body.append(content)
+ node.children = []
+ return visitor
+
+def do_nothing(self, node):
+ pass
+
+def setup(app):
+ setup.app = app
+ setup.confdir = app.confdir
+
+ app.add_node(
+ inheritance_diagram,
+ latex=(visit_inheritance_diagram(latex_output_graph), do_nothing),
+ html=(visit_inheritance_diagram(html_output_graph), do_nothing))
+ app.add_directive(
+ 'inheritance-diagram', inheritance_diagram_directive,
+ False, (1, 100, 0), parts = directives.nonnegative_int)
Added: trunk/py4science/examples/sphinx_qs/sphinxext/ipython_console_highlighting.py
===================================================================
--- trunk/py4science/examples/sphinx_qs/sphinxext/ipython_console_highlighting.py	 (rev 0)
+++ trunk/py4science/examples/sphinx_qs/sphinxext/ipython_console_highlighting.py	2009年08月11日 10:59:31 UTC (rev 7456)
@@ -0,0 +1,98 @@
+"""reST directive for syntax-highlighting ipython interactive sessions.
+"""
+
+#-----------------------------------------------------------------------------
+# Needed modules
+
+# Standard library
+import re
+
+# Third party
+from pygments.lexer import Lexer, do_insertions
+from pygments.lexers.agile import (PythonConsoleLexer, PythonLexer, 
+ PythonTracebackLexer)
+from pygments.token import Comment, Generic
+
+from sphinx import highlighting
+
+
+#-----------------------------------------------------------------------------
+# Global constants
+line_re = re.compile('.*?\n')
+
+#-----------------------------------------------------------------------------
+# Code begins - classes and functions
+
+class IPythonConsoleLexer(Lexer):
+ """
+ For IPython console output or doctests, such as:
+
+ .. sourcecode:: ipython
+
+ In [1]: a = 'foo'
+
+ In [2]: a
+ Out[2]: 'foo'
+
+ In [3]: print a
+ foo
+
+ In [4]: 1 / 0
+
+ Notes:
+
+ - Tracebacks are not currently supported.
+
+ - It assumes the default IPython prompts, not customized ones.
+ """
+ 
+ name = 'IPython console session'
+ aliases = ['ipython']
+ mimetypes = ['text/x-ipython-console']
+ input_prompt = re.compile("(In \[[0-9]+\]: )|( \.\.\.+:)")
+ output_prompt = re.compile("(Out\[[0-9]+\]: )|( \.\.\.+:)")
+ continue_prompt = re.compile(" \.\.\.+:")
+ tb_start = re.compile("\-+")
+
+ def get_tokens_unprocessed(self, text):
+ pylexer = PythonLexer(**self.options)
+ tblexer = PythonTracebackLexer(**self.options)
+
+ curcode = ''
+ insertions = []
+ for match in line_re.finditer(text):
+ line = match.group()
+ input_prompt = self.input_prompt.match(line)
+ continue_prompt = self.continue_prompt.match(line.rstrip())
+ output_prompt = self.output_prompt.match(line)
+ if line.startswith("#"):
+ insertions.append((len(curcode),
+ [(0, Comment, line)]))
+ elif input_prompt is not None:
+ insertions.append((len(curcode),
+ [(0, Generic.Prompt, input_prompt.group())]))
+ curcode += line[input_prompt.end():]
+ elif continue_prompt is not None:
+ insertions.append((len(curcode),
+ [(0, Generic.Prompt, continue_prompt.group())]))
+ curcode += line[continue_prompt.end():]
+ elif output_prompt is not None:
+ insertions.append((len(curcode),
+ [(0, Generic.Output, output_prompt.group())]))
+ curcode += line[output_prompt.end():]
+ else:
+ if curcode:
+ for item in do_insertions(insertions,
+ pylexer.get_tokens_unprocessed(curcode)):
+ yield item
+ curcode = ''
+ insertions = []
+ yield match.start(), Generic.Output, line
+ if curcode:
+ for item in do_insertions(insertions,
+ pylexer.get_tokens_unprocessed(curcode)):
+ yield item
+
+#-----------------------------------------------------------------------------
+# Register the extension as a valid pygments lexer
+highlighting.lexers['ipython'] = IPythonConsoleLexer()
Added: trunk/py4science/examples/sphinx_qs/sphinxext/numpydoc.py
===================================================================
--- trunk/py4science/examples/sphinx_qs/sphinxext/numpydoc.py	 (rev 0)
+++ trunk/py4science/examples/sphinx_qs/sphinxext/numpydoc.py	2009年08月11日 10:59:31 UTC (rev 7456)
@@ -0,0 +1,116 @@
+"""
+========
+numpydoc
+========
+
+Sphinx extension that handles docstrings in the Numpy standard format. [1]
+
+It will:
+
+- Convert Parameters etc. sections to field lists.
+- Convert See Also section to a See also entry.
+- Renumber references.
+- Extract the signature from the docstring, if it can't be determined otherwise.
+
+.. [1] http://projects.scipy.org/scipy/numpy/wiki/CodingStyleGuidelines#docstring-standard
+
+"""
+
+import os, re, pydoc
+from docscrape_sphinx import get_doc_object, SphinxDocString
+import inspect
+
+def mangle_docstrings(app, what, name, obj, options, lines,
+ reference_offset=[0]):
+ if what == 'module':
+ # Strip top title
+ title_re = re.compile(r'^\s*[#*=]{4,}\n[a-z0-9 -]+\n[#*=]{4,}\s*',
+ re.I|re.S)
+ lines[:] = title_re.sub('', "\n".join(lines)).split("\n")
+ else:
+ doc = get_doc_object(obj, what, "\n".join(lines))
+ lines[:] = str(doc).split("\n")
+
+ if app.config.numpydoc_edit_link and hasattr(obj, '__name__') and \
+ obj.__name__:
+ if hasattr(obj, '__module__'):
+ v = dict(full_name="%s.%s" % (obj.__module__, obj.__name__))
+ else:
+ v = dict(full_name=obj.__name__)
+ lines += ['', '.. htmlonly::', '']
+ lines += [' %s' % x for x in
+ (app.config.numpydoc_edit_link % v).split("\n")]
+
+ # replace reference numbers so that there are no duplicates
+ references = []
+ for l in lines:
+ l = l.strip()
+ if l.startswith('.. ['):
+ try:
+ references.append(int(l[len('.. ['):l.index(']')]))
+ except ValueError:
+ print "WARNING: invalid reference in %s docstring" % name
+
+ # Start renaming from the biggest number, otherwise we may
+ # overwrite references.
+ references.sort()
+ if references:
+ for i, line in enumerate(lines):
+ for r in references:
+ new_r = reference_offset[0] + r
+ lines[i] = lines[i].replace('[%d]_' % r,
+ '[%d]_' % new_r)
+ lines[i] = lines[i].replace('.. [%d]' % r,
+ '.. [%d]' % new_r)
+
+ reference_offset[0] += len(references)
+
+def mangle_signature(app, what, name, obj, options, sig, retann):
+ # Do not try to inspect classes that don't define `__init__`
+ if (inspect.isclass(obj) and
+ 'initializes x; see ' in pydoc.getdoc(obj.__init__)):
+ return '', ''
+
+ if not (callable(obj) or hasattr(obj, '__argspec_is_invalid_')): return
+ if not hasattr(obj, '__doc__'): return
+
+ doc = SphinxDocString(pydoc.getdoc(obj))
+ if doc['Signature']:
+ sig = re.sub("^[^(]*", "", doc['Signature'])
+ return sig, ''
+
+def initialize(app):
+ try:
+ app.connect('autodoc-process-signature', mangle_signature)
+ except:
+ monkeypatch_sphinx_ext_autodoc()
+
+def setup(app, get_doc_object_=get_doc_object):
+ global get_doc_object
+ get_doc_object = get_doc_object_
+ 
+ app.connect('autodoc-process-docstring', mangle_docstrings)
+ app.connect('builder-inited', initialize)
+ app.add_config_value('numpydoc_edit_link', None, True)
+
+#------------------------------------------------------------------------------
+# Monkeypatch sphinx.ext.autodoc to accept argspecless autodocs (Sphinx < 0.5)
+#------------------------------------------------------------------------------
+
+def monkeypatch_sphinx_ext_autodoc():
+ global _original_format_signature
+ import sphinx.ext.autodoc
+
+ if sphinx.ext.autodoc.format_signature is our_format_signature:
+ return
+
+ print "[numpydoc] Monkeypatching sphinx.ext.autodoc ..."
+ _original_format_signature = sphinx.ext.autodoc.format_signature
+ sphinx.ext.autodoc.format_signature = our_format_signature
+
+def our_format_signature(what, obj):
+ r = mangle_signature(None, what, None, obj, None, None, None)
+ if r is not None:
+ return r[0]
+ else:
+ return _original_format_signature(what, obj)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2009年08月11日 10:54:15
Revision: 7455
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7455&view=rev
Author: jdh2358
Date: 2009年08月11日 10:54:07 +0000 (2009年8月11日)
Log Message:
-----------
update fancy screenshot
Modified Paths:
--------------
 trunk/py4science/examples/sphinx_qs/_static/fancy_screenshot.png
 trunk/py4science/examples/sphinx_qs/custom_look.rst
 trunk/py4science/examples/sphinx_qs/getting_started.rst
 trunk/py4science/examples/sphinx_qs/index.rst
Modified: trunk/py4science/examples/sphinx_qs/_static/fancy_screenshot.png
===================================================================
(Binary files differ)
Modified: trunk/py4science/examples/sphinx_qs/custom_look.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/custom_look.rst	2009年08月11日 10:45:16 UTC (rev 7454)
+++ trunk/py4science/examples/sphinx_qs/custom_look.rst	2009年08月11日 10:54:07 UTC (rev 7455)
@@ -5,13 +5,14 @@
 Customizing the site
 *********************
 
-the `<http://sphinx.pocoo.org/>`_ site itself looks better than the
-sites created with the default css, so here we'll invoke Tufte's
+The `sphinx <http://sphinx.pocoo.org/>`_ site itself looks better than
+the sites created with the default css, so here we'll invoke Tufte's
 phrase "Intelligence imitates but genious steals and grab their css
 and part of their layout. As before, you can either get the required
-files :file:`_static/default.css`, :file:`_templates:layout.html` and :file:`_static\logo.png`
-from the website or svn (see :ref:`fetching-the-data`). Since I did a
-svn checkout before, I will just copy the stuff I need from there::
+files :file:`_static/default.css`, :file:`_templates:layout.html` and
+:file:`_static\logo.png` from the website or svn (see
+:ref:`fetching-the-data`). Since I did a svn checkout before, I will
+just copy the stuff I need from there::
 
 home:~/tmp/py4sci> cp ../sphinx_qs/_static/default.css _static/
 home:~/tmp/py4sci> cp ../sphinx_qs/_templates/layout.html _templates/
@@ -23,9 +24,15 @@
 _templates/:
 layout.html
 
-Sphinx will automatically pick up the css and layout html files since we put them in the
-default places with the default names, but we have to manually include the logo in our :file:`layout.html`. Let's take a look at the
-layout file: the first part puts a horizontal navigation bar at the top of our page, like you see on the `sphinx <http://sphinx.pocoo.org>`_ and `matplotlib <http://matplotlib.sourceforge.net/>`_ sites, the second part includes a logo that when we click on it will take us `home` and the last part moves the vertical navigation panels to the right side of the page.
+Sphinx will automatically pick up the css and layout html files since
+we put them in the default places with the default names, but we have
+to manually include the logo in our :file:`layout.html`. Let's take a
+look at the layout file: the first part puts a horizontal navigation
+bar at the top of our page, like you see on the `sphinx
+<http://sphinx.pocoo.org>`_ and `matplotlib
+<http://matplotlib.sourceforge.net/>`_ sites, the second part includes
+a logo that when we click on it will take us `home` and the last part
+moves the vertical navigation panels to the right side of the page::
 
 {% extends "!layout.html" %}
 
@@ -49,3 +56,7 @@
 {# put the sidebar before the body #}
 {% block sidebar1 %}{{ sidebar() }}{% endblock %}
 {% block sidebar2 %}{% endblock %}
+
+Once you rebuild the site with a ``make html`` and reload the page in your browser, you should see a fancier site that looks like this
+
+.. image:: _static/fancy_screenshot.png
Modified: trunk/py4science/examples/sphinx_qs/getting_started.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/getting_started.rst	2009年08月11日 10:45:16 UTC (rev 7454)
+++ trunk/py4science/examples/sphinx_qs/getting_started.rst	2009年08月11日 10:54:07 UTC (rev 7455)
@@ -1,9 +1,9 @@
-.. _sphinx_helpers:
+.. _getting_started:
 
 
-******************
-Sphinx Cheat Sheet
-******************
+***************
+Getting started
+***************
 
 Cheat sheet on how to make this site and install these extensions and
 other goodies. You can see a literal version of this file below in
@@ -103,4 +103,7 @@
 
 Next we'll customize the look and feel of our site to give it a logo,
 some custom css, and update the navigation panels to look more like
-the `<http://sphinx.pocoo.org/>`_ site itself -- see :ref:`custom_look`.
+the `sphinx <http://sphinx.pocoo.org/>`_ site itself -- see
+:ref:`custom_look`.
+
+
Modified: trunk/py4science/examples/sphinx_qs/index.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/index.rst	2009年08月11日 10:45:16 UTC (rev 7454)
+++ trunk/py4science/examples/sphinx_qs/index.rst	2009年08月11日 10:54:07 UTC (rev 7455)
@@ -12,6 +12,7 @@
 :maxdepth: 2
 
 getting_started.rst
+ custom_look.rst
 
 Indices and tables
 ==================
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2009年08月11日 10:45:28
Revision: 7454
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7454&view=rev
Author: jdh2358
Date: 2009年08月11日 10:45:16 +0000 (2009年8月11日)
Log Message:
-----------
added fancy screenshot
Modified Paths:
--------------
 trunk/py4science/examples/sphinx_qs/custom_look.rst
Added Paths:
-----------
 trunk/py4science/examples/sphinx_qs/_static/fancy_screenshot.png
Added: trunk/py4science/examples/sphinx_qs/_static/fancy_screenshot.png
===================================================================
(Binary files differ)
Property changes on: trunk/py4science/examples/sphinx_qs/_static/fancy_screenshot.png
___________________________________________________________________
Added: svn:mime-type
 + application/octet-stream
Modified: trunk/py4science/examples/sphinx_qs/custom_look.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/custom_look.rst	2009年08月11日 10:39:12 UTC (rev 7453)
+++ trunk/py4science/examples/sphinx_qs/custom_look.rst	2009年08月11日 10:45:16 UTC (rev 7454)
@@ -9,5 +9,43 @@
 sites created with the default css, so here we'll invoke Tufte's
 phrase "Intelligence imitates but genious steals and grab their css
 and part of their layout. As before, you can either get the required
-files :file:`_static/sphinx.css` and :file:`_templates:layout.html`
-from the website or svn (see :ref:`fetching-the-data`)
+files :file:`_static/default.css`, :file:`_templates:layout.html` and :file:`_static\logo.png`
+from the website or svn (see :ref:`fetching-the-data`). Since I did a
+svn checkout before, I will just copy the stuff I need from there::
+
+ home:~/tmp/py4sci> cp ../sphinx_qs/_static/default.css _static/
+ home:~/tmp/py4sci> cp ../sphinx_qs/_templates/layout.html _templates/
+ home:~/tmp/py4sci> cp ../sphinx_qs/_static/logo.png _static/
+ home:~/tmp/py4sci> ls _static/ _templates/
+ _static/:
+ basic_screenshot.png	default.css		logo.png
+
+ _templates/:
+ layout.html
+
+Sphinx will automatically pick up the css and layout html files since we put them in the
+default places with the default names, but we have to manually include the logo in our :file:`layout.html`. Let's take a look at the
+layout file: the first part puts a horizontal navigation bar at the top of our page, like you see on the `sphinx <http://sphinx.pocoo.org>`_ and `matplotlib <http://matplotlib.sourceforge.net/>`_ sites, the second part includes a logo that when we click on it will take us `home` and the last part moves the vertical navigation panels to the right side of the page.
+
+ {% extends "!layout.html" %}
+
+
+ {% block rootrellink %}
+ <li><a href="{{ pathto('index') }}">home</a>|&nbsp;</li>
+ <li><a href="{{ pathto('search') }}">search</a>|&nbsp;</li>
+ <li><a href="{{ pathto('contents') }}">documentation </a> &raquo;</li>
+ {% endblock %}
+
+
+ {% block relbar1 %}
+
+ <div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px">
+ <a href="{{ pathto('index') }}"><img src="{{
+ pathto("_static/logo.png", 1) }}" border="0" alt="py4sci"/></a>
+ </div>
+ {{ super() }}
+ {% endblock %}
+
+ {# put the sidebar before the body #}
+ {% block sidebar1 %}{{ sidebar() }}{% endblock %}
+ {% block sidebar2 %}{% endblock %}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 7453
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7453&view=rev
Author: jdh2358
Date: 2009年08月11日 10:39:12 +0000 (2009年8月11日)
Log Message:
-----------
added the logo png
Added Paths:
-----------
 trunk/py4science/examples/sphinx_qs/_static/logo.png
Added: trunk/py4science/examples/sphinx_qs/_static/logo.png
===================================================================
(Binary files differ)
Property changes on: trunk/py4science/examples/sphinx_qs/_static/logo.png
___________________________________________________________________
Added: svn:mime-type
 + application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2009年08月11日 10:34:24
Revision: 7452
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7452&view=rev
Author: jdh2358
Date: 2009年08月11日 10:34:17 +0000 (2009年8月11日)
Log Message:
-----------
use the default css name
Added Paths:
-----------
 trunk/py4science/examples/sphinx_qs/_static/default.css
Removed Paths:
-------------
 trunk/py4science/examples/sphinx_qs/_static/sphinx.css
Copied: trunk/py4science/examples/sphinx_qs/_static/default.css (from rev 7451, trunk/py4science/examples/sphinx_qs/_static/sphinx.css)
===================================================================
--- trunk/py4science/examples/sphinx_qs/_static/default.css	 (rev 0)
+++ trunk/py4science/examples/sphinx_qs/_static/default.css	2009年08月11日 10:34:17 UTC (rev 7452)
@@ -0,0 +1,507 @@
+/**
+ * Alternate Sphinx design
+ * Originally created by Armin Ronacher for Werkzeug, adapted by Georg Brandl.
+ */
+
+body {
+ font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva', 'Verdana', sans-serif;
+ font-size: 14px;
+ letter-spacing: -0.01em;
+ line-height: 150%;
+ text-align: center;
+ /*background-color: #AFC1C4; */
+ background-color: #BFD1D4;
+ color: black;
+ padding: 0;
+ border: 1px solid #aaa;
+
+ margin: 0px 80px 0px 80px;
+ min-width: 740px;
+}
+
+a {
+ color: #CA7900;
+ text-decoration: none;
+}
+
+a:hover {
+ color: #2491CF;
+}
+
+pre {
+ font-family: 'Consolas', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
+ font-size: 0.95em;
+ letter-spacing: 0.015em;
+ padding: 0.5em;
+ border: 1px solid #ccc;
+ background-color: #f8f8f8;
+}
+
+td.linenos pre {
+ padding: 0.5em 0;
+ border: 0;
+ background-color: transparent;
+ color: #aaa;
+}
+
+table.highlighttable {
+ margin-left: 0.5em;
+}
+
+table.highlighttable td {
+ padding: 0 0.5em 0 0.5em;
+}
+
+cite, code, tt {
+ font-family: 'Consolas', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
+ font-size: 0.95em;
+ letter-spacing: 0.01em;
+}
+
+hr {
+ border: 1px solid #abc;
+ margin: 2em;
+}
+
+tt {
+ background-color: #f2f2f2;
+ border-bottom: 1px solid #ddd;
+ color: #333;
+}
+
+tt.descname {
+ background-color: transparent;
+ font-weight: bold;
+ font-size: 1.2em;
+ border: 0;
+}
+
+tt.descclassname {
+ background-color: transparent;
+ border: 0;
+}
+
+tt.xref {
+ background-color: transparent;
+ font-weight: bold;
+ border: 0;
+}
+
+a tt {
+ background-color: transparent;
+ font-weight: bold;
+ border: 0;
+ color: #CA7900;
+}
+
+a tt:hover {
+ color: #2491CF;
+}
+
+dl {
+ margin-bottom: 15px;
+}
+
+dd p {
+ margin-top: 0px;
+}
+
+dd ul, dd table {
+ margin-bottom: 10px;
+}
+
+dd {
+ margin-top: 3px;
+ margin-bottom: 10px;
+ margin-left: 30px;
+}
+
+.refcount {
+ color: #060;
+}
+
+dt:target,
+.highlight {
+ background-color: #fbe54e;
+}
+
+dl.class, dl.function {
+ border-top: 2px solid #888;
+}
+
+dl.method, dl.attribute {
+ border-top: 1px solid #aaa;
+}
+
+dl.glossary dt {
+ font-weight: bold;
+ font-size: 1.1em;
+}
+
+pre {
+ line-height: 120%;
+}
+
+pre a {
+ color: inherit;
+ text-decoration: underline;
+}
+
+.first {
+ margin-top: 0 !important;
+}
+
+div.document {
+ background-color: white;
+ text-align: left;
+ background-image: url(contents.png);
+ background-repeat: repeat-x;
+}
+
+/*
+div.documentwrapper {
+ width: 100%;
+}
+*/
+
+div.clearer {
+ clear: both;
+}
+
+div.related h3 {
+ display: none;
+}
+
+div.related ul {
+ background-image: url(navigation.png);
+ height: 2em;
+ list-style: none;
+ border-top: 1px solid #ddd;
+ border-bottom: 1px solid #ddd;
+ margin: 0;
+ padding-left: 10px;
+}
+
+div.related ul li {
+ margin: 0;
+ padding: 0;
+ height: 2em;
+ float: left;
+}
+
+div.related ul li.right {
+ float: right;
+ margin-right: 5px;
+}
+
+div.related ul li a {
+ margin: 0;
+ padding: 0 5px 0 5px;
+ line-height: 1.75em;
+ color: #EE9816;
+}
+
+div.related ul li a:hover {
+ color: #3CA8E7;
+}
+
+div.body {
+ margin: 0;
+ padding: 0.5em 20px 20px 20px;
+}
+
+div.bodywrapper {
+ margin: 0 240px 0 0;
+ border-right: 1px solid #ccc;
+}
+
+div.body a {
+ text-decoration: underline;
+}
+
+div.sphinxsidebar {
+ margin: 0;
+ padding: 0.5em 15px 15px 0;
+ width: 210px;
+ float: right;
+ text-align: left;
+/* margin-left: -100%; */
+}
+
+div.sphinxsidebar h4, div.sphinxsidebar h3 {
+ margin: 1em 0 0.5em 0;
+ font-size: 0.9em;
+ padding: 0.1em 0 0.1em 0.5em;
+ color: white;
+ border: 1px solid #86989B;
+ background-color: #AFC1C4;
+}
+
+div.sphinxsidebar ul {
+ padding-left: 1.5em;
+ margin-top: 7px;
+ list-style: none;
+ padding: 0;
+ line-height: 130%;
+}
+
+div.sphinxsidebar ul ul {
+ list-style: square;
+ margin-left: 20px;
+}
+
+p {
+ margin: 0.8em 0 0.5em 0;
+}
+
+p.rubric {
+ font-weight: bold;
+}
+
+h1 {
+ margin: 0;
+ padding: 0.7em 0 0.3em 0;
+ font-size: 1.5em;
+ color: #11557C;
+}
+
+h2 {
+ margin: 1.3em 0 0.2em 0;
+ font-size: 1.35em;
+ padding: 0;
+}
+
+h3 {
+ margin: 1em 0 -0.3em 0;
+ font-size: 1.2em;
+}
+
+h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
+ color: black!important;
+}
+
+h1 a.anchor, h2 a.anchor, h3 a.anchor, h4 a.anchor, h5 a.anchor, h6 a.anchor {
+ display: none;
+ margin: 0 0 0 0.3em;
+ padding: 0 0.2em 0 0.2em;
+ color: #aaa!important;
+}
+
+h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor,
+h5:hover a.anchor, h6:hover a.anchor {
+ display: inline;
+}
+
+h1 a.anchor:hover, h2 a.anchor:hover, h3 a.anchor:hover, h4 a.anchor:hover,
+h5 a.anchor:hover, h6 a.anchor:hover {
+ color: #777;
+ background-color: #eee;
+}
+
+table {
+ border-collapse: collapse;
+ margin: 0 -0.5em 0 -0.5em;
+}
+
+table td, table th {
+ padding: 0.2em 0.5em 0.2em 0.5em;
+}
+
+div.footer {
+ background-color: #E3EFF1;
+ color: #86989B;
+ padding: 3px 8px 3px 0;
+ clear: both;
+ font-size: 0.8em;
+ text-align: right;
+}
+
+div.footer a {
+ color: #86989B;
+ text-decoration: underline;
+}
+
+div.pagination {
+ margin-top: 2em;
+ padding-top: 0.5em;
+ border-top: 1px solid black;
+ text-align: center;
+}
+
+div.sphinxsidebar ul.toc {
+ margin: 1em 0 1em 0;
+ padding: 0 0 0 0.5em;
+ list-style: none;
+}
+
+div.sphinxsidebar ul.toc li {
+ margin: 0.5em 0 0.5em 0;
+ font-size: 0.9em;
+ line-height: 130%;
+}
+
+div.sphinxsidebar ul.toc li p {
+ margin: 0;
+ padding: 0;
+}
+
+div.sphinxsidebar ul.toc ul {
+ margin: 0.2em 0 0.2em 0;
+ padding: 0 0 0 1.8em;
+}
+
+div.sphinxsidebar ul.toc ul li {
+ padding: 0;
+}
+
+div.admonition, div.warning {
+ font-size: 0.9em;
+ margin: 1em 0 0 0;
+ border: 1px solid #86989B;
+ background-color: #f7f7f7;
+}
+
+div.admonition p, div.warning p {
+ margin: 0.5em 1em 0.5em 1em;
+ padding: 0;
+}
+
+div.admonition pre, div.warning pre {
+ margin: 0.4em 1em 0.4em 1em;
+}
+
+div.admonition p.admonition-title,
+div.warning p.admonition-title {
+ margin: 0;
+ padding: 0.1em 0 0.1em 0.5em;
+ color: white;
+ border-bottom: 1px solid #86989B;
+ font-weight: bold;
+ background-color: #AFC1C4;
+}
+
+div.warning {
+ border: 1px solid #940000;
+}
+
+div.warning p.admonition-title {
+ background-color: #CF0000;
+ border-bottom-color: #940000;
+}
+
+div.admonition ul, div.admonition ol,
+div.warning ul, div.warning ol {
+ margin: 0.1em 0.5em 0.5em 3em;
+ padding: 0;
+}
+
+div.versioninfo {
+ margin: 1em 0 0 0;
+ border: 1px solid #ccc;
+ background-color: #DDEAF0;
+ padding: 8px;
+ line-height: 1.3em;
+ font-size: 0.9em;
+}
+
+
+a.headerlink {
+ color: #c60f0f!important;
+ font-size: 1em;
+ margin-left: 6px;
+ padding: 0 4px 0 4px;
+ text-decoration: none!important;
+ visibility: hidden;
+}
+
+h1:hover > a.headerlink,
+h2:hover > a.headerlink,
+h3:hover > a.headerlink,
+h4:hover > a.headerlink,
+h5:hover > a.headerlink,
+h6:hover > a.headerlink,
+dt:hover > a.headerlink {
+ visibility: visible;
+}
+
+a.headerlink:hover {
+ background-color: #ccc;
+ color: white!important;
+}
+
+table.indextable td {
+ text-align: left;
+ vertical-align: top;
+}
+
+table.indextable dl, table.indextable dd {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+
+table.indextable tr.pcap {
+ height: 10px;
+}
+
+table.indextable tr.cap {
+ margin-top: 10px;
+ background-color: #f2f2f2;
+}
+
+img.toggler {
+ margin-right: 3px;
+ margin-top: 3px;
+ cursor: pointer;
+}
+
+img.inheritance {
+ border: 0px
+}
+
+form.pfform {
+ margin: 10px 0 20px 0;
+}
+
+table.contentstable {
+ width: 90%;
+}
+
+table.contentstable p.biglink {
+ line-height: 150%;
+}
+
+a.biglink {
+ font-size: 1.3em;
+}
+
+span.linkdescr {
+ font-style: italic;
+ padding-top: 5px;
+ font-size: 90%;
+}
+
+ul.search {
+ margin: 10px 0 0 20px;
+ padding: 0;
+}
+
+ul.search li {
+ padding: 5px 0 5px 20px;
+ background-image: url(file.png);
+ background-repeat: no-repeat;
+ background-position: 0 7px;
+}
+
+ul.search li a {
+ font-weight: bold;
+}
+
+ul.search li div.context {
+ color: #888;
+ margin: 2px 0 0 30px;
+ text-align: left;
+}
+
+ul.keywordmatches li.goodmatch a {
+ font-weight: bold;
+}
Deleted: trunk/py4science/examples/sphinx_qs/_static/sphinx.css
===================================================================
--- trunk/py4science/examples/sphinx_qs/_static/sphinx.css	2009年08月11日 10:30:33 UTC (rev 7451)
+++ trunk/py4science/examples/sphinx_qs/_static/sphinx.css	2009年08月11日 10:34:17 UTC (rev 7452)
@@ -1,507 +0,0 @@
-/**
- * Alternate Sphinx design
- * Originally created by Armin Ronacher for Werkzeug, adapted by Georg Brandl.
- */
-
-body {
- font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva', 'Verdana', sans-serif;
- font-size: 14px;
- letter-spacing: -0.01em;
- line-height: 150%;
- text-align: center;
- /*background-color: #AFC1C4; */
- background-color: #BFD1D4;
- color: black;
- padding: 0;
- border: 1px solid #aaa;
-
- margin: 0px 80px 0px 80px;
- min-width: 740px;
-}
-
-a {
- color: #CA7900;
- text-decoration: none;
-}
-
-a:hover {
- color: #2491CF;
-}
-
-pre {
- font-family: 'Consolas', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
- font-size: 0.95em;
- letter-spacing: 0.015em;
- padding: 0.5em;
- border: 1px solid #ccc;
- background-color: #f8f8f8;
-}
-
-td.linenos pre {
- padding: 0.5em 0;
- border: 0;
- background-color: transparent;
- color: #aaa;
-}
-
-table.highlighttable {
- margin-left: 0.5em;
-}
-
-table.highlighttable td {
- padding: 0 0.5em 0 0.5em;
-}
-
-cite, code, tt {
- font-family: 'Consolas', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
- font-size: 0.95em;
- letter-spacing: 0.01em;
-}
-
-hr {
- border: 1px solid #abc;
- margin: 2em;
-}
-
-tt {
- background-color: #f2f2f2;
- border-bottom: 1px solid #ddd;
- color: #333;
-}
-
-tt.descname {
- background-color: transparent;
- font-weight: bold;
- font-size: 1.2em;
- border: 0;
-}
-
-tt.descclassname {
- background-color: transparent;
- border: 0;
-}
-
-tt.xref {
- background-color: transparent;
- font-weight: bold;
- border: 0;
-}
-
-a tt {
- background-color: transparent;
- font-weight: bold;
- border: 0;
- color: #CA7900;
-}
-
-a tt:hover {
- color: #2491CF;
-}
-
-dl {
- margin-bottom: 15px;
-}
-
-dd p {
- margin-top: 0px;
-}
-
-dd ul, dd table {
- margin-bottom: 10px;
-}
-
-dd {
- margin-top: 3px;
- margin-bottom: 10px;
- margin-left: 30px;
-}
-
-.refcount {
- color: #060;
-}
-
-dt:target,
-.highlight {
- background-color: #fbe54e;
-}
-
-dl.class, dl.function {
- border-top: 2px solid #888;
-}
-
-dl.method, dl.attribute {
- border-top: 1px solid #aaa;
-}
-
-dl.glossary dt {
- font-weight: bold;
- font-size: 1.1em;
-}
-
-pre {
- line-height: 120%;
-}
-
-pre a {
- color: inherit;
- text-decoration: underline;
-}
-
-.first {
- margin-top: 0 !important;
-}
-
-div.document {
- background-color: white;
- text-align: left;
- background-image: url(contents.png);
- background-repeat: repeat-x;
-}
-
-/*
-div.documentwrapper {
- width: 100%;
-}
-*/
-
-div.clearer {
- clear: both;
-}
-
-div.related h3 {
- display: none;
-}
-
-div.related ul {
- background-image: url(navigation.png);
- height: 2em;
- list-style: none;
- border-top: 1px solid #ddd;
- border-bottom: 1px solid #ddd;
- margin: 0;
- padding-left: 10px;
-}
-
-div.related ul li {
- margin: 0;
- padding: 0;
- height: 2em;
- float: left;
-}
-
-div.related ul li.right {
- float: right;
- margin-right: 5px;
-}
-
-div.related ul li a {
- margin: 0;
- padding: 0 5px 0 5px;
- line-height: 1.75em;
- color: #EE9816;
-}
-
-div.related ul li a:hover {
- color: #3CA8E7;
-}
-
-div.body {
- margin: 0;
- padding: 0.5em 20px 20px 20px;
-}
-
-div.bodywrapper {
- margin: 0 240px 0 0;
- border-right: 1px solid #ccc;
-}
-
-div.body a {
- text-decoration: underline;
-}
-
-div.sphinxsidebar {
- margin: 0;
- padding: 0.5em 15px 15px 0;
- width: 210px;
- float: right;
- text-align: left;
-/* margin-left: -100%; */
-}
-
-div.sphinxsidebar h4, div.sphinxsidebar h3 {
- margin: 1em 0 0.5em 0;
- font-size: 0.9em;
- padding: 0.1em 0 0.1em 0.5em;
- color: white;
- border: 1px solid #86989B;
- background-color: #AFC1C4;
-}
-
-div.sphinxsidebar ul {
- padding-left: 1.5em;
- margin-top: 7px;
- list-style: none;
- padding: 0;
- line-height: 130%;
-}
-
-div.sphinxsidebar ul ul {
- list-style: square;
- margin-left: 20px;
-}
-
-p {
- margin: 0.8em 0 0.5em 0;
-}
-
-p.rubric {
- font-weight: bold;
-}
-
-h1 {
- margin: 0;
- padding: 0.7em 0 0.3em 0;
- font-size: 1.5em;
- color: #11557C;
-}
-
-h2 {
- margin: 1.3em 0 0.2em 0;
- font-size: 1.35em;
- padding: 0;
-}
-
-h3 {
- margin: 1em 0 -0.3em 0;
- font-size: 1.2em;
-}
-
-h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
- color: black!important;
-}
-
-h1 a.anchor, h2 a.anchor, h3 a.anchor, h4 a.anchor, h5 a.anchor, h6 a.anchor {
- display: none;
- margin: 0 0 0 0.3em;
- padding: 0 0.2em 0 0.2em;
- color: #aaa!important;
-}
-
-h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor,
-h5:hover a.anchor, h6:hover a.anchor {
- display: inline;
-}
-
-h1 a.anchor:hover, h2 a.anchor:hover, h3 a.anchor:hover, h4 a.anchor:hover,
-h5 a.anchor:hover, h6 a.anchor:hover {
- color: #777;
- background-color: #eee;
-}
-
-table {
- border-collapse: collapse;
- margin: 0 -0.5em 0 -0.5em;
-}
-
-table td, table th {
- padding: 0.2em 0.5em 0.2em 0.5em;
-}
-
-div.footer {
- background-color: #E3EFF1;
- color: #86989B;
- padding: 3px 8px 3px 0;
- clear: both;
- font-size: 0.8em;
- text-align: right;
-}
-
-div.footer a {
- color: #86989B;
- text-decoration: underline;
-}
-
-div.pagination {
- margin-top: 2em;
- padding-top: 0.5em;
- border-top: 1px solid black;
- text-align: center;
-}
-
-div.sphinxsidebar ul.toc {
- margin: 1em 0 1em 0;
- padding: 0 0 0 0.5em;
- list-style: none;
-}
-
-div.sphinxsidebar ul.toc li {
- margin: 0.5em 0 0.5em 0;
- font-size: 0.9em;
- line-height: 130%;
-}
-
-div.sphinxsidebar ul.toc li p {
- margin: 0;
- padding: 0;
-}
-
-div.sphinxsidebar ul.toc ul {
- margin: 0.2em 0 0.2em 0;
- padding: 0 0 0 1.8em;
-}
-
-div.sphinxsidebar ul.toc ul li {
- padding: 0;
-}
-
-div.admonition, div.warning {
- font-size: 0.9em;
- margin: 1em 0 0 0;
- border: 1px solid #86989B;
- background-color: #f7f7f7;
-}
-
-div.admonition p, div.warning p {
- margin: 0.5em 1em 0.5em 1em;
- padding: 0;
-}
-
-div.admonition pre, div.warning pre {
- margin: 0.4em 1em 0.4em 1em;
-}
-
-div.admonition p.admonition-title,
-div.warning p.admonition-title {
- margin: 0;
- padding: 0.1em 0 0.1em 0.5em;
- color: white;
- border-bottom: 1px solid #86989B;
- font-weight: bold;
- background-color: #AFC1C4;
-}
-
-div.warning {
- border: 1px solid #940000;
-}
-
-div.warning p.admonition-title {
- background-color: #CF0000;
- border-bottom-color: #940000;
-}
-
-div.admonition ul, div.admonition ol,
-div.warning ul, div.warning ol {
- margin: 0.1em 0.5em 0.5em 3em;
- padding: 0;
-}
-
-div.versioninfo {
- margin: 1em 0 0 0;
- border: 1px solid #ccc;
- background-color: #DDEAF0;
- padding: 8px;
- line-height: 1.3em;
- font-size: 0.9em;
-}
-
-
-a.headerlink {
- color: #c60f0f!important;
- font-size: 1em;
- margin-left: 6px;
- padding: 0 4px 0 4px;
- text-decoration: none!important;
- visibility: hidden;
-}
-
-h1:hover > a.headerlink,
-h2:hover > a.headerlink,
-h3:hover > a.headerlink,
-h4:hover > a.headerlink,
-h5:hover > a.headerlink,
-h6:hover > a.headerlink,
-dt:hover > a.headerlink {
- visibility: visible;
-}
-
-a.headerlink:hover {
- background-color: #ccc;
- color: white!important;
-}
-
-table.indextable td {
- text-align: left;
- vertical-align: top;
-}
-
-table.indextable dl, table.indextable dd {
- margin-top: 0;
- margin-bottom: 0;
-}
-
-table.indextable tr.pcap {
- height: 10px;
-}
-
-table.indextable tr.cap {
- margin-top: 10px;
- background-color: #f2f2f2;
-}
-
-img.toggler {
- margin-right: 3px;
- margin-top: 3px;
- cursor: pointer;
-}
-
-img.inheritance {
- border: 0px
-}
-
-form.pfform {
- margin: 10px 0 20px 0;
-}
-
-table.contentstable {
- width: 90%;
-}
-
-table.contentstable p.biglink {
- line-height: 150%;
-}
-
-a.biglink {
- font-size: 1.3em;
-}
-
-span.linkdescr {
- font-style: italic;
- padding-top: 5px;
- font-size: 90%;
-}
-
-ul.search {
- margin: 10px 0 0 20px;
- padding: 0;
-}
-
-ul.search li {
- padding: 5px 0 5px 20px;
- background-image: url(file.png);
- background-repeat: no-repeat;
- background-position: 0 7px;
-}
-
-ul.search li a {
- font-weight: bold;
-}
-
-ul.search li div.context {
- color: #888;
- margin: 2px 0 0 30px;
- text-align: left;
-}
-
-ul.keywordmatches li.goodmatch a {
- font-weight: bold;
-}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2009年08月11日 10:30:43
Revision: 7451
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7451&view=rev
Author: jdh2358
Date: 2009年08月11日 10:30:33 +0000 (2009年8月11日)
Log Message:
-----------
added css and layout
Added Paths:
-----------
 trunk/py4science/examples/sphinx_qs/_static/sphinx.css
 trunk/py4science/examples/sphinx_qs/_templates/layout.html
Added: trunk/py4science/examples/sphinx_qs/_static/sphinx.css
===================================================================
--- trunk/py4science/examples/sphinx_qs/_static/sphinx.css	 (rev 0)
+++ trunk/py4science/examples/sphinx_qs/_static/sphinx.css	2009年08月11日 10:30:33 UTC (rev 7451)
@@ -0,0 +1,507 @@
+/**
+ * Alternate Sphinx design
+ * Originally created by Armin Ronacher for Werkzeug, adapted by Georg Brandl.
+ */
+
+body {
+ font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva', 'Verdana', sans-serif;
+ font-size: 14px;
+ letter-spacing: -0.01em;
+ line-height: 150%;
+ text-align: center;
+ /*background-color: #AFC1C4; */
+ background-color: #BFD1D4;
+ color: black;
+ padding: 0;
+ border: 1px solid #aaa;
+
+ margin: 0px 80px 0px 80px;
+ min-width: 740px;
+}
+
+a {
+ color: #CA7900;
+ text-decoration: none;
+}
+
+a:hover {
+ color: #2491CF;
+}
+
+pre {
+ font-family: 'Consolas', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
+ font-size: 0.95em;
+ letter-spacing: 0.015em;
+ padding: 0.5em;
+ border: 1px solid #ccc;
+ background-color: #f8f8f8;
+}
+
+td.linenos pre {
+ padding: 0.5em 0;
+ border: 0;
+ background-color: transparent;
+ color: #aaa;
+}
+
+table.highlighttable {
+ margin-left: 0.5em;
+}
+
+table.highlighttable td {
+ padding: 0 0.5em 0 0.5em;
+}
+
+cite, code, tt {
+ font-family: 'Consolas', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
+ font-size: 0.95em;
+ letter-spacing: 0.01em;
+}
+
+hr {
+ border: 1px solid #abc;
+ margin: 2em;
+}
+
+tt {
+ background-color: #f2f2f2;
+ border-bottom: 1px solid #ddd;
+ color: #333;
+}
+
+tt.descname {
+ background-color: transparent;
+ font-weight: bold;
+ font-size: 1.2em;
+ border: 0;
+}
+
+tt.descclassname {
+ background-color: transparent;
+ border: 0;
+}
+
+tt.xref {
+ background-color: transparent;
+ font-weight: bold;
+ border: 0;
+}
+
+a tt {
+ background-color: transparent;
+ font-weight: bold;
+ border: 0;
+ color: #CA7900;
+}
+
+a tt:hover {
+ color: #2491CF;
+}
+
+dl {
+ margin-bottom: 15px;
+}
+
+dd p {
+ margin-top: 0px;
+}
+
+dd ul, dd table {
+ margin-bottom: 10px;
+}
+
+dd {
+ margin-top: 3px;
+ margin-bottom: 10px;
+ margin-left: 30px;
+}
+
+.refcount {
+ color: #060;
+}
+
+dt:target,
+.highlight {
+ background-color: #fbe54e;
+}
+
+dl.class, dl.function {
+ border-top: 2px solid #888;
+}
+
+dl.method, dl.attribute {
+ border-top: 1px solid #aaa;
+}
+
+dl.glossary dt {
+ font-weight: bold;
+ font-size: 1.1em;
+}
+
+pre {
+ line-height: 120%;
+}
+
+pre a {
+ color: inherit;
+ text-decoration: underline;
+}
+
+.first {
+ margin-top: 0 !important;
+}
+
+div.document {
+ background-color: white;
+ text-align: left;
+ background-image: url(contents.png);
+ background-repeat: repeat-x;
+}
+
+/*
+div.documentwrapper {
+ width: 100%;
+}
+*/
+
+div.clearer {
+ clear: both;
+}
+
+div.related h3 {
+ display: none;
+}
+
+div.related ul {
+ background-image: url(navigation.png);
+ height: 2em;
+ list-style: none;
+ border-top: 1px solid #ddd;
+ border-bottom: 1px solid #ddd;
+ margin: 0;
+ padding-left: 10px;
+}
+
+div.related ul li {
+ margin: 0;
+ padding: 0;
+ height: 2em;
+ float: left;
+}
+
+div.related ul li.right {
+ float: right;
+ margin-right: 5px;
+}
+
+div.related ul li a {
+ margin: 0;
+ padding: 0 5px 0 5px;
+ line-height: 1.75em;
+ color: #EE9816;
+}
+
+div.related ul li a:hover {
+ color: #3CA8E7;
+}
+
+div.body {
+ margin: 0;
+ padding: 0.5em 20px 20px 20px;
+}
+
+div.bodywrapper {
+ margin: 0 240px 0 0;
+ border-right: 1px solid #ccc;
+}
+
+div.body a {
+ text-decoration: underline;
+}
+
+div.sphinxsidebar {
+ margin: 0;
+ padding: 0.5em 15px 15px 0;
+ width: 210px;
+ float: right;
+ text-align: left;
+/* margin-left: -100%; */
+}
+
+div.sphinxsidebar h4, div.sphinxsidebar h3 {
+ margin: 1em 0 0.5em 0;
+ font-size: 0.9em;
+ padding: 0.1em 0 0.1em 0.5em;
+ color: white;
+ border: 1px solid #86989B;
+ background-color: #AFC1C4;
+}
+
+div.sphinxsidebar ul {
+ padding-left: 1.5em;
+ margin-top: 7px;
+ list-style: none;
+ padding: 0;
+ line-height: 130%;
+}
+
+div.sphinxsidebar ul ul {
+ list-style: square;
+ margin-left: 20px;
+}
+
+p {
+ margin: 0.8em 0 0.5em 0;
+}
+
+p.rubric {
+ font-weight: bold;
+}
+
+h1 {
+ margin: 0;
+ padding: 0.7em 0 0.3em 0;
+ font-size: 1.5em;
+ color: #11557C;
+}
+
+h2 {
+ margin: 1.3em 0 0.2em 0;
+ font-size: 1.35em;
+ padding: 0;
+}
+
+h3 {
+ margin: 1em 0 -0.3em 0;
+ font-size: 1.2em;
+}
+
+h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
+ color: black!important;
+}
+
+h1 a.anchor, h2 a.anchor, h3 a.anchor, h4 a.anchor, h5 a.anchor, h6 a.anchor {
+ display: none;
+ margin: 0 0 0 0.3em;
+ padding: 0 0.2em 0 0.2em;
+ color: #aaa!important;
+}
+
+h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor,
+h5:hover a.anchor, h6:hover a.anchor {
+ display: inline;
+}
+
+h1 a.anchor:hover, h2 a.anchor:hover, h3 a.anchor:hover, h4 a.anchor:hover,
+h5 a.anchor:hover, h6 a.anchor:hover {
+ color: #777;
+ background-color: #eee;
+}
+
+table {
+ border-collapse: collapse;
+ margin: 0 -0.5em 0 -0.5em;
+}
+
+table td, table th {
+ padding: 0.2em 0.5em 0.2em 0.5em;
+}
+
+div.footer {
+ background-color: #E3EFF1;
+ color: #86989B;
+ padding: 3px 8px 3px 0;
+ clear: both;
+ font-size: 0.8em;
+ text-align: right;
+}
+
+div.footer a {
+ color: #86989B;
+ text-decoration: underline;
+}
+
+div.pagination {
+ margin-top: 2em;
+ padding-top: 0.5em;
+ border-top: 1px solid black;
+ text-align: center;
+}
+
+div.sphinxsidebar ul.toc {
+ margin: 1em 0 1em 0;
+ padding: 0 0 0 0.5em;
+ list-style: none;
+}
+
+div.sphinxsidebar ul.toc li {
+ margin: 0.5em 0 0.5em 0;
+ font-size: 0.9em;
+ line-height: 130%;
+}
+
+div.sphinxsidebar ul.toc li p {
+ margin: 0;
+ padding: 0;
+}
+
+div.sphinxsidebar ul.toc ul {
+ margin: 0.2em 0 0.2em 0;
+ padding: 0 0 0 1.8em;
+}
+
+div.sphinxsidebar ul.toc ul li {
+ padding: 0;
+}
+
+div.admonition, div.warning {
+ font-size: 0.9em;
+ margin: 1em 0 0 0;
+ border: 1px solid #86989B;
+ background-color: #f7f7f7;
+}
+
+div.admonition p, div.warning p {
+ margin: 0.5em 1em 0.5em 1em;
+ padding: 0;
+}
+
+div.admonition pre, div.warning pre {
+ margin: 0.4em 1em 0.4em 1em;
+}
+
+div.admonition p.admonition-title,
+div.warning p.admonition-title {
+ margin: 0;
+ padding: 0.1em 0 0.1em 0.5em;
+ color: white;
+ border-bottom: 1px solid #86989B;
+ font-weight: bold;
+ background-color: #AFC1C4;
+}
+
+div.warning {
+ border: 1px solid #940000;
+}
+
+div.warning p.admonition-title {
+ background-color: #CF0000;
+ border-bottom-color: #940000;
+}
+
+div.admonition ul, div.admonition ol,
+div.warning ul, div.warning ol {
+ margin: 0.1em 0.5em 0.5em 3em;
+ padding: 0;
+}
+
+div.versioninfo {
+ margin: 1em 0 0 0;
+ border: 1px solid #ccc;
+ background-color: #DDEAF0;
+ padding: 8px;
+ line-height: 1.3em;
+ font-size: 0.9em;
+}
+
+
+a.headerlink {
+ color: #c60f0f!important;
+ font-size: 1em;
+ margin-left: 6px;
+ padding: 0 4px 0 4px;
+ text-decoration: none!important;
+ visibility: hidden;
+}
+
+h1:hover > a.headerlink,
+h2:hover > a.headerlink,
+h3:hover > a.headerlink,
+h4:hover > a.headerlink,
+h5:hover > a.headerlink,
+h6:hover > a.headerlink,
+dt:hover > a.headerlink {
+ visibility: visible;
+}
+
+a.headerlink:hover {
+ background-color: #ccc;
+ color: white!important;
+}
+
+table.indextable td {
+ text-align: left;
+ vertical-align: top;
+}
+
+table.indextable dl, table.indextable dd {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+
+table.indextable tr.pcap {
+ height: 10px;
+}
+
+table.indextable tr.cap {
+ margin-top: 10px;
+ background-color: #f2f2f2;
+}
+
+img.toggler {
+ margin-right: 3px;
+ margin-top: 3px;
+ cursor: pointer;
+}
+
+img.inheritance {
+ border: 0px
+}
+
+form.pfform {
+ margin: 10px 0 20px 0;
+}
+
+table.contentstable {
+ width: 90%;
+}
+
+table.contentstable p.biglink {
+ line-height: 150%;
+}
+
+a.biglink {
+ font-size: 1.3em;
+}
+
+span.linkdescr {
+ font-style: italic;
+ padding-top: 5px;
+ font-size: 90%;
+}
+
+ul.search {
+ margin: 10px 0 0 20px;
+ padding: 0;
+}
+
+ul.search li {
+ padding: 5px 0 5px 20px;
+ background-image: url(file.png);
+ background-repeat: no-repeat;
+ background-position: 0 7px;
+}
+
+ul.search li a {
+ font-weight: bold;
+}
+
+ul.search li div.context {
+ color: #888;
+ margin: 2px 0 0 30px;
+ text-align: left;
+}
+
+ul.keywordmatches li.goodmatch a {
+ font-weight: bold;
+}
Added: trunk/py4science/examples/sphinx_qs/_templates/layout.html
===================================================================
--- trunk/py4science/examples/sphinx_qs/_templates/layout.html	 (rev 0)
+++ trunk/py4science/examples/sphinx_qs/_templates/layout.html	2009年08月11日 10:30:33 UTC (rev 7451)
@@ -0,0 +1,23 @@
+{% extends "!layout.html" %}
+
+
+{% block rootrellink %}
+ <li><a href="{{ pathto('index') }}">home</a>|&nbsp;</li>
+ <li><a href="{{ pathto('search') }}">search</a>|&nbsp;</li>
+ <li><a href="{{ pathto('contents') }}">documentation </a> &raquo;</li>
+{% endblock %}
+
+
+{% block relbar1 %}
+
+<div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px">
+<a href="{{ pathto('index') }}"><img src="{{
+pathto("_static/logo.png", 1) }}" border="0" alt="py4sci"/></a>
+</div>
+{{ super() }}
+{% endblock %}
+
+{# put the sidebar before the body #}
+{% block sidebar1 %}{{ sidebar() }}{% endblock %}
+{% block sidebar2 %}{% endblock %}
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2009年08月11日 10:28:55
Revision: 7450
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7450&view=rev
Author: jdh2358
Date: 2009年08月11日 10:28:47 +0000 (2009年8月11日)
Log Message:
-----------
added customizing look and feel
Modified Paths:
--------------
 trunk/py4science/examples/sphinx_qs/getting_started.rst
 trunk/py4science/examples/sphinx_qs/index.rst
Added Paths:
-----------
 trunk/py4science/examples/sphinx_qs/custom_look.rst
Added: trunk/py4science/examples/sphinx_qs/custom_look.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/custom_look.rst	 (rev 0)
+++ trunk/py4science/examples/sphinx_qs/custom_look.rst	2009年08月11日 10:28:47 UTC (rev 7450)
@@ -0,0 +1,13 @@
+.. _custom_look:
+
+
+*********************
+Customizing the site
+*********************
+
+the `<http://sphinx.pocoo.org/>`_ site itself looks better than the
+sites created with the default css, so here we'll invoke Tufte's
+phrase "Intelligence imitates but genious steals and grab their css
+and part of their layout. As before, you can either get the required
+files :file:`_static/sphinx.css` and :file:`_templates:layout.html`
+from the website or svn (see :ref:`fetching-the-data`)
Modified: trunk/py4science/examples/sphinx_qs/getting_started.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/getting_started.rst	2009年08月11日 09:57:52 UTC (rev 7449)
+++ trunk/py4science/examples/sphinx_qs/getting_started.rst	2009年08月11日 10:28:47 UTC (rev 7450)
@@ -44,3 +44,63 @@
 
 .. image:: _static/basic_screenshot.png
 
+.. _fetching-the-data:
+
+Fetching the data
+-----------------
+
+Now we will start to customize out docs. Grab a couple of files from
+the `web site
+<http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/py4science/examples/sphinx_qs/>`_
+or svn. You will need :file:`getting_started.rst` and
+:file:`_static/basic_screenshot.png`. All of the files live in the
+"completed" version of this tutorial, but since this is a tutorial,
+we'll just grab them one at a time, so you can learn what needs to be
+changed where. Since we have more files to come, I'm going to grab
+the whole svn directory and just copy the files I need over for now.
+First, I'll cd to the directory containing my project, and get the
+"finished" product, and then copy in just the files I need::
+
+ home:~/tmp/py4sci> pwd
+ /Users/jdhunter/tmp/py4sci
+ home:~/tmp/py4sci> cd ..
+ home:~/tmp> svn co
+ https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/\
+ py4science/examples/sphinx_qs
+ A sphinx_qs/cheatsheet.rst
+ A sphinx_qs/_static
+ A sphinx_qs/_static/basic_screenshot.png
+ A sphinx_qs/conf.py
+ A sphinx_qs/Makefile
+ A sphinx_qs/_templates
+ A sphinx_qs/_build
+ A sphinx_qs/getting_started.rst
+ A sphinx_qs/index.rst
+ Checked out revision 7449.
+ home:~/tmp> cp sphinx_qs/getting_started.rst py4sci/
+ home:~/tmp> cp sphinx_qs/_static/basic_screenshot.png py4sci/_static/
+
+Now we are ready to rebuild the docs. We used the image directory to
+include to the screenshot above with::
+
+ .. image:: _static/basic_screenshot.png
+
+The last step is to modify :file:`index.rst` to include the
+getting_started file (be careful with the indentation, the
+"getting_started" should line up with the ':' in ``:maxdepth``::
+
+ Contents:
+
+ .. toctree::
+ :maxdepth: 2
+
+ getting_started.rst
+
+and then rebuild the docs with ``make html``. When you reload the
+page, you should see a link to the "Getting Started" docs, and in
+there this page with the screenshot. `Voila!`
+
+
+Next we'll customize the look and feel of our site to give it a logo,
+some custom css, and update the navigation panels to look more like
+the `<http://sphinx.pocoo.org/>`_ site itself -- see :ref:`custom_look`.
Modified: trunk/py4science/examples/sphinx_qs/index.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/index.rst	2009年08月11日 09:57:52 UTC (rev 7449)
+++ trunk/py4science/examples/sphinx_qs/index.rst	2009年08月11日 10:28:47 UTC (rev 7450)
@@ -1,5 +1,5 @@
 .. py4sci documentation master file, created by
- sphinx-quickstart on Tue Aug 11 04:33:46 2009.
+ sphinx-quickstart on Tue Aug 11 05:04:40 2009.
 You can adapt this file completely to your liking, but it should at least
 contain the root `toctree` directive.
 
@@ -12,6 +12,7 @@
 :maxdepth: 2
 
 getting_started.rst
+
 Indices and tables
 ==================
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2009年08月11日 09:57:58
Revision: 7449
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7449&view=rev
Author: jdh2358
Date: 2009年08月11日 09:57:52 +0000 (2009年8月11日)
Log Message:
-----------
working on a sphinx_qs tutorial
Added Paths:
-----------
 trunk/py4science/examples/sphinx_qs/
 trunk/py4science/examples/sphinx_qs/Makefile
 trunk/py4science/examples/sphinx_qs/_build/
 trunk/py4science/examples/sphinx_qs/_static/
 trunk/py4science/examples/sphinx_qs/_static/basic_screenshot.png
 trunk/py4science/examples/sphinx_qs/_templates/
 trunk/py4science/examples/sphinx_qs/cheatsheet.rst
 trunk/py4science/examples/sphinx_qs/conf.py
 trunk/py4science/examples/sphinx_qs/getting_started.rst
 trunk/py4science/examples/sphinx_qs/index.rst
Added: trunk/py4science/examples/sphinx_qs/Makefile
===================================================================
--- trunk/py4science/examples/sphinx_qs/Makefile	 (rev 0)
+++ trunk/py4science/examples/sphinx_qs/Makefile	2009年08月11日 09:57:52 UTC (rev 7449)
@@ -0,0 +1,88 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS =
+SPHINXBUILD = sphinx-build
+PAPER =
+
+# Internal variables.
+PAPEROPT_a4 = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS = -d _build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest
+
+help:
+	@echo "Please use \`make <target>' where <target> is one of"
+	@echo " html to make standalone HTML files"
+	@echo " dirhtml to make HTML files named index.html in directories"
+	@echo " pickle to make pickle files"
+	@echo " json to make JSON files"
+	@echo " htmlhelp to make HTML files and a HTML help project"
+	@echo " qthelp to make HTML files and a qthelp project"
+	@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+	@echo " changes to make an overview of all changed/added/deprecated items"
+	@echo " linkcheck to check all external links for integrity"
+	@echo " doctest to run all doctests embedded in the documentation (if enabled)"
+
+clean:
+	-rm -rf _build/*
+
+html:
+	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html
+	@echo
+	@echo "Build finished. The HTML pages are in _build/html."
+
+dirhtml:
+	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) _build/dirhtml
+	@echo
+	@echo "Build finished. The HTML pages are in _build/dirhtml."
+
+pickle:
+	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) _build/pickle
+	@echo
+	@echo "Build finished; now you can process the pickle files."
+
+json:
+	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) _build/json
+	@echo
+	@echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp
+	@echo
+	@echo "Build finished; now you can run HTML Help Workshop with the" \
+	 ".hhp project file in _build/htmlhelp."
+
+qthelp:
+	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) _build/qthelp
+	@echo
+	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
+	 ".qhcp project file in _build/qthelp, like this:"
+	@echo "# qcollectiongenerator _build/qthelp/py4sci.qhcp"
+	@echo "To view the help file:"
+	@echo "# assistant -collectionFile _build/qthelp/py4sci.qhc"
+
+latex:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex
+	@echo
+	@echo "Build finished; the LaTeX files are in _build/latex."
+	@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
+	 "run these through (pdf)latex."
+
+changes:
+	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) _build/changes
+	@echo
+	@echo "The overview file is in _build/changes."
+
+linkcheck:
+	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) _build/linkcheck
+	@echo
+	@echo "Link check complete; look for any errors in the above output " \
+	 "or in _build/linkcheck/output.txt."
+
+doctest:
+	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) _build/doctest
+	@echo "Testing of doctests in the sources finished, look at the " \
+	 "results in _build/doctest/output.txt."
Added: trunk/py4science/examples/sphinx_qs/_static/basic_screenshot.png
===================================================================
(Binary files differ)
Property changes on: trunk/py4science/examples/sphinx_qs/_static/basic_screenshot.png
___________________________________________________________________
Added: svn:mime-type
 + application/octet-stream
Added: trunk/py4science/examples/sphinx_qs/cheatsheet.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/cheatsheet.rst	 (rev 0)
+++ trunk/py4science/examples/sphinx_qs/cheatsheet.rst	2009年08月11日 09:57:52 UTC (rev 7449)
@@ -0,0 +1,38 @@
+.. _sphinx_helpers:
+
+
+******************
+Sphinx Cheat Sheet
+******************
+
+Cheat sheet on how to make this site and install these extensions and
+other goodies. You can see a literal version of this file below in
+:ref:`sphinx-literal`.
+
+.. _installing-docdir:
+Installing your doc directory
+=============================
+
+You may already have sphinx `sphinx <http://sphinx.pocoo.org/>`_
+installed -- you can check by doing::
+
+ python -c 'import sphinx'
+
+If that fails grab the latest version of and install it with::
+
+ > sudo easy_install sphinx
+
+Now you are ready to build a template for your docs, using
+sphinx-quickstart::
+
+ > sphinx-quickstart
+
+accepting most of the defaults. I choose "py4sci" as the name of my project
+
+We can test the installation by changing into the project directory,
+and typing `make html`::
+
+ cd py4sci
+ make html
+
+
Added: trunk/py4science/examples/sphinx_qs/conf.py
===================================================================
--- trunk/py4science/examples/sphinx_qs/conf.py	 (rev 0)
+++ trunk/py4science/examples/sphinx_qs/conf.py	2009年08月11日 09:57:52 UTC (rev 7449)
@@ -0,0 +1,194 @@
+# -*- coding: utf-8 -*-
+#
+# py4sci documentation build configuration file, created by
+# sphinx-quickstart on Tue Aug 11 04:33:46 2009.
+#
+# This file is execfile()d with the current directory set to its containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys, os
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#sys.path.append(os.path.abspath('.'))
+
+# -- General configuration -----------------------------------------------------
+
+# Add any Sphinx extension module names here, as strings. They can be extensions
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+extensions = ['sphinx.ext.autodoc']
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The encoding of source files.
+#source_encoding = 'utf-8'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'py4sci'
+copyright = u'2009, jdh'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = '0.1'
+# The full version, including alpha/beta/rc tags.
+release = '0.1'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of documents that shouldn't be included in the build.
+#unused_docs = []
+
+# List of directories, relative to source directory, that shouldn't be searched
+# for source files.
+exclude_trees = ['_build']
+
+# The reST default role (used for this markup: `text`) to use for all documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+
+# -- Options for HTML output ---------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages. Major themes that come with
+# Sphinx are currently 'default' and 'sphinxdoc'.
+html_theme = 'default'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further. For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# The name for this set of Sphinx documents. If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# A shorter title for the navigation bar. Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_use_modindex = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+#html_show_sourcelink = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it. The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = ''
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'py4scidoc'
+
+
+# -- Options for LaTeX output --------------------------------------------------
+
+# The paper size ('letter' or 'a4').
+#latex_paper_size = 'letter'
+
+# The font size ('10pt', '11pt' or '12pt').
+#latex_font_size = '10pt'
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title, author, documentclass [howto/manual]).
+latex_documents = [
+ ('index', 'py4sci.tex', u'py4sci Documentation',
+ u'jdh', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# Additional stuff for the LaTeX preamble.
+#latex_preamble = ''
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_use_modindex = True
Added: trunk/py4science/examples/sphinx_qs/getting_started.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/getting_started.rst	 (rev 0)
+++ trunk/py4science/examples/sphinx_qs/getting_started.rst	2009年08月11日 09:57:52 UTC (rev 7449)
@@ -0,0 +1,46 @@
+.. _sphinx_helpers:
+
+
+******************
+Sphinx Cheat Sheet
+******************
+
+Cheat sheet on how to make this site and install these extensions and
+other goodies. You can see a literal version of this file below in
+:ref:`sphinx-literal`.
+
+.. _installing-docdir:
+Installing your doc directory
+=============================
+
+You may already have sphinx `sphinx <http://sphinx.pocoo.org/>`_
+installed -- you can check by doing::
+
+ python -c 'import sphinx'
+
+If that fails grab the latest version of and install it with::
+
+ > sudo easy_install sphinx
+
+Now you are ready to build a template for your docs, using
+sphinx-quickstart::
+
+ > sphinx-quickstart
+
+accepting most of the defaults. I choose "py4sci" as the name of my
+project. cd into your new directory and check the contents::
+
+ home:~/tmp/py4sci> ls
+ Makefile	_static		conf.py
+ _build		_templates	index.rst
+
+The index.rst is the master ReST for your project, but before adding
+anything, let's see if we can build some html::
+
+ make html
+
+If you now point your browser to :file:`_build/html/index.html`, you
+should see a basic spinx site.
+
+.. image:: _static/basic_screenshot.png
+
Added: trunk/py4science/examples/sphinx_qs/index.rst
===================================================================
--- trunk/py4science/examples/sphinx_qs/index.rst	 (rev 0)
+++ trunk/py4science/examples/sphinx_qs/index.rst	2009年08月11日 09:57:52 UTC (rev 7449)
@@ -0,0 +1,21 @@
+.. py4sci documentation master file, created by
+ sphinx-quickstart on Tue Aug 11 04:33:46 2009.
+ You can adapt this file completely to your liking, but it should at least
+ contain the root `toctree` directive.
+
+Welcome to py4sci's documentation!
+==================================
+
+Contents:
+
+.. toctree::
+ :maxdepth: 2
+
+ getting_started.rst
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

Showing results of 28

1 2 > >> (Page 1 of 2)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /