def get_copy_folder_location():
 copy_settings_path = 'Library/Application Support/Copy Agent/config.db'
 copy_home = None
 copy_settings = os.path.join(os.environ['HOME'], copy_settings_path)
 if os.path.isfile(copy_settings):
  database = sqlite3.connect(copy_settings)
  if database:
   cur = database.cursor()
   query = "SELECT value FROM config2 WHERE option = 'csmRootPath';"
   cur.execute(query)
   data = cur.fetchone()
   copy_home = unicode(data[0])
   cur.close()
 if (not copy_home):
  error('Unable to find your Copy install =(')
 return copy_home

def get_copy_folder_location ( ) : copy_settings_path = 'Library/Application Support/Copy Agent/config.db' copy_home = None copy_settings = os . path . join ( os . environ [ 'HOME' ] , copy_settings_path ) if os . path . isfile ( copy_settings ) : database = sqlite3 . connect ( copy_settings ) if database : cur = database . cursor ( ) query = "SELECT value FROM config2 WHERE option = 'csmRootPath';" cur . execute ( query ) data = cur . fetchone ( ) copy_home = unicode ( data [ 0 ] ) cur . close ( ) if ( not copy_home ) : error ( 'Unable to find your Copy install =(' ) return copy_home
try to locate the copy folder .