Python pexpect issue with cron -


we trying output remote system using below python pexpect script.

import pexpect  child = pexpect.spawn("ssh admin@*******") child.expect(".*assword:") child.send("*********\r") child.expect("[#$] ") child.sendline("ab service-show abc.bc.com") child.expect("[#$] \r") print child.before 

output of command when getting executed manually command line below

# /usr/bin/python /tmp/test_pexepect.py comservice-show abc.bc.  abc.bc.com (/usr/local/ab/pkg/abc//servicepkg.json)    app: abc.bc.com/gh       latest status       ready [ 2017-04-06t11:54:24.092z ] 

but when same command executed cron below output

<2a ~]vice-show abc.bc.co 

why output getting truncated when executing cron?

  • aravind


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -