~diresu/blender/blender-command-port

« back to all changes in this revision

Viewing changes to source/gameengine/PyDoc/bge_api_validate_py.txt

  • Committer: Dietrich Bollmann
  • Date: 2009-04-26 06:25:14 UTC
  • mfrom: (184.1.520)
  • Revision ID: diresu@web.de-20090426062514-ly27wepl1t5d7p8s
Update to state of blender repository from 2009-04-26 revision 19927.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
13
13
# Currently it only prints missing modules and methods (not attributes)
14
14
 
 
15
import sys, os
15
16
 
16
17
BGE_API_DOC_PATH = 'source/gameengine/PyDoc'
17
18
 
 
19
 
 
20
mods = ['GameLogic', 'Rasterizer', 'GameKeys']
 
21
mods_dict = {}
 
22
for m in mods:
 
23
        mods_dict[m] = sys.modules[m]
 
24
 
 
25
 
18
26
import GameTypes
19
27
type_members = {}
20
28
 
34
42
                # print type_object.__name__ + '.' + k
35
43
                members.append(member)
36
44
 
37
 
import sys, os
 
45
 
38
46
 
39
47
doc_dir= os.path.join(os.getcwd(), BGE_API_DOC_PATH)
40
48
 
58
66
                        
59
67
                '''
60
68
                
61
 
                if l.startswith('@ivar'):
 
69
                if l.startswith('@ivar') or l.startswith('@var'):
62
70
                        var = l.split()[1].split(':')[0]
63
71
                        
64
72
                        if var == member:
108
116
                        else:
109
117
                                print "\tmissing: %s.%s" % (type_name, member)
110
118
 
 
119
 
 
120
# Now check the modules
 
121
for mod_name, pymod in mods_dict.iteritems():
 
122
        print pymod
 
123
        del sys.modules[mod_name]
 
124
                
 
125
        # Now well get the python version
 
126
        pydoc = __import__(mod_name)
 
127
        pydoc = reload(pydoc) # avoid using the out dated pyc file only
 
128
        print pydoc.__file__
 
129
        
 
130
        for member in sorted(dir(pymod)):
 
131
                if hasattr(pydoc, member) or check_attribute(mod_name, member):
 
132
                        if PRINT_OK:
 
133
                                print "\tfound module attr: %s.%s" % (mod_name, member)
 
134
                else:
 
135
                        print "\tmissing module attr: %s.%s" % (mod_name, member)
 
136
        
 
137
        # Restore real module
 
138
        sys.modules[mod_name] = pymod
 
139
 
 
140
 
 
141
sys.path.pop() # remove the pydoc dir from our import paths
 
142
 
 
143
 
 
144
 
 
145