NAUTILUS_SCRIPT_SELECTED_FILE_PATHS file number limit?



hello,

i wrote a nautilus script, converting a bunch of (selected) raw images.
the script below is working,
but do nothing when more than 1456 files selected.
it seems that 'NAUTILUS_SCRIPT_SELECTED_FILE_PATHS' can handle less than 1457 files.
what can i do?

Gellert

---------------------------------
import os,glob,sys,shlex,time
import subprocess


ufrawopt = '--overwrite --gamma=0.45 --saturation=1.0 --exposure=0.0 --black-point=0 \ --interpolation=ahd --compression=95 --wb=camera --curve=linear --linearity=0.04 \
--clip=film --restore=lch --out-type=jpeg'


files = os.environ.get('NAUTILUS_SCRIPT_SELECTED_FILE_PATHS',default=None).splitlines()
files = list(filter(os.path.isfile,files))

proceed = subprocess.call('zenity --question --text "ufraw-batch process images : \n%s"\
 --ok-label="process images" --cancel-label="discard"' % (ufrawopt)\
,shell=True)
if proceed == 0:
ZENITY = subprocess.Popen('zenity --progress --percentage=0 --auto-kill', \
stdin=subprocess.PIPE,shell=True) #--pulsate --auto-kill
    fn = float(len(files))
    for i,f in enumerate(files):
        perc = float(100.*(i/fn))
        ZENITY.stdin.write(('#%s\n'%f).encode('utf8'))
        ZENITY.stdin.write(('%s\n'%perc).encode('utf8'))
        ZENITY.stdin.flush()
        arg = 'ufraw-batch %s %s' % (ufrawopt,f)
        argshl = shlex.split(arg)
UFRAW = subprocess.Popen(argshl)#,stderr=subprocess.PIPE)#,shell=True)
        UFRAW.communicate()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]