0
I was told that the function print('\a')
of this code produces a beep, but at the time when I run into pycharm there is no beep.
I would like to know what this function is for. And if you could send me a kind of list of print functions, example print('\n')
.
#!/usr/bin/python
from datetime import datetime, timedelta
from sys import stdout
from time import sleep
print ('Cronometro regressivo | programador => mmxm')
segundos = int(input('Digite a quantidade de segundos: '))
tempo = timedelta(seconds=segundos)
print ('\n')
while (str(tempo) != '0:00:00'):
stdout.write("\r%s"%tempo)
stdout.flush()
tempo = tempo - timedelta(seconds=1)
sleep(1)
stdout.write("\r0:00:00")
stdout.flush()
print ('\a')
Tried to run the code directly on the terminal?
– Woss
I put this function on the terminal as you suggested, but there occurred the beep, only a blue dot appeared on the screen.
– Pelicano37R