A custom class definitions generator

Hello all! I have been doing a lot of programming with panda3d recently, and it was bugging me how my IDE didn’t recognize anything inside of the panda3d.core module, and I was having to do everything from memory. So, I made a small (and I mean small) program that loads a module and iterates through every single function, variable, and subclass in it, then writes it to a file. It is pretty easy to use, but seeing as I just made this 2-3 days ago it is very much still in development. if you find any bugs PLEASE tell me:)

PythonClassGenerator.zip (2.5 KB)

to use it in a program, add your regular imports, then add some lines that import the custom classes but never run.

base panda3d import:

after generating the files and fake importing them:

also its possible that this is something that can be done other ways and Im just stupid, so feel free to tell me anything I did wrong!

I think it pretty easy to make this on NP++ with User Defined language,
i made one for Renpy colors tho, underlining and other stuff

But of course all of us use VsCode

Cool! Have you also checked out the types-panda3d project?

https://pypi.org/project/types-panda3d/

nope :sweat_smile:
I’m the kind of person who has an idea and decides to create it from scratch without checking if anyone did it first:)
But honestly, I have used this more for personal projects than with my Panda3d code, seeing as I already remember most of the Panda3d classes I commonly use.