• As long as you add the line

    # -*- coding: utf-8 -*-

    at the top of the file, you can use Unicode characters inside Unicode string literals. Without the encoding line Python throws a SyntaxError, because UTF-8 multibyte characters are not ASCII.

    If you're working in the interactive console, things are a little different. Input characters are always encoded as UTF-8, even inside Unicode literals. For example, the literal u"ä" incorrectly becomes u"\xc3\xa4". The correct value would be u"\xe4". This means that to use Unicode characters in the console, you need to either use escapes or manually decode the UTF-8 bytes: "ä".decode() correctly becomes u"\xe4".

  • Take a look at stash. The stash terminal class probably does a lot of what you want, assuming you don't need colors -- it has a scrolling buffer and an input field that moves when the keyboard frame appears, along with history, and some autocompletion framework. Some formatting has been implemented in the ssh module, I believe, using the pyte terminal emulator library.

    You can either subclass the appropriate classes, or you can actually write .py scripts that make use of the stash modules (i.e. called from within stash), for instance a script called from stash that uses raw_input will use stash's stdin replacement. You also have access to the global _stash for more complicated things like directly accessing the buffer.

    If you do need color, then you'd probably be best using a WebView for display, along with a TextView or TextField for input.

  • Sorry, indentation off... I am still new.

    # this file called x.py import ui if __name__ == '__main__': # this will work given you have a # file named x.pyui in the same dir v = ui.load_view() v.present() # but you can easily load another view by specifying the file. The .pyui not required. v = ui.load_view(another_view.pyui) v.present()
Internal error.

Oops! Looks like something went wrong!