~ubuntu-branches/ubuntu/trusty/autokey/trusty

« back to all changes in this revision

Viewing changes to extractDoc.py

  • Committer: Package Import Robot
  • Author(s): Luke Faraone
  • Date: 2012-03-11 00:00:17 UTC
  • mfrom: (1.4.3)
  • Revision ID: package-import@ubuntu.com-20120311000017-pt2qfmc29m5asxj0
Tags: 0.82.2-1
* New upstream version.
* Merge in packaging updates from upstream. (Closes: #634823)
* Update copyright information

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
if __name__ == "__main__":
25
25
    
26
 
    outFile = open("src/lib/ui/data/api.txt", "w")
 
26
    outFile = open("src/lib/qtui/data/api.txt", "w")
27
27
    
28
28
    for name, attrib in inspect.getmembers(scripting):
29
29
        
30
 
        if inspect.isclass(attrib) and not name.startswith("_"):
 
30
        if inspect.isclass(attrib) and not (name.startswith("_") or name.startswith("Gtk")):
31
31
            for name, attrib in inspect.getmembers(attrib):
32
32
                if inspect.ismethod(attrib) and not name.startswith("_"):
33
33
                    doc = attrib.__doc__
34
34
                    lines = doc.split('\n')
35
 
                    apiLine = lines[3].strip()
36
 
                    docLine = lines[1].strip()
 
35
                    try:
 
36
                        apiLine = lines[3].strip()
 
37
                        docLine = lines[1].strip()
 
38
                    except:
 
39
                        continue
 
40
                    
37
41
                    outFile.write(apiLine[9:-1] + " " + docLine +  '\n')
38
42
            
39
43
    outFile.close()
 
 
b'\\ No newline at end of file'