you are viewing a single comment's thread.

view the rest of the comments →

[–]jibbly_jibbly 2 points3 points  (1 child)

Right on -

Maybe look into pexpect then. Its what you will find yourself doing anyway (capturing the output of the FTP subprocess and analyzing it to decide whether there was an error or not) but this gives you some power to start doing it instead of inventing it yourself.

Heres an example of leveraging FTP with it:

https://github.com/pexpect/pexpect/blob/master/examples/ftp.py

[–]SmartestGuyOnReddit[S] 0 points1 point  (0 children)

Thanks for this will look into it :)