mirror of https://github.com/davisking/dlib.git
The recent change to use a dlib/__init__.py file instead of the dlib.so file directly messed it up.pull/2150/head
parent
59b44849bd
commit
f55a1a51a0
@ -1,32 +1,36 @@
|
|||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
import dlib
|
import _dlib_pybind11
|
||||||
import inspect
|
import inspect
|
||||||
|
|
||||||
def print_element(name, fc, ff):
|
def print_element(name, fc, ff, fconstants):
|
||||||
isclass = inspect.isclass(eval(name))
|
isclass = inspect.isclass(eval(name))
|
||||||
ismodule = inspect.ismodule(eval(name))
|
ismodule = inspect.ismodule(eval(name))
|
||||||
|
isroutine = inspect.isroutine(eval(name))
|
||||||
if (isclass):
|
if (isclass):
|
||||||
print("* :class:`{0}`".format(name), file=fc)
|
print("* :class:`{0}`".format(name), file=fc)
|
||||||
elif (not ismodule):
|
elif (isroutine):
|
||||||
print("* :func:`{0}`".format(name), file=ff)
|
print("* :func:`{0}`".format(name), file=ff)
|
||||||
|
elif (not ismodule):
|
||||||
|
print("* :const:`{0}`".format(name), file=fconstants)
|
||||||
|
|
||||||
def make_listing_files():
|
def make_listing_files():
|
||||||
|
|
||||||
fc = open('classes.txt', 'w')
|
fc = open('classes.txt', 'w')
|
||||||
ff = open('functions.txt', 'w')
|
ff = open('functions.txt', 'w')
|
||||||
|
fconstants = open('constants.txt', 'w')
|
||||||
|
|
||||||
for obj in dir(dlib):
|
for obj in dir(_dlib_pybind11):
|
||||||
if obj[0] == '_':
|
if obj[0] == '_':
|
||||||
continue
|
continue
|
||||||
print_element('dlib.'+obj, fc, ff)
|
print_element('_dlib_pybind11.'+obj, fc, ff, fconstants)
|
||||||
|
|
||||||
for obj in dir(dlib.cuda):
|
for obj in dir(_dlib_pybind11.cuda):
|
||||||
if obj[0] == '_':
|
if obj[0] == '_':
|
||||||
continue
|
continue
|
||||||
print_element('dlib.cuda.'+obj, fc, ff)
|
print_element('_dlib_pybind11.cuda.'+obj, fc, ff, fconstants)
|
||||||
|
|
||||||
for obj in dir(dlib.image_dataset_metadata):
|
for obj in dir(_dlib_pybind11.image_dataset_metadata):
|
||||||
if obj[0] == '_':
|
if obj[0] == '_':
|
||||||
continue
|
continue
|
||||||
print_element('dlib.image_dataset_metadata.'+obj, fc, ff)
|
print_element('_dlib_pybind11.image_dataset_metadata.'+obj, fc, ff, fconstants)
|
||||||
|
|
||||||
|
Loading…
Reference in new issue