How to get a full names of cateories in file?

How to extract all names of categories in a file by python.
I need to get a list of names of categories in the file for working with it in the future.

There are lot of ways to get them:


And if you look at this :


YES!!! It works. Thank you very much.
Only thing I changed was deleting a “cut” from OUT.

Now I wish to separate system categories from user categories, used categories from unused categories, and so on

Dear Johannes how to get parameters by Category ID.

The search function is a friend, friend! You’ll want to read some posts on list filtering and GetParameterValueByName.

here are some of the methods and classes for Categories.
To Find the categories of the objects in the active project, I would suggest simply using the combination of select model Elements and element.Getcategory