Demo entry 6786699

test

   

Submitted by anonymous on Apr 03, 2019 at 12:14
Language: Python. Code size: 371 Bytes.

indir= r''
for x in os.listdir(indir):
    if x.endswith('.py'):
        infile = os.path.join(indir, x)
        outfile = infile.replace('.py', '.html')
        code = ''.join(list(open(infile)))
        html = highlight(code, PythonLexer(), formatter)
        f = open(outfile, 'w')
        f.write(html)
        f.close()
        print 'finished :',x

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).