Displaying a python file in HTML keeping the spaces etc

hodaway

New Member
I've written some python code that i want to show on my website, but obviously just copying and pasting the text will render it almost unreadable due to the HTML not recognising the carriage return and removing the excess spacing. Is there an easy way to show it in the HTML as if it were in a text editor or IDE short of CSSing the crap out of it?Thanks
 
Back
Top