Giter Club home page Giter Club logo

Comments (5)

verigak avatar verigak commented on August 20, 2024

Seems to work for me. Can you try this example and let me know if it works?

from progress.spinner import Spinner
import time

pg = Spinner('中文')
for i in range(20):
    time.sleep(0.1)
    pg.next()
pg.finish()

from progress.

gaopengpian avatar gaopengpian commented on August 20, 2024

I am so sorry for no reply for a long time, thanks for you reply. I have tested the code above, the error is still on.
image

from progress.

skalkoto avatar skalkoto commented on August 20, 2024

This has nothing to do with the progress module. The python parser cannot parse your test.py file because it has Non-ASCII characters inside (namely '中文') and there is no encoding declared. Try adding something like this:

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

in the beginning of the file. Check PEP 263 (https://www.python.org/dev/peps/pep-0263/) for more info.

from progress.

gaopengpian avatar gaopengpian commented on August 20, 2024

I add the coding, but the output is unreadable code.
image

from progress.

skalkoto avatar skalkoto commented on August 20, 2024

I have no experience with Windows and I don't know if your file's encoding is actually UFT-8 but if I had to guess about your problem I would say that the software is using ANSI escape characters, that from what I read here: https://en.wikipedia.org/wiki/ANSI_escape_code are not working on Windows:

Although hardware text terminals have become increasingly rare in the 21st century, the relevance of the ANSI standard persists because most terminal emulators interpret at least some of the ANSI escape sequences in the output text. One notable exception was the Win32 console component of Microsoft Windows before Windows 10 update TH2.

Maybe check this thread: http://stackoverflow.com/questions/16755142/how-to-make-win32-console-recognize-ansi-vt100-escape-sequences

from progress.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.