File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Jython/Python and the fly likes Outputting \b in python? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » Jython/Python
Bookmark "Outputting \b in python?" Watch "Outputting \b in python?" New topic
Author

Outputting \b in python?

Luke Murphy
Ranch Hand

Joined: May 12, 2010
Posts: 300
I want to output

> \b

, so I do:

print('\b')
and a fancy symbol is outputted instaed. This doesn't happen for other letters? So how do I actually output

> \b

? Sorry this question is simple but not much comes in google when you do a search for this character combination...
Luke Murphy
Ranch Hand

Joined: May 12, 2010
Posts: 300
Luke Murphy wrote:I want to output

> \b

, so I do:

print('\b')
and a fancy symbol is outputted instaed. This doesn't happen for other letters? So how do I actually output

> \b

? Sorry this question is simple but not much comes in google when you do a search for this character combination...


Answer...

print('\\b')
chris webster
Bartender

Joined: Mar 01, 2009
Posts: 1845
    
  16

You probably figured out by now that '\b' is a special character (backspace), just as '\t' is a tab, and '\n' is a newline, etc.


No more Blub for me, thank you, Vicar.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Outputting \b in python?