printing \n

From: Jim Newton (jimka_at_rdrop.com)
Date: 10/02/04


Date: Sat, 02 Oct 2004 15:19:06 +0200

in c, perl, python, as well as many other languages printing "\n"
prints a carriage return. I know that the format function will
print a carriage return when "~%" is encountered. but is there a
way to print a carriage return as a character?

I ask because i'm converting a program which has a wrapper around
the print function which prints whatever it is given. Moreover,
if it is given a "\n" or a string containing \n it prints it.
How should i handle this in lisp?

-jim



Relevant Pages

  • Re: File Object behavior
    ... infile = open.readlines ... and then look at the first few lines of the file there is a carriage return ... I am using Python 2.4 on Windows XP sp2. ... Sent from the Python - python-list mailing list archive at Nabble.com. ...
    (comp.lang.python)
  • Re: Carriage Return Problem with Python on Windows
    ... > feed from occuring and causing a carriage return). ... > The comma at the end of the print command appeared to have eliminated ... Professional with Python 2.3.3. ...
    (comp.lang.python)