pygame / makeref.py

Diff from to

makeref.py

 
 def Run():
     # get files and shuffle ordering
-    files = glob.glob('src/*.doc') + glob.glob('lib/*.doc')
-    files.remove("src/pygame.doc")
+    files = glob.glob(os.path.join('src','*.doc')) + glob.glob(os.path.join('lib','*.doc'))
+    for file in files:
+        print file
+    files.remove(os.path.join("src","pygame.doc"))
+
 
     #XXX: sort(key=) is only available in >= python2.4
     #files.sort(key=sortkey)
     files = sort_list_by_keyfunc(files, sortkey)
 
-    files.insert(0, "src/pygame.doc")
+    files.insert(0, os.path.join("src","pygame.doc"))
     docs = []
     pages = []
     for f in files:
         MakeIndex(name, doc, index)
     
     for name, doc in docs:
-        fullname = "docs/ref/%s.html" % name
+        fullname = os.path.join("docs","ref","%s.html") % name
         outFile = open(fullname, "w")
         outFile.write(HTMLHeader % name)
         WritePageLinks(outFile, pages)
         outFile.write(HTMLFinish)
         outFile.close()
  
-    outFile = open("src/pygamedocs.h", "w")
+    outFile = open(os.path.join("src", "pygamedocs.h"), "w")
     outFile.write("/* Auto generated file: with makeref.py .  Docs go in src/ *.doc . */\n")
     for doc in justDocs:
         WriteDocHeader(outFile, doc)
 
     topDoc = LayoutDocs(justDocs)
 
-    outFile = open("docs/ref/index.html", "w")
+    outFile = open(os.path.join("docs","ref","index.html"), "w")
     outFile.write(HTMLHeader % "Index")
     WritePageLinks(outFile, pages)
     outFile.write(HTMLMid)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.