First you need to perform scf calculation by using G-centered k-point and then nscf calculation. Then you can create xcrysden input file by using https://github.com/MTD-group/Fermi-Surface script and plot it by Xcrysden program.
Then go to file menu and here you will see an option to open bxsf file format. Open it and you need to select the number of energy band (that cross the fermi level). It will then show you Fermi surface.
Like vasp, you need to run scf calculation and then nscf calculation. Then run fs.x to generate Fermi surface data in xcrysden format. In pp example folder, there is an example how you can draw Fermi surface. Please the the qe example directory.
I donot find the qe example directory download link. You can send email to [email protected] and I will send you a personal link to download it. Please
note that I am unavailable for three days, so I can send you after 25 Feb 2019.
I am afriad you are using python 2 program but the python script is for python 3. If you want to use python 2, you need to add this sentence "from __future__ import division" to your python script, as "division" is different for python 2 and python 3. Now your python script looks like this:
## -- codes begin -- ##
from __future__ import division # for Python 2;
import os.path
from numpy import *
data=loadtxt("input.dat", unpack='true')
nx=int(data[0,0])
ny=int(data[1,0])
nz=int(data[2,0])
nkpt=(nx+1)*(ny+1)*(nz+1)
fp2 = open("KPOINTS","w")
fp2.write("Explicit k-points list for Fermi surface")