old_contents: 
  class config(object):
      cache_dir = '/mnt/sda6/prog/flashget/cache'
      flash_dir = '/mnt/sda6/prog/flashget/flash'
      # TODO: os.access(path, os.W_OK)
  
new_contents: import os
  
  class config(object):
      cache_dir = '/mnt/sda6/prog/flashget/cache'
      flash_dir = '/mnt/sda6/prog/flashget/flash'
  
  
  
  
  
      if not os.access(cache_dir, os.W_OK):
          print "your cache-dir isn't writeable please edit config.py"
      if not os.access(flash_dir, os.W_OK):
          print "your flash-dir isn't writeable please edit config.py"
  
subject: check if cache/flash-dir is writable at configload