473,403 Members | 2,323 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 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 2230
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: "proceed normal"
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 possible solution is to patch, or simply "decorate",...
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 like it is going to be okay. But as soon as I open...
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 to the function is something like...
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 time.sleep(1) and a print before each recursion... I...
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 PyGame or PyOgre script, Pythonwin crashes when the...
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 be part of the standard distribution. There...
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 c:\Python25\Scripts>easy_install.exe c:\download\ZSI-2.0_rc3-py2.5.egg The...
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 problem. If I start the python command line or...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.