Some helpers without having a specific module
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ringbuffer.py 452B

1234567891011121314
  1. import sys
  2. sys.path.append('../..')
  3. import helpers
  4. rb = helpers.ringbuffer(length=5)
  5. print(rb, '\n--------------------------------------------------------------')
  6. rb.append(0)
  7. print(rb, '\n--------------------------------------------------------------')
  8. rb.extend((1,2,3,4,5,6))
  9. print(rb, '\n--------------------------------------------------------------')
  10. rb.append(17)
  11. print(rb, '\n--------------------------------------------------------------')