There are a couple of ways to approach this.
You can handle the many files within the script itself, using the "glob" module. This is a bit more complex, however, so I'd recommend using simple bash looping.
To do this, first we need to modify the code slightly, so that we can pass the name of the NC file on the command line:
import sys
scf=restoreSelfConsistenCalculation(sys.argv[2])
Then, we execute the script as
for i in *.nc ; do atk exportED.py $i > electronDensity$i.dat ; done
You need to add paths etc. This has the slight disadvantage that the files will be called "electronDensity1.nc.dat". If you can live with that, all ok. If you prefer the filename "electronDensity1.dat", we just need to change it a bit:
for i in *.nc ; do j=`echo $i | sed 's/.nc//g'` ; atk exportED.py $i > $j.dat ; done