Re: [Tutor] UnicodeEncodeError: 'cp932' codec can't encode character '\xe9' in position

2012-03-10 Thread Robert Sjoblom
> You can "solve" the problem by pretending the input file is also cp932 when > you open it. That way you'll get the wrong characters, but no errors. So I tried that: Traceback (most recent call last): File "C:\Users\Azaz\Desktop\CK2 Map Painter\Parser\test parser.py", line 6, in text = alph

Re: [Tutor] UnicodeEncodeError: 'cp932' codec can't encode character '\xe9' in position

2012-03-10 Thread Dave Angel
On 03/10/2012 06:38 PM, Robert Sjoblom wrote: Okay, so here's a fun one. Since I'm on a japanese locale my native encoding is cp932. I was thinking of writing a parser for a bunch of text files, but I stumbled on even printing the contents due to ... something. I don't know what encoding the text

Re: [Tutor] Floating point error in tkinter

2012-03-10 Thread Alan Gauld
On 10/03/12 19:40, Válas Péter wrote: Better to say: I think it is a Tkinter bug (unless we expect Windows to adapt itself to Python), and Tkinter is part of the Python But it's really a Tcl bug because Tkinter is built on top of Tcl/Tk and (mostly) cannot fix bugs that exist in the un

Re: [Tutor] Python using RXVT vs Konsole?

2012-03-10 Thread Alan Gauld
On 10/03/12 15:22, brandon w wrote: Up arrow does work in other applications. The only application that it does not work in is konsole. Konsole is a shell, you run applications inside Konsole. Python is one such application. What I was asking was do the arrow keys work in other Konsole applica

[Tutor] UnicodeEncodeError: 'cp932' codec can't encode character '\xe9' in position

2012-03-10 Thread Robert Sjoblom
Okay, so here's a fun one. Since I'm on a japanese locale my native encoding is cp932. I was thinking of writing a parser for a bunch of text files, but I stumbled on even printing the contents due to ... something. I don't know what encoding the text file uses, which isn't helping my case either (

Re: [Tutor] Floating point error in tkinter

2012-03-10 Thread Válas Péter
Sorry for sending it in private first, Steven drew my attention to it. This list has a strange setting, I got used to lists that send replies automatically to list, and did not notice the error. 2012. március 9. 18:53 Válas Péter írta, : > 2012/3/9 Steven D'Aprano > >> >> What makes you think it

Re: [Tutor] Python using RXVT vs Konsole?

2012-03-10 Thread brandon w
Up arrow does work in other applications. The only application that it does not work in is konsole. I actually do not care for konsole that much. I think I will just use some other terminal. I found this on the Internet: The interpreter's line-editing features usually aren't very sophisticated. O

Re: [Tutor] getattr help

2012-03-10 Thread Peter Otten
mjole...@gmail.com wrote: > What is the purpose of getattr? Why not just use help or am I completely > misunderstanding this? > >>From what I read, getattr allows you to get a reference to a function >>without knowing its name until runtime. > > However, the example provided is: > > li = ['larr