Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Import class dynamically
#2
(Jan-30-2018, 06:42 AM)voltron Wrote: But problem is that I need to know class name.
If there is only one class, only one object will match inspect.isclass(obj) so you don't need to know the class name. Is it your code?
Reply


Messages In This Thread
Import class dynamically - by voltron - Jan-30-2018, 06:42 AM
RE: Import class dynamically - by Gribouillis - Jan-30-2018, 07:04 AM
RE: Import class dynamically - by voltron - Jan-30-2018, 08:44 AM
RE: Import class dynamically - by Gribouillis - Jan-30-2018, 09:05 AM
RE: Import class dynamically - by voltron - Feb-05-2018, 01:24 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Dynamically setting nested class be_ams 0 1,547 Apr-06-2022, 02:09 PM
Last Post: be_ams
  dynamically define class's michavardy 1 2,131 Feb-26-2019, 04:20 PM
Last Post: buran
  Help creating a class instance dynamically Kotevski 9 5,506 Aug-17-2018, 05:23 AM
Last Post: Gribouillis
  import just one class from a file sylas 4 3,357 Apr-25-2018, 08:56 PM
Last Post: sylas

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020