f.login() print "Current working directory:", f.pwd() f.quit() The welcome message will generally have no information that could be usefully parsed by your program, .