Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; 'python,': 0.02; 'lines,': 0.07; 'url:msdn': 0.07; 'cursor': 0.09; 'escape': 0.09; 'host,': 0.09; 'subject:characters': 0.09; 'api': 0.11; 'python': 0.11; 'random': 0.14; 'windows': 0.15; '"python"': 0.16; 'apis.': 0.16; 'attempted': 0.16; 'does,': 0.16; 'emulates': 0.16; 'googled': 0.16; 'models)': 0.16; 'pywin32': 0.16; 'screen,': 0.16; 'subject:Unicode': 0.16; 'topic?': 0.16; 'url:85)': 0.16; 'url:windows': 0.16; 'wraps': 0.16; 'wrote:': 0.18; 'later': 0.20; 'command': 0.22; 'machine': 0.22; 'header:User-Agent:1': 0.23; 'documented': 0.24; 'either.': 0.24; 'enhanced': 0.24; 'subject:problem': 0.24; 'unix/linux': 0.24; "haven't": 0.24; "i've": 0.25; 'supported': 0.26; 'defined': 0.27; 'skip:" 20': 0.27; 'header:In-Reply-To:1': 0.27; 'installed': 0.27; 'am,': 0.29; 'unix': 0.29; 'dec': 0.30; 'mode': 0.30; 'noted': 0.31; 'subject:some': 0.31; 'probably': 0.32; 'checked': 0.32; 'quite': 0.32; 'linux': 0.33; 'running': 0.33; 'subject:with': 0.35; 'something': 0.35; 'but': 0.35; 'there': 0.35; 'yours,': 0.36; 'doing': 0.36; "didn't": 0.36; 'received:10.0': 0.36; 'url:microsoft': 0.37; 'received:10': 0.37; 'url:library': 0.38; 'to:addr:python-list': 0.38; 'little': 0.38; 'to:addr:python.org': 0.39; 'system.': 0.39; 'either': 0.39; 'university': 0.39; 'how': 0.40; 'most': 0.60; 'received:unknown': 0.61; 'ago.': 0.61; 'today,': 0.61; 'providing': 0.61; 'name': 0.63; 'such': 0.63; 'believe': 0.68; 'received:bluehost.com': 0.68; 'url:en-us': 0.68; 'fact,': 0.69; 'college': 0.70; 'url:%1': 0.72; 'physical': 0.72; 'yourself': 0.78; 'glenn': 0.84; 'abstracts': 0.91; 'dozen': 0.91 X-Authority-Analysis: v=2.1 cv=LbyvtFvi c=1 sm=1 tr=0 a=bHMQH+OLnPEWGwbUEerQzQ==:117 a=bHMQH+OLnPEWGwbUEerQzQ==:17 a=cNaOj0WVAAAA:8 a=f5113yIGAAAA:8 a=tcnv99F1KMcA:10 a=NQx7NIpX_PoA:10 a=WiSE-OA02TIA:10 a=aDqhzxAoLLkA:10 a=9HSTQGAzAAAA:8 a=7j9GTTBHwvYA:10 a=foBewTYRo0cA:10 a=r77TgQKjGQsHNAKrUKIA:9 a=9iDbn-4jx3cA:10 a=cKsnjEOsciEA:10 a=yMhMjlubAAAA:8 a=GOQIeIivB4clyglG-yIA:9 a=QEXdDO2ut3YA:10 a=SA2hVD_hUT_yCN6zDNEA:9 a=uIgMdJNP9uKazXYH:21 a=_W_S_7VecoQA:10 a=fYRVthtwORYA:10 Date: Mon, 04 Aug 2014 11:15:47 -0700 From: Glenn Linderman User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: cmd.exe on WIndows - problem with displaying some Unicode characters References: <53DF5807.60101@g.nevcal.com> <53DF5F48.201@biologie.uni-freiburg.de> In-Reply-To: <53DF5F48.201@biologie.uni-freiburg.de> Content-Type: multipart/alternative; boundary="------------020909030104060509090300" X-Identified-User: {1756:box1033.bluehost.com:areliabl:nevcal.com} {sentby:smtp auth 75.141.227.179 authed with test@nevcal.com} X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 144 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1407176158 news.xs4all.nl 2830 [2001:888:2000:d::a6]:58651 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:75702 This is a multi-part message in MIME format. --------------020909030104060509090300 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 8/4/2014 3:24 AM, Wolfgang Maier wrote: > On 08/04/2014 11:53 AM, Glenn Linderman wrote: >> >> I've never used the API from Python but random console access is >> documented at >> http://msdn.microsoft.com/en-us/library/windows/desktop/ms687404%28v=vs.85%29.aspx >> >> > > Would using the API from Python involve doing the wrapping yourself or > do you know about an existing package for the job ? I haven't used the API from Python. I haven't checked PyWin32 to see if it already wraps that API like it wraps so many other APIs. I haven't Googled using "python" and "WriteConsoleOutput" to see if other packages may exist to do the job. But these are the things that I would do if I had a need to write a program like yours, since I know that the console does, in fact, support random access. > > By the way (and off-topic), how would you do it on Linux? Off topic? It is still about doing it using Python, no? I believe that most Unix terminal emulators, which are used for running shells and command lines, support cursor controls, and I believe most of them have a mode that emulates the DEC VT-52 terminal, one of which I had physical access to at the "computer lab" at the university I attended so many years ago. The VT-52 defined escape sequences to move the cursor around on the screen, providing random access. Text-based, screen-oriented programs such as emacs leveraged such capabilities quite effectively. There may be something better today, I haven't used Unix for a dozen years now, and the usage at that time was database development not text-based graphics. I've used Linux only on my web host, and a little experimentation on a local machine I installed it on here, until the machine died, and I didn't do any text-based graphics in either of those circumstances either. So probably college was the last time I used text-based graphics, but that was using RSTS and DECsystem 20 (forget the name of the OS for that machine) on VT-52 terminals. But I've noted with amusement that the VT-52 (and later enhanced models) are still supported by Unix/Linux terminal emulators and X system. Unix abstracts that cursor motion using "curses" and I believe there are curses implementations for Windows as well, but I've not attempted to use curses from Python on either Unix or Windows. > > Wolfgang > --------------020909030104060509090300 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
On 8/4/2014 3:24 AM, Wolfgang Maier wrote:
On 08/04/2014 11:53 AM, Glenn Linderman wrote:

I've never used the API from Python but random console access is
documented at
http://msdn.microsoft.com/en-us/library/windows/desktop/ms687404%28v=vs.85%29.aspx


Would using the API from Python involve doing the wrapping yourself or do you know about an existing package for the job ?

I haven't used the API from Python. I haven't checked PyWin32 to see if it already wraps that API like it wraps so many other APIs. I haven't Googled using "python" and "WriteConsoleOutput" to see if other packages may exist to do the job. But these are the things that I would do if I had a need to write a program like yours, since I know that the console does, in fact, support random access.


By the way (and off-topic), how would you do it on Linux?

Off topic? It is still about doing it using Python, no?

I believe that most Unix terminal emulators, which are used for running shells and command lines, support cursor controls, and I believe most of them have a mode that emulates the DEC VT-52 terminal, one of which I had physical access to at the "computer lab" at the university I attended so many years ago. The VT-52 defined escape sequences to move the cursor around on the screen, providing random access. Text-based, screen-oriented programs such as emacs leveraged such capabilities quite effectively.

There may be something better today, I haven't used Unix for a dozen years now, and the usage at that time was database development not text-based graphics. I've used Linux only on my web host, and a little experimentation on a local machine I installed it on here, until the machine died, and I didn't do any text-based graphics in either of those circumstances either.  So probably college was the last time I used text-based graphics, but that was using RSTS and DECsystem 20 (forget the name of the OS for that machine) on VT-52 terminals. But I've noted with amusement that the VT-52 (and later enhanced models) are still supported by Unix/Linux terminal emulators and X system.

Unix abstracts that cursor motion using "curses" and I believe there are curses implementations for Windows as well, but I've not attempted to use curses from Python on either Unix or Windows.



Wolfgang


--------------020909030104060509090300--