Python Forum
Error when refering to class defined in 'main' in an imported module
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error when refering to class defined in 'main' in an imported module
#2
Yes create it in one module and import it from that module into anywhere you want to use it.
Reply


Messages In This Thread
RE: Error when refering to class defined in 'main' in an imported module - by Yoriz - Apr-13-2021, 07:00 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Variable is not defined error when trying to use my custom function code fnafgamer239 4 630 Nov-23-2023, 02:53 PM
Last Post: rob101
  How to read module/class from list of strings? popular_dog 1 502 Oct-04-2023, 03:08 PM
Last Post: deanhystad
  can not import anaconda pandas module. PySpark pandas module is imported!! aupres 0 741 Aug-06-2023, 01:09 AM
Last Post: aupres
  "Name is not defined" when running a class lil_e 6 4,152 Jan-12-2023, 11:57 PM
Last Post: lil_e
  My code displays too much output when importing class from a module lil_e 4 1,193 Oct-22-2022, 12:56 AM
Last Post: Larz60+
  Python-for-Android:p4a: syntax error in main.py while compiling apk jttolleson 2 1,915 Sep-17-2022, 04:09 AM
Last Post: jttolleson
  No module found when I run a main.py tomtom 2 1,505 Jul-20-2022, 09:24 AM
Last Post: tomtom
  Can a module tell where it is being imported from? stevendaprano 3 1,214 Apr-12-2022, 12:46 AM
Last Post: stevendaprano
  [variable] is not defined error arises despite variable being defined TheTypicalDoge 4 2,184 Apr-05-2022, 04:55 AM
Last Post: deanhystad
  Error 'Contour' not Defined DaveG 3 2,395 Mar-13-2022, 03:29 AM
Last Post: deanhystad

Forum Jump:

User Panel Messages

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