Skip to content

Remove some escape chars

Valentin Valls requested to merge remove-some-escape-chars into master

Related to #4234 (closed)

This PR review the use of \r and ANSI char and try to deal in better way with it

  • Use helper from from bliss.shell.formatters.ansi instead of hardcoded chars
  • Use bliss.common.user_status_info when ever it is possible
  • Remove some \r which was not needed
  • It also fix and improve the redisplay of bliss.common.user_status_info which was broken
from bliss.common.user_status_info import status_message
import gevent
with status_message() as update:
    update("Pif")
    gevent.sleep(1)
    update("Paf")
    gevent.sleep(1)
    update("Pouf")
    gevent.sleep(1)
    update("Toc")
    gevent.sleep(1)
    update("He fall down")
    gevent.sleep(1)

The following will require more work, for another PR

  • bliss/controllers/diffractometers/diff_base.py <- we should use umove, with dedicated params if needed
  • bliss/controllers/speedgoat/speedgoat_utils.py <- we should use a dedicated textblock for that
Edited by Valentin Valls

Merge request reports