मैं एक लंबा ऑपरेशन करने की कोशिश कर रहा हूं लेकिन टाइमआउट तर्क के साथ pexpect टाइमआउट अपवाद निकाल दिए जाने से पहले समय की लंबाई को बदलने में प्रतीत नहीं होता है। यहाँ मेरी कोड है:pexpect टाइमआउट का उपयोग नहीं किया जा रहा है, केवल 30 का डिफ़ॉल्ट उपयोग किया जा रहा है
child = pexpect.spawn('scp file [email protected]:/temp', timeout=300)
whichMatched = child.expect(['(?i)Password','Are you sure you want to continue connecting (yes/no)?'], timeout=300)
अपवाद पता चलता है कि समय समाप्ति = 30 है, जो डिफ़ॉल्ट है।
after: <class 'pexpect.TIMEOUT'>
match: None
match_index: None
exitstatus: None
flag_eof: False
pid: 6222
child_fd: 4
closed: False
timeout: 30
delimiter: <class 'pexpect.EOF'>
logfile: None
logfile_read: None
logfile_send: None
maxread: 2000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1