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

Pause Function in Cisco cli librairy

Jerems
Spotlight
Spotlight

Hi dear community,

Do you know if a "pause" function exists in the Python Cisco "cli" librairy ?

Is it something i can check by myself in the python interpreter ? How should i proceed ?

Jerems_0-1674751231953.png

I would like to insert a pause between each cli.configure or cli.execute calls.

Thanks in advance for your kind help.

Jerems

 

1 Accepted Solution

Accepted Solutions

You can import `time`

>>> import time
>>> time.sleep(3)
>>> dir(time)
['CLOCK_MONOTONIC', 'CLOCK_MONOTONIC_RAW', 'CLOCK_PROCESS_CPUTIME_ID', 'CLOCK_REALTIME', 'CLOCK_THREAD_CPUTIME_ID', '_STRUCT_TM_ITEMS', '__doc__', '__loader__', '__name__', '__package__', '__spec__', 'altzone', 'asctime', 'clock', 'clock_getres', 'clock_gettime', 'clock_settime', 'ctime', 'daylight', 'get_clock_info', 'gmtime', 'localtime', 'mktime', 'monotonic', 'perf_counter', 'process_time', 'sleep', 'strftime', 'strptime', 'struct_time', 'time', 'timezone', 'tzname', 'tzset']
Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

View solution in original post

2 Replies 2

You can import `time`

>>> import time
>>> time.sleep(3)
>>> dir(time)
['CLOCK_MONOTONIC', 'CLOCK_MONOTONIC_RAW', 'CLOCK_PROCESS_CPUTIME_ID', 'CLOCK_REALTIME', 'CLOCK_THREAD_CPUTIME_ID', '_STRUCT_TM_ITEMS', '__doc__', '__loader__', '__name__', '__package__', '__spec__', 'altzone', 'asctime', 'clock', 'clock_getres', 'clock_gettime', 'clock_settime', 'ctime', 'daylight', 'get_clock_info', 'gmtime', 'localtime', 'mktime', 'monotonic', 'perf_counter', 'process_time', 'sleep', 'strftime', 'strptime', 'struct_time', 'time', 'timezone', 'tzname', 'tzset']
Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

Jerems
Spotlight
Spotlight

Thanks @bigevilbeard and congrats for Cycode !