[PyQt] QFtp putting multiple files
Hans-Peter Jansen
hpj at urpla.net
Mon Jan 20 09:53:05 GMT 2014
Dear Tony,
On Sonntag, 19. Januar 2014 11:16:07 Tony Arnold wrote:
> I'm trying to write some code that uses QFtp and transfers a number
> files to the ftp site.
>
> My code kicks off the put command and then execs a progress dialogue
> box. I have a signal/socket that updates the progress dialogue box. I
> also have a socket that executes when the put command has finished and
> this hides the dialogue box.
>
> The exec of the progress box returns under one of two conditions. Either
> progress has 100% or the put command complete socket hides it.
>
> The problem is that there is a race condition between these two. If
> progress hits 100% before the signal for the put command termination
> signal, then the next file gets processed, the progress box gets
> displayed again, but then the put terminal signal gets in and hides the box.
Have you tried to separate the two conditions? I wouldn't count on progress to
exit this part. Your next paragraph seems to underline this. Progress might be
affected by block sizes and rounding, hence always wait for the put command
complete signal.
Let us know about the outcome.
> It seems also, that the progress dialogue doesn't always hit 100%, so
> without hiding it in the put command terminated socket, the whole thing
> can sometimes hang up.
[...]
Pete
More information about the PyQt
mailing list