Re: Image enhance

Thomas Passin <[email protected]>
Newsgroups gmane.comp.python.general
Message-ID <[email protected]>
On 9/2/2025 11:29 AM, amrodi9999--- via Python-list wrote:
> I'm new to Python.
> Operating System - Windows XP SP3
> Python 2.7 installed.
> 
> I got a script that tries to improve the image?
> I created a bat file using the command line.
> 
> C:\python27\python.exe d:\temp\teste.py
> 
> But even though it runs, it displays an error:
> 
> "... no encoding declare..."
> 
> Can anyone help?
> 
> My sincere thanks in advance.

The code file you posted contains several words that probably contain 
non-ascii characters (e.g.,  colorizacao). By default, Python 2.x uses 
ASCII encoding for the source file. You can tell it to use another 
encoding by a special comment at the start of the file that contains

"# coding: utf-8"

(or whatever encoding you want). One common comment format, which is 
understood by many Linux programs, is

# -*- coding: utf-8 -*-

Python 3.x uses utf-8 by default.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.