Python and [IDL] codes to deal with photometry of galaxies