账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    用pexpect执行脚本输出都正确,但没有执行结果
    29
    0

    import pexpect
    child = pexpect.spawn('mysqldump -u root -p ELA highest > /home/teddy/test.sql')
    index = child.expect("Enter password:")

    print(index)
    if (index != 0):

    print ("ftp login failed")
    child.close(force=True)

    else:

    print(child.after)
    child.sendline('!Wf}6e4d)~=-5}k')#这是我mysql密码
    

    输出:
    0
    b'Enter password:'

    输出看着都对,但就是没有导出的sql文件。
    请问该怎么办

    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部