I created a class within another file and I want to use it as an object in another file (I don't know if I'm using the right words, sorry. I haven't programmed in a few years).
The following code is the tube class that I've created:
class Tube:
def __init__(self, inner_diameter, length):
self.inner_diameter = inner_diameter
self.length = length
def getLength(self):
return self.len
def getInnerDiameter(self):
return self.inner_dia
Then I called the following in another file:
import tube
tube1 = tube(0.18, 1)
I am getting the following error:
TypeError: 'module' object is not callable
Am I doing something completely wrong? When I looked stuff up, I was getting something that I had to do a call function within my class to get it, but that didn't do anything. Sorry if this is a really obvious question, I am new to python and haven't coded in a quite a while and I only formally learned java.