473,698 Members | 2,467 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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:\Documen ts and Settings\ame\My Documents\My Scripts>python test.py
sys:1: DeprecationWarn ing: 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 2244
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:\Documen ts and Settings\ame\My Documents\My Scripts>python test.py
sys:1: DeprecationWarn ing: 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************ *@morateknikutv eckling.se> wrote in message
news:1f******** *******@moratek nikutveckling.s e...
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:\Documen ts and Settings\ame\My Documents\My Scripts>python test.py
sys:1: DeprecationWarn ing: 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******@chell o.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
3016
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
1987
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", some of the Python libraries functions (a few of the os and os.path calls). Note: if you're going to reply, please read it *all* before doing so -- I've already explored this problem quite a bit, and found no obvious solution to it yet.
14
2884
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 a .py file, the interactive window grabs the focus and will not let go. I am stumped. Is there something PythonWin uses that I could try re-installing? WxPython maybe?
3
1649
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 "SomeMod.attribute", the intellisense will display all the exposed methods and attributes when "SomeMod." is typed. This is fine but once I have selected the desired attribute and continue with entering the next argument, the original call tip for the function...
2
7332
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 should have taken a closer look at the ending condition (never satisfied!), anyway I was quite confident that a control-C would have stopped the intepreter as it is (incidentally?) when this break sequence is entered
2
2459
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 script exits. I know it's probably because the Pythonwin interpreter can't read from the console once the graphics mode has been changed, but has anyone discovered a workaround? I'd like to know if this problem is specific to my machine, or if...
17
1954
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 are many useful things that you ought to be able to do without downloading third-party libraries. Terminating a process, for example. Communicating with other applications via a standard, common protocol (COM). We demand these things from our UNIX...
2
1677
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 result is that pythonwin pops up and shows the file : c:\Python25\Scripts\easy_install-script.py : ---------------------------- !C:\Python25\Lib\site-packages\pythonwin\Pythonwin.exe
3
2976
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 idle, i can If I start pythonwin I get the following error ....No Module named Stackless Any help?
0
9166
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9030
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8899
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8871
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7737
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5861
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4371
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2333
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.