I am using iPython in command prompt, Windows 7.
I thought this would be easy to find, I searched and found directions on how to use the inspect package but it seems like the inspect package is meant to be used for functions that are created by the programmer rather than functions that are part of a package.
My main goal to to be able to use the help files from within command prompt of iPython, to be able to look up a function such as csv.reader() and figure out all the possible arguments for it AND all possible values for these arguements.
In R programming this would simply be args(csv.reader())
I have tried googling this but they all point me to the inspect package, perhaps I'm misunderstanding it's use?
For example,
If I wanted to see a list of all possible arguments and the corresponding possible values for these arguments for the csv.reader() function (from the import csv package), how would I go about doing that?
I've tried doing help(csv.reader) but this doesn't provide me a list of all possible arguments and their potential values. 'Dialect' shows up but it doesn't tell me the possible values of the dialect argument of the csv.reader function.
I can easily go to the site: https://docs.python.org/3/library/csv.html#csv-fmt-params and see that the dialect options are: delimiter, doublequote, escapechar, etc.. etc..but is there a way to see this in Python console?
I've also tried dir(csv.reader) but this isn't what I was looking for either.
Going bald trying to figure this out....
helpprints and formats the docstrings which are only as helpful as they've been written to be. There is no general solution to show "all possible arguments" and "all possible values for said arguments" in Python because that's not even enumerable in many cases (e.g., variadic functions).help(csv.Dialect)would give you the details you are looking for, unfortunately as pointed out the help is only as good as the docstrings and the docstring forcsv.readerdoesn't clearly point you tocsv.Dialect. You can then look at the specific dialects, e.g.help(csv.excel). Introspection on the arguments doesn't inform you of what the valid values would be so I can't see how this would help.