[L5]How i can define Days as User defined and I will give through command Line

680 views
Skip to first unread message

malli...@gmail.com

unread,
Nov 16, 2017, 1:16:36 AM11/16/17
to Python Challenge
Iam Increasing date and time by two days and Minutes i am defining

def ChangingDateAndTime(UserName,RemoteMachineIp):

     #Add 1 day  
some = "ssh -T %s@%s"%(UserName,RemoteMachineIp)
print datetime.now() + timedelta(days=2,minutes=5)
os.system(some)
if __name__ == '__main__':
UserName = str(sys.argv[1])
RemoteMachineIp = str(sys.argv[2])

ChangingDateAndTime(UserName,RemoteMachineIp)


(days=2,minutes=5) i have to define as Userdefined

(days=%s,minutes=%s) --- it is not working
Reply all
Reply to author
Forward
0 new messages