[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Newbie question about Python syntax

On 22/08/2019 23:21, Kyle Stanley wrote:
> The tutorial that Terry was referring to was the one on docs.python.org,
> here's a couple of links for the sections he was referring to:
> Full section on classes: https://docs.python.org/3/tutorial/classes.html
> Section on instantiating objects from classes:
> https://docs.python.org/3/tutorial/classes.html#class-objects
Aha, thank you all.
Here then, is my first problem.

I am using Python to interrogate the value of some thing in Blender 
(just as someone else might want to use Python to look at an email in a 
Mail program or an image in Photoshop).

So, I want to look at the attribute of an instance of a class called 
CompositorNodeMapValue. The code in the Python tutorial seems to be for 
creating an instance of a class, but I assume Blender (in my case) has 
already created the instance that I want to interrogate.

If this is so, should I find the code to get a list of the instances 
that have been made (maybe using inspect?) and then, when I have its 
name, the attributes of the one that interests me?

Or shall I go into the garden to eat worms?