I have a python script (p.py)with a text like this
print "Hello"+"\n"
print "World"
I am running this file in wamp under php / apache
<?php
$output = system("C:\\python27\\python.exe p.py")
?>
I get the following on my browser
Hello World
without new line
How do I make sure the new line character appears.
I also tried "\r\n"
You will need to wrap this in
<pre>tags, or use<br/>.Try viewing something like:
In a web browser. You will get no newline. That’s because HTML pretty much ignores newlines. You will have to use the
<br/>tag for this.