title: Python doesn't see files in modules
body: <p>So I split my code into different files that are in the project directory
  <a href="https://i.stack.imgur.com/Kh1kH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Kh1kH.png" alt="files in directory"></a></p>
  
  <p>But when I import those modules into main.py it complains that it can't see files in them</p>
  
  <pre><code>import pygame
  import winsound
  import random
  import math
  #import wGeneration
  import rGeneration
  from Camera import camera
  from KeyHandle import KeyHandle
  </code></pre>
  
  <p>On importing Keyhandle it gives out this error</p>
  
  <p><a href="https://i.stack.imgur.com/QCefF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QCefF.png" alt="keyhandle"></a></p>
  
  <p>This is what is in the KeyHandle module though</p>
  
  <pre><code>import main
  import pygame
  
  def KeyHandle():
      for event in pygame.event.get():
          if event.type == pygame.KEYDOWN:
              if event.key == pygame.K_ESCAPE:
                  pygame.quit()
                  quit()
              if event.key == pygame.K_UP:
                  main.dire.append(3)
              if event.key == pygame.K_DOWN:
                  main.dire.append(2)
  
          if event.type == pygame.KEYUP:
              if event.key == pygame.KEYUP:
                  main.dire.remove(3)
              if event.key == pygame.K_DOWN:
                  main.dire.remove(2)
  </code></pre>
  
  <p>Can anyone tell me what am I doing wrong?</p>