Bottom Page

Thread Rating:
  • 3 Vote(s) - 2.33 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 How to call a method in a module using code
Hello everyone

I've question concerning calling methods just using code.

The general idea is that I can give a name of a module and a method in that module so the code will recognize it and run it.

Is there a way of doing such a thing?
You like this post
Is it this what you ask for? Check all 3 parts of the tutorial.
You like this post
First of all, thanks for the response

Yes this solves my question but only partly. I know how to import modules by name and calling methods by doing so but the only problem is that I'm passing through the module name using an argument.

Is there a way to import the module by using a parameter as the module name?
Thanks a lot! This solved my problem :D

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  How to call COM-method using comtypes jespersahner 0 25 5 hours ago
Last Post: jespersahner
  Polymorphism not working with a call to a abstract method colt 3 98 Nov-04-2019, 11:04 PM
Last Post: colt
  How to Call a method of class having no argument dataplumber 7 320 Oct-31-2019, 01:52 PM
Last Post: dataplumber
  Call method from another method within a class anteboy65 3 144 Sep-11-2019, 08:40 PM
Last Post: Larz60+
  What is the use of call method and when to use it? everyday1 1 207 Jul-14-2019, 01:02 PM
Last Post: ichabod801
  I'm trying to figure out whether this is a method or function call 357mag 2 329 Jul-04-2019, 01:43 AM
Last Post: ichabod801
  How to inspect the code of __exit__ method used with 'with' statement? sonicblind 3 884 Oct-18-2017, 01:51 PM
Last Post: sonicblind
  call method in class using threads? masterofamn 0 978 Jan-24-2017, 09:09 PM
Last Post: masterofamn

Forum Jump:

Users browsing this thread: 1 Guest(s)