Arquivos alinhados incorretamente após transferência via FTP

Arquivos alinhados incorretamente após transferência via FTP

Eu tenho uma caixa Ubuntu 16.04 (servidor externo) e há vários arquivos python. Sempre que tentei enviar esses arquivos por FTP para minhas máquinas locais e abrir os arquivos python, o código não estava alinhado corretamente.

Acredito que durante a transferência o alinhamento seja corrompido.

Como posso corrigir esse problema? Estou no Mac e uso cyberduckpara transferir esses arquivos.

Se você notar que a instrução try está desalinhada depois de enviar o código por FTP. Este é apenas um instantâneo. Muitas linhas não estão alinhadas corretamente:

    for pano in test_images:
    import time
    #time.sleep(30)
    print "Reading ",pano
    t_start = dt.datetime.now()
        try:
            orig_img = cv2.imread(pano)[:,:,:3]
            '''
            round_y = orig_img.shape[0]%J["h_stride"]
            r_y = J["h_stride"]-round_y if round_y > J["h_stride"]/2 else -round_y
            round_x = orig_img.shape[1]%J["w_stride"]
            r_x = J["w_stride"]-round_x if round_x > J["w_stride"]/2 else -round_x
            orig_img = imresize(orig_img, ( orig_img.shape[0]+round_y, orig_img.shape[0]+round_x) )
            '''
        except:
            continue

Arquivo remoto:

for pano in test_images:
            import time
            #time.sleep(30)
            print "Reading ",pano
            t_start = dt.datetime.now()
            try:
                orig_img = cv2.imread(pano)[:,:,:3]
                '''
                round_y = orig_img.shape[0]%J["h_stride"]
                r_y = J["h_stride"]-round_y if round_y > J["h_stride"]/2 else -round_y
                round_x = orig_img.shape[1]%J["w_stride"]
                r_x = J["w_stride"]-round_x if round_x > J["w_stride"]/2 else -round_x
                orig_img = imresize(orig_img, ( orig_img.shape[0]+round_y, orig_img.shape[0]+round_x) )
                '''
            except:
                continue

informação relacionada