title: python3: getting module source code using user input (inspect .getsource)
body: <p>what I want to do... <br>
  I have a module called <strong>'my_library.py'</strong> which contains some functions or methods. <br>
  I have another module called <strong>'test_library.py'</strong> and from test_library I want to print source code of some specific functions which is inside "my_library" module <br>
  I know we can do it using.... <br>
          <code>print(inspect.getsource(my_library.add))</code> <br>
  or <br>
           <code>print(open(my_library.__file__).read())</code> <br>
  here, i want to take the function or module name from the user as an input <br>
  example : <br></p>
  
  <pre><code>    **my_library.py**
      def add(x,y):
          return x+y
  
      def substract(x,y):
          return x-y
  
      **test_library.py**
      import inspect
      import my_library
      name = "my_library.substract"
      print(inspect.getsource(name))
  </code></pre>
  
  <p><br>
  <code>TypeError: module, class, method, function, traceback, frame, or code object was expected, got str</code>
  <br>
  I have tried to convert that string input into object, file, class ...nothing seems to work <br>
  is there any way to take the input from a user and show that specific function or module?
  <br>
  any suggestions or advice to solve the problem?</p>
  
  <p>thanks in advance</p>