472,348 Members | 1,786 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,348 software developers and data experts.

Strange behavior in PythonWin IDE

Hello!

I'm using ActivePython 2.3.2 build 232 on Windows 2000 and I have noticed a
strange behavior in PythonWin IDE (win32all build 163)

I'm from Sweden and we have a couple of letters in our alphabet that isn't
part of ASCII and the strangeness is about one of them

When I use the letter å (å) then the next character is eaten! Then
when I enter the next character (the second after å) the last one appears.

E.g.
I want to write the word: "låna"
I enter: "lå
I enter: n ,but it won't show
I enter: a , and the n appears
I enter: " , and a s appears
So in the editor I now have: "låns

If I then enter a " PythonWin thinks that I'm beginning a new string and
changes the color.

If I then save the file and open it in another editor. Then I have the
correct word: "låna"

But if I run the program from the command prompt I get this error/warning

"C:\Documents and Settings\ame\My Documents\My Scripts>python test.py
sys:1: DeprecationWarning: Non-ASCII character '\xe5' in file test.py on
line 1, but no encoding declared; see
http://www.python.org/peps/pep-0263.html for details

What is the error and what can I do to fix it?

// Anders

--
Womba Womba
Jul 18 '05 #1
6 2160
Anders Eriksson wrote:
Hello!

I'm using ActivePython 2.3.2 build 232 on Windows 2000 and I have noticed
a strange behavior in PythonWin IDE (win32all build 163)

I'm from Sweden and we have a couple of letters in our alphabet that isn't
part of ASCII and the strangeness is about one of them

When I use the letter å (å) then the next character is eaten! Then
when I enter the next character (the second after å) the last one appears.

E.g.
I want to write the word: "låna"
I enter: "lå
I enter: n ,but it won't show
I enter: a , and the n appears
I enter: " , and a s appears
So in the editor I now have: "låns

If I then enter a " PythonWin thinks that I'm beginning a new string and
changes the color.

If I then save the file and open it in another editor. Then I have the
correct word: "låna"

But if I run the program from the command prompt I get this error/warning

"C:\Documents and Settings\ame\My Documents\My Scripts>python test.py
sys:1: DeprecationWarning: Non-ASCII character '\xe5' in file test.py on
line 1, but no encoding declared; see
http://www.python.org/peps/pep-0263.html for details

What is the error and what can I do to fix it?

// Anders


This bug (and others related to charsets) has been submitted some months
ago...

https://sourceforge.net/tracker/inde...18&atid=551954

Perhaps you can help adding other bug scenarios.

Cheers

--
Gilles

Jul 18 '05 #2

"Anders Eriksson" <an*************@morateknikutveckling.se> wrote in message
news:1f***************@morateknikutveckling.se...
Hello!

I'm using ActivePython 2.3.2 build 232 on Windows 2000 and I have noticed a strange behavior in PythonWin IDE (win32all build 163)

I'm from Sweden and we have a couple of letters in our alphabet that isn't
part of ASCII and the strangeness is about one of them

When I use the letter å (&aring;) then the next character is eaten! Then
when I enter the next character (the second after å) the last one appears.

E.g.
I want to write the word: "låna"
I enter: "lå
I enter: n ,but it won't show
I enter: a , and the n appears
I enter: " , and a s appears
So in the editor I now have: "låns

If I then enter a " PythonWin thinks that I'm beginning a new string and
changes the color.

If I then save the file and open it in another editor. Then I have the
correct word: "låna"

But if I run the program from the command prompt I get this error/warning

"C:\Documents and Settings\ame\My Documents\My Scripts>python test.py
sys:1: DeprecationWarning: Non-ASCII character '\xe5' in file test.py on
line 1, but no encoding declared; see
http://www.python.org/peps/pep-0263.html for details

What is the error and what can I do to fix it?
There are two separate issues here:

1. To eliminate the depreciation warning, you do need to put in the
correct pep-0263 character set declaration line. I believe this will
become a fatal error in 2.4

However, the other problem isn't a Python problem as far as I know:
I believe the editor portion is written in C++. I could be wrong on
that, but please try reproducing the problem under IDLE.

John Roth
// Anders

--
Womba Womba

Jul 18 '05 #3
On Fri, 28 Nov 2003 15:59:51 +0100, Gilles Lenfant wrote:
This bug (and others related to charsets) has been submitted some months
ago...

OK, I didn't know that PythonWin was on SourceForge, but I will try there
instead.

Thank You !

// Anders
--
At-home-but-still-working
Jul 18 '05 #4
On Fri, 28 Nov 2003 11:02:42 -0500, John Roth wrote:
1. To eliminate the depreciation warning, you do need to put in the
correct pep-0263 character set declaration line. I believe this will
become a fatal error in 2.4

Ok! I understand how to enter the encoding line, but I can't find any list
of which encodings that are legal. Is there such a list?

// Anders
--
At-home-but-still-working
Jul 18 '05 #5
On Fri, 28 Nov 2003 17:16:52 GMT, Anders Eriksson <am******@telia.com>
wrote:
On Fri, 28 Nov 2003 11:02:42 -0500, John Roth wrote:
1. To eliminate the depreciation warning, you do need to put in the
correct pep-0263 character set declaration line. I believe this will
become a fatal error in 2.4

Ok! I understand how to enter the encoding line, but I can't find any list
of which encodings that are legal. Is there such a list?


The Python Library Reference, Section 4.9.2: Standard Encodings

In Sweden, as in most of western Europe, you're probably looking for
latin_1 or iso-8859-15 (the same with Euro currency symbol).

--
Christopher
Jul 18 '05 #6
On Fri, 28 Nov 2003 17:57:29 GMT, Christopher Koppler
<kl******@chello.at> wrote:
On Fri, 28 Nov 2003 17:16:52 GMT, Anders Eriksson <am******@telia.com>
wrote:
On Fri, 28 Nov 2003 11:02:42 -0500, John Roth wrote:
1. To eliminate the depreciation warning, you do need to put in the
correct pep-0263 character set declaration line. I believe this will
become a fatal error in 2.4

Ok! I understand how to enter the encoding line, but I can't find any list
of which encodings that are legal. Is there such a list?


The Python Library Reference, Section 4.9.2: Standard Encodings

In Sweden, as in most of western Europe, you're probably looking for
latin_1 or iso-8859-15 (the same with Euro currency symbol).


Or, since you're on Windows, cp1252...
--
Christopher
Jul 18 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Martin Bless | last post by:
IMHO PythonWin is great help in developing. How can I do something like: if detect("running on PythonWin"): pass # fake arguments ... else:...
10
by: Carlos Ribeiro | last post by:
Hello all. I'm sending this to the list because I would like to know if someone else has ever stumbled across this one, and also because one...
14
by: Jive | last post by:
I've un-installed Python 2.4, re-installed Python 2.3 and PythonWin for 2.3, but it's still broke. When I start PythonWin, sometimes it looks...
3
by: pytopo | last post by:
I like the way call tips displays argument variables for functions when you type the "(" after the function name. However, if one of the arguments...
2
by: siggy2 | last post by:
Hi All, (sorry for my bad english) I wrote a __tiny__ and __stupid__ recursive script directly into pythonwin interactive window with a...
2
by: accolades | last post by:
Does anyone else have a problem with Pythonwin crashing after running a python script with graphics libraries? Whenever I use Pythonwin to run a...
17
by: Dave Benjamin | last post by:
Hey folks, Why is PythonWin (win32all) still a separate download from a third party? Is it legal, technical, or what? I think it's about time it...
2
by: Norbert | last post by:
Hello all, i try to install ZSI under python 2.5 and windows 2000. I Downloaded the egg and tried the following ...
3
by: archaegeo | last post by:
I am getting started in Python, and I have looked on both the stackless page and python.org and cannot find the answer to what I think is a simple...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.