def get_input(self):
"""
Get user input in the bottom bar.
Returns: The user-inputted string.
"""
if not self.curses:
return input('Enter some input: ')
self.addstr(self.inbar, '> ')
crs.curs_set(2) # Show the cursor.
try:
string = self.inbar.getstr()
except KeyboardInterrupt:
common.np.close()
self.goodbye('Goodbye, thanks for using Google Py Music!')
self.inbar.deleteln()
crs.curs_set(0) # Hide the cursor.
return string.decode('utf-8')
评论列表
文章目录