| Server IP : 172.67.131.151 / Your IP : 104.23.243.177 Web Server : Apache System : Linux keen-cori.18-142-40-148.plesk.page 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 06:59:36 UTC 2025 x86_64 User : simottodesign.com_2tntp341vs7 ( 10011) PHP Version : 8.3.31 Disable Function : opcache_get_status MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/doc/python3-colorama/examples/ |
Upload File : |
from __future__ import print_function
import fixpath
import colorama
# Demonstrate cursor relative movement: UP, DOWN, FORWARD, and BACK in colorama.CURSOR
up = colorama.Cursor.UP
down = colorama.Cursor.DOWN
forward = colorama.Cursor.FORWARD
back = colorama.Cursor.BACK
def main():
"""
expected output:
1a2
aba
3a4
"""
colorama.init()
print("aaa")
print("aaa")
print("aaa")
print(forward() + up(2) + "b" + up() + back(2) + "1" + forward() + "2" + back(3) + down(2) + "3" + forward() + "4")
if __name__ == '__main__':
main()