title: Python Multiple file program
body: <p>For larger programs, in order to be more organized, I have been looking into dividing my code up into different <code>.py</code> files and having the main file that calls upon those files when needed. I have looked around and seen lots of remarks about creating a directory and a <code>SystemPath</code> for Python. Are those reasonable options for a program that could be distributed between a few computers? As a test, I tried to assemble an example:</p>
  
  <p>This is the class named <code>grades</code> in the same directory as <code>main</code></p>
  
  <pre class="lang-py prettyprint-override"><code>class student:
      def __init__(self):
          self.name = ""
          self.score = 0
          self.grade = 0
  
      def update(self,name,score,grade):
          self.score = score
          self.name = name
          self.grade = grade
          print self.score,self.name,self.grade
  
  s = student()
  s.update(name,score,grade) 
  </code></pre>
  
  <p>This is my main script currently:</p>
  
  <pre class="lang-py prettyprint-override"><code>from grades import score
  import random
  
  name = 'carl'
  score = random.randrange(0,100)
  grade = 11
  
  s = student()
  s.score(name,score,grade)
  </code></pre>
  
  <p>There are some questions I have generally about this method:</p>
  
  <ol>
  <li>Is there a way to import all from different files or do I need to specify each individual class?                                                                        </li>
  <li>If I just had a function, is it possible to import it just as a function or can you only import via a class?</li>
  <li>Why is it when I call upon a class, in general, I have to make a variable for it as in the example below?</li>
  </ol>
  
  <pre class="lang-py prettyprint-override"><code># way that works
  s = student()
  s.update(name,score,grade)
  
  # incorrect way
  student.update(name,score,grade)
  </code></pre>
  
  <p>Thank you for your time and thought towards my question.</p>