0

I need get input from user in center of terminal, I know how to print string at center with function center(width[,filler]) but i couldn't find anything how to centrize input (or anywhere else) ?

persian_dev
  • 73
  • 1
  • 10
  • 1
    How are you centering your output? With ncurses or something? – chrisaycock May 14 '15 at 23:30
  • just use str.center(Twidth) that Termial width can find by function in follow link:http://stackoverflow.com/questions/566746/how-to-get-console-window-width-in-python – persian_dev May 14 '15 at 23:32
  • You could try [`blessings`](https://pypi.python.org/pypi/blessings/) + `colorama`. Here's [code example that shows a red dot randomly walking in the terminal](http://stackoverflow.com/a/22121542/4279). Or try `raw_input(message.rjust(terminal_width // 2))`. – jfs May 15 '15 at 06:27

0 Answers0