Re: Printing characters outside of the ASCII range

2014-03-19 Thread Mark Lawrence
On 19/03/2014 14:43, Zachary Ware wrote: Ironically, on my way down the November 2012 archive page, I noticed a long thread about "Obnoxious postings from Google Groups". Thankfully the number of grotty postings from gg has dropped considerably. Sadly our resident unicode expert quite delibe

Re: Printing characters outside of the ASCII range

2014-03-19 Thread Zachary Ware
On 19/03/2014 13:11, diccon.tes...@gmail.com wrote: > Your handling Pick Multi value fields aren't you ;) > Just hit the same issue, thanks all here for various solutions. > Interfacing with OpenQM / Scarlet DME here. For future posts, please be sure to quote what you're replying to. Google Groups

Re: Printing characters outside of the ASCII range

2014-03-19 Thread Mark Lawrence
On 19/03/2014 13:11, diccon.tes...@gmail.com wrote: Your handling Pick Multi value fields aren't you ;) Just hit the same issue, thanks all here for various solutions. Interfacing with OpenQM / Scarlet DME here. The context is conspicious by its absence. In future would you please be kind en

Re: Printing characters outside of the ASCII range

2014-03-19 Thread diccon . tesson
Your handling Pick Multi value fields aren't you ;) Just hit the same issue, thanks all here for various solutions. Interfacing with OpenQM / Scarlet DME here. -- https://mail.python.org/mailman/listinfo/python-list

Re: Printing characters outside of the ASCII range

2012-11-11 Thread Lele Gaifax
danielk writes: > Ian's solution gives me what I need (thanks Ian!). But I notice a > difference between '__str__' and '__repr__'. > > class Pytest(str): > def __init__(self, data = None): > if data == None: data = "" > self.data = data > > def __repr__(self): > re

Re: Printing characters outside of the ASCII range

2012-11-11 Thread Thomas Rachel
Am 09.11.2012 18:17 schrieb danielk: I'm using this character as a delimiter in my application. Then you probably use the *byte* 254 as opposed to the *character* 254. So it might be better to either switch to byte strings, or output the representation of the string instead of itself. So d

Re: Printing characters outside of the ASCII range

2012-11-11 Thread danielk
On Friday, November 9, 2012 5:11:12 PM UTC-5, Ian wrote: > On Fri, Nov 9, 2012 at 2:46 PM, danielk wrote: > > > D:\home\python>pytest.py > > > Traceback (most recent call last): > > > File "D:\home\python\pytest.py", line 1, in > > > print(chr(253).decode('latin1')) > > > AttributeErro

Re: Printing characters outside of the ASCII range

2012-11-10 Thread wxjmfauth
Le vendredi 9 novembre 2012 18:17:54 UTC+1, danielk a écrit : > I'm converting an application to Python 3. The app works fine on Python 2. > > > > Simply put, this simple one-liner: > > > > print(chr(254)) > > > > errors out with: > > > > Traceback (most recent call last): > > File "

Re: Printing characters outside of the ASCII range

2012-11-09 Thread Ian Kelly
On Fri, Nov 9, 2012 at 2:46 PM, danielk wrote: > D:\home\python>pytest.py > Traceback (most recent call last): > File "D:\home\python\pytest.py", line 1, in > print(chr(253).decode('latin1')) > AttributeError: 'str' object has no attribute 'decode' > > Do I need to import something? Ramit

Re: Printing characters outside of the ASCII range

2012-11-09 Thread danielk
On Friday, November 9, 2012 4:34:19 PM UTC-5, Prasad, Ramit wrote: > danielk wrote: > > > > > > The database I'm using stores information as a 3-dimensional array. The > > delimiters between elements are > > > chr(252), chr(253) and chr(254). So a record can look like this (example > > only u

Re: Printing characters outside of the ASCII range

2012-11-09 Thread Andrew Berg
On 2012.11.09 15:17, danielk wrote: > I guess the question I have is: How do you tell Python to use a specific > encoding for 'print' statements when I know there will be characters outside > of the ASCII range of 0-127? You don't. It's raising that exception because the terminal cannot display t

RE: Printing characters outside of the ASCII range

2012-11-09 Thread Prasad, Ramit
danielk wrote: > > The database I'm using stores information as a 3-dimensional array. The > delimiters between elements are > chr(252), chr(253) and chr(254). So a record can look like this (example only > uses one of the delimiters for > simplicity): > > name + chr(254) + address + chr(254) +

Re: Printing characters outside of the ASCII range

2012-11-09 Thread danielk
On Friday, November 9, 2012 12:48:05 PM UTC-5, Dave Angel wrote: > On 11/09/2012 12:17 PM, danielk wrote: > > > I'm converting an application to Python 3. The app works fine on Python 2. > > > > > > Simply put, this simple one-liner: > > > > > > print(chr(254)) > > > > > > errors out with: >

Re: Printing characters outside of the ASCII range

2012-11-09 Thread Dave Angel
On 11/09/2012 12:17 PM, danielk wrote: > I'm converting an application to Python 3. The app works fine on Python 2. > > Simply put, this simple one-liner: > > print(chr(254)) > > errors out with: > > Traceback (most recent call last): > File "D:\home\python\tst.py", line 1, in > print(chr(25

Re: Printing characters outside of the ASCII range

2012-11-09 Thread Andrew Berg
On 2012.11.09 11:17, danielk wrote: > I'm converting an application to Python 3. The app works fine on Python 2. > > Simply put, this simple one-liner: > > print(chr(254)) > > errors out with: > > Traceback (most recent call last): > File "D:\home\python\tst.py", line 1, in > print(chr(2

Re: Printing characters outside of the ASCII range

2012-11-09 Thread Ian Kelly
On Fri, Nov 9, 2012 at 10:17 AM, danielk wrote: > I'm converting an application to Python 3. The app works fine on Python 2. > > Simply put, this simple one-liner: > > print(chr(254)) > > errors out with: > > Traceback (most recent call last): > File "D:\home\python\tst.py", line 1, in > pr

Printing characters outside of the ASCII range

2012-11-09 Thread danielk
I'm converting an application to Python 3. The app works fine on Python 2. Simply put, this simple one-liner: print(chr(254)) errors out with: Traceback (most recent call last): File "D:\home\python\tst.py", line 1, in print(chr(254)) File "C:\Python33\lib\encodings\cp437.py", line 19,