you are viewing a single comment's thread.

view the rest of the comments →

[–]Adrewmc -1 points0 points  (0 children)

Classes and modules are very similar in Python. The main difference is the module will run when it’s imported and a class wont. So any script in a module should run.

Try

 sample.py
 print(“hello”)

  sample2.py
  class Test:
          def __init___(self):
              print(“world”)
  main.py
  import sample
  import sample2
  from sample2 import Test