1

I am using the standard IDE that comes with python3.

I would like to make use of the backspace function (\b) within the ILE in order to create a NICE LOOKING progressbar. Even a simple percentage counter requires the backspace function.

When I run the script I get a wonderfully useless symbol instead of a backspace.

Questions:

  1. How can I use \b in the IDE

  2. How else can I make a progress bar that would use something similar to a backspace (in other words, I don't want a lame eg: loading:##########################

I've read threads on this and the best solution I've heard involves actually re-writing the IDE base code which is just an tkinter app. I just don't understand why this would be required ... did they think it was a stupid feature to have a function like this in the standard python IDE? Mind-baffling

Sridhar Ratnakumar
  • 81,433
  • 63
  • 146
  • 187
Rhys
  • 4,926
  • 14
  • 41
  • 64
  • 1
    This question seems confused on what IDLE is It's an IDE, a development environment. You aren't supposed to actually run the code with IDLE once your done.... So a progress bar for IDLE make no sense. – Lennart Regebro Apr 06 '11 at 08:53
  • 1
    thank you very much. I have amended my question. feel free to answer the question asked 'You aren't supposed to actually run the code with IDLE once your done' I am aware of this, but it is very annoying when testing the code, to have half the screen flood with useless text in a matter of seconds – Rhys Apr 06 '11 at 09:46
  • 2
    Well, you are always going to be limited to what you can do in the IDLE console, as it's not a normal console. And i'm not sure why you can't just use a "lame" ###################### which seems to be a perfectly good progress bar to me. A progress bar is supposed to grow, you know. :) – Lennart Regebro Apr 06 '11 at 11:28
  • @LennartRegebro: I agree with your comment from [11:28], but disagree with [8:53]: depending on the task one may well want to have a progress bar during development, and anyway, replies like "Why...?" or "You're not supposed to..." to a "How...?" question are worse than a plain "You can't", which is the hurting truth here - because the IDLE shell is broken in that it does not interpret ANSI (where S = *standard*) control characters as it should. – Max Oct 18 '21 at 14:35
  • @Max I'm not sure in what way you feel it contributes to the discussion to vent your feelings about ten year old comments. – Lennart Regebro Oct 19 '21 at 20:35

1 Answers1

0

It sounds to me like you want a 'GUI' (often pronounced 'gooey') widget. That stands for Graphical User Interface. Python normally runs in a Text-Base Interface aka command-line interface (CLI). CLI applications are the sort of boring 1980s style terminal things that they had around before they invented the computer mouse and invented better graphics devices. If you want a progress bar to look modern (my interpretation of 'not lame'), you will have to create a GUI. Python can do this too, if you use special tools. You need a GUI framework. Some good GUI frameworks are listed here. Different frameworks are like different tools. I would recommend using tk and ttk for starters (TKinter and themed TKinter), and you can get that version of the progressbar here.

So actually implementing GUIs is always a mess. It is really complicated and very difficult to program. That is the value of the boring 1980s style CLI terminal applications is that they are much simpler to program.

If you still decide you want a GUI app, you should check out a tutorial or maybe even a GUI-builder. See this stack overflow thread and this website.

Community
  • 1
  • 1
charmoniumQ
  • 5,214
  • 5
  • 33
  • 51
  • I disagree; with PyQt it is very easy, especially one can easily design the UI elements (including progress bars) within a designer. – Ramchandra Apte Sep 11 '13 at 15:51