title: Python, main method not running (multiple classes in same file)
body: <p><strong>Context:</strong>
  I developed a python script to be run on a remote linux server. Running using Python 3.6.1. The script worked but was very messy, and procedurally written as opposed to OO. So, I re-wrote this script into 2 different classes. One main class and a blueprint class for objects.</p>
  <p>My script is a lot more complicated, i just simplified it for this question.</p>
  <p><strong>Desired Function:</strong>
  Read values from CSV file. Create Objects from these values, 1 object per line. Do some calculations on the values on init'ing the object (in the objects class). Have these objects be accessible from the main class (Base class).</p>
  <p><strong>Problems:</strong>
  I need some clarification on:</p>
  <ol>
  <li>The main method is not running. Tried variants on the method call, like Base.main(), including the &quot;if name&quot; statement inside the Base class, and it complains about self not being defined</li>
  <li>The &quot;self&quot; reference. Are my usages of this correct? For example: Adding the attribute &quot;age&quot; into the Person objects so you can access it with person.age for example. My method call &quot;self.input_file_handling(Base.inputFilePath)&quot; etc.</li>
  </ol>
  <h1>Script:</h1>
  <pre><code>import csv
  
  class Person:
      def calculate_age(self):
          self.age = 2017 - self.birthYear
  
      def __init__(self, name, birthYear):
          self.name = self.strip_characters(self, name)
          self.birthYear = int(birthYear)
          self.calculate_age()
  
  class Base:
  
      inputFilePath = &quot;input.csv&quot;
      people  = []
      def main():
          self.input_file_handling(Base.inputFilePath)
          #More methods here
  
      @staticmethod
      def input_file_handling(input_file_path):
  
          input_file_path = str(input_file_path)
  
          with open(input_file_path, 'r') as csv_file:
              csv_reader = csv.DictReader(csv_file)
  
              for line in csv_reader:
                      name = line['Name']
                      age = line['age']
                      person = Person(name, age)
                      people.append(person)
      
  if __name__ == '__main__':
      main()
  </code></pre>