r/learnpython • u/Screaming_Candle • Aug 30 '26
What is the secret sauce for importing a class from another file in the same directory?
I'm not even throwing out code that doesn't work here because I've been dredging from sample and trying every conceivable (evidently not) permutation of the items.
All I am trying to do is to import a class from one file into another. What's the secret here? I keep getting variations on "ImportError: cannot import name 'theFormView' from 'formView'"
This is so fundamental that I'm having trouble getting a single clear answer. Can someone please help me to clear this up?
Thanks.