It can be weird but I am looking for a way to get automatically all variables and method within a python script.
For example,
a = 1 b = 2 c = 3 myLis
You can use dir() built-in for this. Suppose you save your file as test.py. You can do as follows:
>>> import test >>> dir(test) ['__builtins__', '__doc__', '__file__', '__name__', '__package__', 'a', 'b', 'c', 'f', 'myList', 'someMethod'] >>>