cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
706
Views
2
Helpful
2
Replies

how to get complete string ncs_pycli root.kicker__kickers.data_kicker.keys()

kiran kotari
Cisco Employee
Cisco Employee

In ncs_pycli to get the I use the following code which returns half of the key is there any better way to do

     $ ncs_pycli package_name

In [1]: root.kicker__kickers.data_kicker.keys()

Out[1]:

[Key values = [<_ncs.Value type=C_BUF(5) value='test_action_k'...>],

Key values = [<_ncs.Value type=C_BUF(5) value='ncs-internal-si'...>]]

Here the full name is test_action_kicker.

and is there any better way to print object values like pprint(object) in python.

2 Accepted Solutions

Accepted Solutions

smadappa
Level 1
Level 1

Hi Kiran,

You can use a for loop.

n [5]: for i in root.kicker__kickers.data_kicker.keys():

   ...:     print ( i )

Regards,

Shameer

View solution in original post

Hi Shameer,

I found a better way to get the complete string.

In [10]: list(root.kicker__kickers.data_kicker)

Thanks & Regards,

Kiran Kumar

View solution in original post

2 Replies 2

smadappa
Level 1
Level 1

Hi Kiran,

You can use a for loop.

n [5]: for i in root.kicker__kickers.data_kicker.keys():

   ...:     print ( i )

Regards,

Shameer

Hi Shameer,

I found a better way to get the complete string.

In [10]: list(root.kicker__kickers.data_kicker)

Thanks & Regards,

Kiran Kumar