Re: simple string backspace question



On Jul 31, 7:17 am, John Machin <sjmac...@xxxxxxxxxxx> wrote:
On Jul 31, 8:01 pm, vedrandeko...@xxxxxxxxxxxxxx wrote:



On 31 srp, 11:44, vedrandeko...@xxxxxxxxxxxxxx wrote:

Hello,

I have one simple string, backspace character question.Here is my
example:

text="Hello\bworld"
print text

"HelloBSworld"

Should this character "\b" (backspace) in this text return this:
"Helloworld"?

Regards,
Vedran

Hi,

If you mean on operating system then unfortunately Windows XP.

Point (1) Works on Windows XP for me:

C:\junk>ver

Microsoft Windows XP [Version 5.1.2600]

C:\junk>\python25\python
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.

text = "Hello\bworld"
print text
Hellworld

or, for mild amusement:

import sys, time
for x in xrange(100):

... sys.stdout.write("|/-\\"[x & 3] + "\b")
... time.sleep(0.1)
...

Now try it on IDLE.



Point (2): Backspace??? YAGNI --- backspace hasn't been much use for
anything (except when typing text) since the days when in order to get
a bold letter (say X) on a character impact printer, one would
transmit X\bX\bX ...

.



Relevant Pages

  • Re: Dual Processor systems
    ... Intel boards with Intel Chipsets running Intel Pentium Xeon Processors - ... manager, it depends on whether you choose "One Graph, All CPUs" or "One ... Graph Each CPU", where I normally choose the latter. ... Microsoft Windows XP Professional and Microsoft Windows XP Home ...
    (microsoft.public.windowsxp.hardware)
  • Re: YADQ (Yet another dumb question)
    ... Udo Munk wrote: ... _application_ layer for Microsoft Windows. ... From everything I hear, z80pack is the ne plus ultra of z80 emulators, no question about that. ... But for pure win32 goodness, ...
    (comp.os.cpm)
  • Grafik Treiber Update Frage
    ... Aktuell ist laut Intel aber die Version 6.14.10.4363 ... Mein Betriebssystem ist Microsoft Windows XP Home Edition ...
    (microsoft.public.de.german.windowsxp.sonstiges)
  • Re: Why is SUN falling so far behind IBM?
    ... don't you mean Intel or Microsoft? ... is suspect; Intel chips may run Microsoft Windows (and ... be the only chips that run Microsoft Windows), ...
    (comp.unix.aix)
  • Re: Why is SUN falling so far behind IBM?
    ... don't you mean Intel or Microsoft? ... is suspect; Intel chips may run Microsoft Windows (and ... be the only chips that run Microsoft Windows), ...
    (comp.unix.solaris)