how to remove duplicates dict from the list of dictionary based on one of the elements is duplicate in list of dict

2019-11-16 Thread Iranna Mathapati
Hi, How to remove duplicates dict from the list of dictionary based on one of the duplicate elements in the dictionary, l = [{"component":"software", "version":"1.2" }, {"component":"hardware", "version":"2.2",}, {"component":"driver", "version":"3.2",}, {"component":"firmware",

Re: Is it able to connect remote win system from Linux using python

2019-08-20 Thread Iranna Mathapati
: > Iranna Mathapati wrote: > > Hi Team, > > > > can you please let me know , is there any module to connect the remote > > Windows system from Linux using python module? > > > We need more information, what sort of 'connect' to a remote Windows > system

Re: How to login remote windos device using python

2019-08-20 Thread Iranna Mathapati
Thanks Kyle Its working fine On Tue, Aug 20, 2019 at 2:45 PM Iranna Mathapati wrote: > Hi Kyle, > > I have tried with as per above attached links and it leads following error: > NOTE: Its able to connect local > > Failed to connect remote windows > >>>

Is it able to connect remote win system from Linux using python

2019-08-20 Thread Iranna Mathapati
Hi Team, can you please let me know , is there any module to connect the remote Windows system from Linux using python module? Thanks, Iranna M -- https://mail.python.org/mailman/listinfo/python-list

Re: How to login remote windos device using python

2019-08-20 Thread Iranna Mathapati
lso, another example (unofficial): > https://stackoverflow.com/questions/18961213/how-to-connect-to-a-remote-windows-machine-to-execute-commands-using-python. > This was done in Python2, but the example is still useful. > > On Mon, Aug 19, 2019 at 2:11 PM Iranna Mathapati >

How to login remote windos device using python

2019-08-19 Thread Iranna Mathapati
Hi Team, can you please let me know, How to login the remote Windows machine using python?? Thanks -- https://mail.python.org/mailman/listinfo/python-list

Re: how to replace line on particular line in file[no need to write it back whole file again]

2018-10-11 Thread Iranna Mathapati
Thanks Dennis Lee and Thomas On Thu, Oct 11, 2018 at 6:32 PM Dennis Lee Bieber wrote: > On Thu, 11 Oct 2018 15:14:49 +0530, Iranna Mathapati > declaimed the following: > > >Hi Team, > > > >How to replace particular line text with new text on a file > >i have

how to replace line on particular line in file[no need to write it back whole file again]

2018-10-11 Thread Iranna Mathapati
Hi Team, How to replace particular line text with new text on a file i have below code but its writing whole code. def replace_line(file_name, line_num, text): lines = open(file_name, 'r').readlines() lines[line_num] = text out = open(file_name, 'w') out.writelines(lines) <

failed to execute scapy commands from remote server

2018-08-09 Thread Iranna Mathapati
Hi Team, I have to ssh a remote server and execute scapy commands there. but its able to execute all linux commands from remote server handle I use pexpect and hitting issue. 1. SSH to remote shell via pexpect from current server parser_ip_add='192.168.1.83' child_remote = pexpec

Re: Regex Doubts

2018-03-30 Thread Iranna Mathapati
Thanks a lot Antoon. On Fri, Mar 30, 2018 at 2:51 PM, Antoon Pardon wrote: > On 30-03-18 08:16, Iranna Mathapati wrote: > > Hi Team, > > > > > > how to achieve fallowing expected output? > > > > str_output= """ > > > > MOD1 m

Re: Regex Doubts

2018-03-30 Thread Iranna Mathapati
t:: [('0', '0'), ('21', '491')] [('21' ,'491')] <<<<< how to achieve this output using *"findall with single line code"*? NOTE "MEMR" values are 0 or more then 0 valid/free values Thanks, Iranna

Regex Doubts

2018-03-29 Thread Iranna Mathapati
Hi Team, how to achieve fallowing expected output? str_output= """ MOD1 memory : 2 valid1790 free MOD2 memory : 128 valid 128 free UDP Aware *MEMR*: 0 valid 0 free *MEMR

sendline buffer

2018-01-05 Thread Iranna Mathapati
Hi Team, I have faced fallowing issue:: dev.sendline("*show version*") <<< its printing "show version output" dev.sendline("*show module*") <<< its printing "shoe module output" *Runing again* dev.sendline("show veriosn") <<< its runing 2nd time again dev.before *output is no

how to replace maltipal char from string and substitute new char

2017-10-12 Thread Iranna Mathapati
Hi Team, How to replace multipal char from string and substitute with new char with one line code Ex: str = "9.0(3)X7(2) " ===> 9.0.3.X7.2 need to replace occurrence of '(',')' with dot(.) chars output: 9.0.3.X7.2 Thanks, -- https://mail.python.org/mailman/listinfo/python-list

how to grep

2017-08-04 Thread Iranna Mathapati
Hi Team, How to grep values from below out put string. pattern should include "Fabric Module". grepping Fabric module values only str = ''' 22 0Fabric Module J8N-C9508-FM ok 24 0Fabric ModuleJ8N-C9508-FM ok 26 0

Re: how to share/access variables from multiprocessing target function

2017-05-03 Thread Iranna Mathapati
Can you please elaborate in my case(means above code)i tried with manager still hitting issue. Thanks, On Wed, May 3, 2017 at 8:14 PM, eryk sun wrote: > On Wed, May 3, 2017 at 2:04 PM, Iranna Mathapati > wrote: > > how to share/access the " global returndict_st_FP

how to share/access variables from multiprocessing target function

2017-05-03 Thread Iranna Mathapati
*Hi team,* *How to access the multiprocessing target function variables across the main program. * *def sending_static_traffic(FT_item_st,RT_item_st,pkt_st)*: log.info('Starting Static NAT forward Traffic Test...') global returndict_st_FP,returndict_st_RP <

Re: Thread getting stuck\hang

2017-04-29 Thread Iranna Mathapati
Apr 2017 14:42:33 +0530, Iranna Mathapati > declaimed the following: > > >Hi Dennis, > > > >Two threads(_st and _dy targets) sharing the same user define function at > >the same time...This is the reason for hang/stuck? > > > >in both the thr

Re: Thread getting stuck\hang

2017-04-28 Thread Iranna Mathapati
function. script was hang after completion of the program only . On Fri, Apr 28, 2017 at 2:42 PM, Iranna Mathapati wrote: > Hi Dennis, > > Two threads(_st and _dy targets) sharing the same user define function at > the same time...This is the reason for hang/stuck? > > in b

Re: Thread getting stuck\hang

2017-04-28 Thread Iranna Mathapati
function. On Fri, Apr 28, 2017 at 5:06 AM, Dennis Lee Bieber wrote: > On Thu, 27 Apr 2017 22:16:06 +0530, Iranna Mathapati > declaimed the following: > > >Hi Dennis, > > > >all function arguments declare as global and pass it to the function. > > > >All

Re: Thread getting stuck\hang

2017-04-28 Thread Iranna Mathapati
Thanks Dennis, On Fri, Apr 28, 2017 at 5:06 AM, Dennis Lee Bieber wrote: > On Thu, 27 Apr 2017 22:16:06 +0530, Iranna Mathapati > declaimed the following: > > >Hi Dennis, > > > >all function arguments declare as global and pass it to the function. > > >

Re: Thread getting stuck\hang

2017-04-27 Thread Iranna Mathapati
_list = [] else: log.error('{0} return path itgen verification failed'.format(nat_type)) flag2 = 0 return flag2 return flag2,count_dy_Rx,count_dy_in_Rx,count_dy_out_Rx,count_dy_Tx,count_dy_in_Tx,count_dy_out_Tx *def* *delete_new_dynamic_nat_conf():

Thread getting stuck\hang

2017-04-27 Thread Iranna Mathapati
Hi Team, I have python code that creates thread.Sometimes it works, sometimes it gets stuck once its finish its execution part. still not yet cannot find any difference between when it works or when it gets stuck. Please help. sniffer1 = threading.Thread(target=validate_traffic_stats_dy,args=(F

Re: Thread within for loop

2017-04-01 Thread Iranna Mathapati
Hi , How to fix it and now i got below error for same script *runtimeerror threads can only be started once then* *Thanks,* On Sat, Apr 1, 2017 at 1:15 PM, dieter wrote: > Iranna Mathapati writes: > > ... > > Exception in thread Thread-5: > > Traceback (

Thread within for loop

2017-04-01 Thread Iranna Mathapati
Hi team, I tried to run fallowing run, *jobs = []* *sniffer1 = threading.Thread(target=validate_traffic_stats_dy,args= (FT_item_dy,RT_item_dy,forward_path_list_dy,return_path_list_dy,nat_type_list_dy,pkt_dy_1,))* *jobs.append(sniffer1)* *sniffer2 = threading.Thr

Find and append file path

2017-01-12 Thread Iranna Mathapati
Hi Team, How to append file path and find the latest folder according to the latest date: CLI input :"/root/user/branches/xyz" i want to find latest file within CLI input path and append to given CLI path Example: CLI Input: /root/user/branches/xyz find latest file and append to CLI path: "/ro

Pexpect

2017-01-06 Thread Iranna Mathapati
Hi Team, How to match latter(caps and small) ,numbers and # symbol in python pexpect. Thanks, Iranna M -- https://mail.python.org/mailman/listinfo/python-list

Pexpect

2017-01-06 Thread Iranna Mathapati
Hi Team, How to match latter(caps and small) ,numbers and # symbol in python pexpect. Thanks, Iranna M -- https://mail.python.org/mailman/listinfo/python-list

Pexpect

2016-12-10 Thread Iranna Mathapati
Hi Team, The fallowing script(function) is working if its in PDB mode(trace line by line) but same script is not working if its remove/comment PDB and run one shot. log.info("Time out expection") uut_con1 = pexpect.spawn('telnet %s'%power_ip) uut_con1.logfile = sys.s