Blanquier added the comment:
Hi,
I send you the file as attached document.
I use the test_sftp_upload() as entry point.
Le 30/09/2015 16:43, R. David Murray a écrit :
> R. David Murray added the comment:
>
> As Eric said, we really can't diagnose this unless you show is your python
> code (as code, not as a partial screenshot).
>
> --
>
> ___
> Python tracker
> <http://bugs.python.org/issue25278>
> ___
>
--
Added file: http://bugs.python.org/file40630/gui_ftp.py
___
Python tracker
<http://bugs.python.org/issue25278>
___# -*- coding: iso-8859-1 -*-
# ---
__file__ = "gui_ftp.py"
__doc__= "FTP functions for ul/downloading one or several server in parallele
with multiple connections."
__author__ = "Philippe Blanquier"
__version__ = "v0.1"
__date__ = "24/06/2011"
__copyright__ = "Alcatel-Lucent"
__contact__ = "philippe.blanqu...@alcatel-lucent.com"
# ---
# Python include
import os,sys,ftplib,glob,time,threading,socket,copy
# Private include
import gui_common,gui_scenario_manager,gui_user
### ###
### Private data ###
### ###
_ftps_certificate_file_name =
"C:"+os.sep+"Nemo_Pyc"+os.sep+"sftp_certificate.crt" #: FTPS certificate for
labo servers
_ftp_error_tag = "FTP"
_ftp_block_size = 64*gui_common.kilo_unit #: Maximum chunk size to read/write
on the low-level socket object created to do the actual transfer
_ftp_repeat_nb = 10 #: Maximal command repeatition number before saying 'KO'...
_ftp_repeat_waiting_delay = 30.0 #: Delay between 2 repetition when a failure
is detected
_upload_cmd = "Upload"
_download_cmd = "Download"
_file_size_tag = "File size"
_ftp_posix_separator = '/' #: Normalized FTP directory separator ( UNIX POSIX !)
_ftp_dir_size = -1 #: Dummy FTP directory size
_ftp_create_dir_mutex = gui_common.nice_mutex( this_name = "FTP_Dir_Mutex") #:
Internal directory creation protection
# see: http://en.wikipedia.org/wiki/List_of_FTP_server_return_codes
#
# FTP server return codes always have three digits, and each digit has a
special meaning.
#
# The first digit denotes whether the response is good, bad or incomplete:
# 1xx Positive Preliminary reply
# 2xx Positive Completion reply
# 3xx Positive Intermediate reply
# 4xx Transient Negative Completion reply
# 5xx Permanent Negative Completion reply
# 6xx Protected reply
# The second digit is a grouping digit and encodes the following information:
# x0x Syntax
# x1x Information
# x2x Connections
# x3x Authentication and accounting
# x4x Unspecified as of RFC 959.
# x5x File system
### The requested action is being taken. Expect a reply before proceeding with
a new command.
# 100 Series: The requested action is being initiated, expect another reply
before proceeding with a new command.
# 110 Restart marker replay . In this case, the text is exact and not left to
the particular implementation;
# it must read: MARK = where is User-process data stream
marker, and server's equivalent marker (note the spaces between markers
and "=").
# 120 Service ready in nnn minutes.
# 125 Data connection already open; transfer starting.
# 150 File status okay; about to open data connection.
### The requested action has been successfully completed.
# 200 Command okay.
# 202 Command not implemented, superfluous at this site.
# 211 System status, or system help reply.
# 212 Directory status.
# 213 File status.
# 214 Help message.On how to use the server or the meaning of a particular
non-standard command. This reply is useful only to the human user.
# 215 NAME system type. Where NAME is an official system name from the
registry kept by IANA.
# 220 Service ready for new user.
# 221 Service closing control connection.
# 225 Data connection open; no transfer in progress.
# 226 Closing data connection. Requested file action successful (for example,
file transfer or file abort).
# 227 Entering Passive Mode (h1,h2,h3,h4,p1,p2).
# 228 Entering Long Passive Mode (long address, port).
# 229 Entering Extended Passive Mode (|||port|).
# 230 User logged in, proceed. Logged out if appropriate.
# 231 User logged out; service terminated.
# 232 Logout command noted, will complete when transfer done.
# 250 Requested file action okay, completed.
# 257 "PATHNAME" created.
### The command has been accepted, but