When I import a function it runs the code no problem, but if I import a class it doesn't work. It says ImportError: cannot import name 'Y' and I have tried it on sublime text, and command prompt. If I import a function it works.
from testing2 import x
x()
#testing2.py has:
def x():
print("It worked")
If I import a class it doesn't work.
from testing2 import Y
Y().x()
#testing2 has:
class Y:
def x(self):
print("It worked")