"Code Friendly" Blog?

Mel mwilson at the-wire.com
Fri Jan 18 01:27:20 CET 2008


Hai Vu wrote:
> On Jan 17, 2:50 pm, Miki <miki.teb... at gmail.com> wrote:
>> Hello,
>>
>> Posting code examples to blogger.com hosted blog is not fun (need to
>> remember alway escape < and >).
>> Is there any free blog hosting that is more "code friendly" (easy to
>> post code snippets and such)?
>>
>> Thanks,
>> --
>> Miki <miki.teb... at gmail.com>http://pythonwise.blogspot.com
> 
> how about bracketing your code in the <pre></pre> tags?
> 
> Something like this:
> <pre>
> import sys, os, shutil
> 
> def getDir(fullPath):
>     dirName, fileName = os.path.split(fullPath)
>     return dirName
> </pre>

That won't help the escape problem, though it will preserve vital 
Python whitespace.  HTML has to be interpreting '<' characters to 
recognize the '</pre>'.

	Mel.



More information about the Python-list mailing list