Reputation: 2298
I am using tkinter. When I want to learn more about the methods I go into their library.
i.e. from tkinter import filedialog
One of the methods I am looking at is this:
def askdirectory (**options):
"Ask for a directory, and return the file name"
return Directory(**options).show()
I know the the **options
parameter means it accepts an arbitrary number of arguments and/or keyword arguments.
I don't understand how to find the parameters for options
for that method. I tried looking in deeper into the method classes but I get lost to where to look.
I want to be able to find what the parameters can be by reading the library code so I can apply that to reading and understanding other python libraries quicker.
Upvotes: 1
Views: 2064
Reputation: 386265
You aren't going to have a lot of luck getting the options from the code itself. Tkinter is a wrapper around a tcl/tk interpreter, and a lot of the options are simply passed through tkinter to the underlying tcl interpreter.
The definitive source of documentation for the available options can be found in the tcl/tk man pages: http://tcl.tk/man/tcl8.5/TkCmd/contents.htm
Upvotes: 3