Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Import class dynamically
#4
You can use eg inspect.getmodule(obj), or inspect.getsourcefile(obj) to differentiate between classes defined here and imported classes.
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,586 Apr-06-2022, 02:09 PM
Last Post: be_ams
  dynamically define class's michavardy 1 2,180 Feb-26-2019, 04:20 PM
Last Post: buran
  Help creating a class instance dynamically Kotevski 9 5,576 Aug-17-2018, 05:23 AM
Last Post: Gribouillis
  import just one class from a file sylas 4 3,404 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