List the classes that can be referenced by ObjCClass

I wanted to find out what classes for Objective-C and swift can be used with ObjCClass, such as SceneKit.

print_classlist.py



# Python3.6
# List the names of all loaded Objective-C classes.

import objc_util

count = objc_util.objc_getClassList(None, 0)
print( '%d classes found:' % count )

classes = (objc_util.c_void_p * count)()
count = objc_util.objc_getClassList(classes, count)

class_names = []
for cls in classes:
	class_names.append(objc_util.class_getName(cls))

class_names.sort()

for b_name in class_names:
	name = b_name.decode('utf-8')
	#if not 'SCN' in name:
	#	continue
	print(name)

print('finished.')

When you execute it, more than 30,000 class names will be printed, so I think it's a good idea to narrow it down appropriately.

Reference site

Recommended Posts

List the classes that can be referenced by ObjCClass
Hide the warning that zsh can be used by default on Mac
List packages that can be updated with pip
Read the image posted by flask so that it can be handled by opencv
Color list that can be set with tkinter (memorial)
Goroutine (parallel control) that can be used in the field
Implement a thread that can be paused by exploiting yield
I investigated the pretreatment that can be done with PyCaret
The mystery of the number that can be seen just by arranging 1s-The number of repunits and mysterious properties-
Investigation of DC power supplies that can be controlled by Python
A timer (ticker) that can be used in the field (can be used anywhere)
Confirmation that rkhunter can be installed
Python standard module that can be used on the command line
Sort the list that contains the dict
About the matter that the re.compiled object can be used for the re.match pattern
[Python] A program that finds a pair that can be divided by a specified value
I made a simple timer that can be started from the terminal
The story that it turns blue when the data read by Pillow is converted so that it can be handled by OpenCV
[Python] The movement of the decorator that can be understood this time ② The decorator that receives the argument
Tensorflow, it seems that even the eigenvalues of the matrix can be automatically differentiated
The story that performance could be improved just by changing the dtype of numpy
How to install a Python library that can be used by pharmaceutical companies
File types that can be used with Go
Functions that can be used in for statements
Building Sphinx that can be written in Markdown
Methods can be defined outside the class definition
Search by the value of the instance in the list
List the AMIs used by AWS Data Pipeline
The problem that the ifconfig command cannot be used
How to filter foreign keys that can be selected on the Django admin screen
How to create a property of relations that can be prefetch_related by specific conditions