Revision: 6226
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6226&view=rev
Author:   jdh2358
Date:     2008-10-16 19:00:21 +0000 (Thu, 16 Oct 2008)

Log Message:
-----------
fixed gen_rst header

Modified Paths:
--------------
    trunk/matplotlib/doc/contents.rst
    trunk/matplotlib/doc/examples/gen_rst.py

Modified: trunk/matplotlib/doc/contents.rst
===================================================================
--- trunk/matplotlib/doc/contents.rst   2008-10-16 18:51:51 UTC (rev 6225)
+++ trunk/matplotlib/doc/contents.rst   2008-10-16 19:00:21 UTC (rev 6226)
@@ -21,6 +21,7 @@
    glossary/index.rst
 
 .. htmlonly::
+   examples/index.rst
 
   * :ref:`genindex`
   * :ref:`modindex`

Modified: trunk/matplotlib/doc/examples/gen_rst.py
===================================================================
--- trunk/matplotlib/doc/examples/gen_rst.py    2008-10-16 18:51:51 UTC (rev 
6225)
+++ trunk/matplotlib/doc/examples/gen_rst.py    2008-10-16 19:00:21 UTC (rev 
6226)
@@ -14,10 +14,10 @@
 datad = {}
 for root, subFolders, files in os.walk(rootdir):
     for fname in files:
-        if ( fname.startswith('.') or fname.startswith('#') or 
-             fname.find('.svn')>=0 or not fname.endswith('.py') ): 
+        if ( fname.startswith('.') or fname.startswith('#') or
+             fname.find('.svn')>=0 or not fname.endswith('.py') ):
             continue
-        
+
         fullpath = os.path.join(root,fname)
         contents = file(fullpath).read()
         # indent
@@ -28,13 +28,13 @@
 subdirs = datad.keys()
 subdirs.sort()
 
-fhindex = file('index.rst')
-fh.index.write("""\
+fhindex = file('index.rst', 'w')
+fhindex.write("""\
 .. _examples-index:
 
 ####################
 Matplotlib Examples
-###################
+####################
 
 .. htmlonly::
 
@@ -59,7 +59,7 @@
     fh.write('*'*len(title) + '\n')
     fh.write(title + '\n')
     fh.write('*'*len(title) + '\n\n')
-    
+
     for fname, contents in datad[subdir]:
         print '    ', fname
         basename, ext = os.path.splitext(fname)
@@ -73,6 +73,6 @@
         fh.write('\n\n')
     fh.close()
 
-     
 
+
 fhindex.close()


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-checkins mailing list
Matplotlib-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to