Archive | python RSS feed for this section

Windows version of os.walk with long path (255 characters) support

There are these times that you really have to use Windows and in those cases some issues like the 255 path limit tend to occur with network mounts. Luckily, this is fairly easy to solve with a small Python snippet: [python]import os UNUSED_DRIVE_LETTER = ‘x:’ def windows_walk(top, topdown=True, onerror=None, followlinks=False): for path, dirs, files in […]

1 Comment Continue Reading →

Mixing Django with Jinja2 without losing template debugging

At Fashiolista we’ve build nearly the entire site with Jinja instead of the Django template engine. There are a lot of reasons for choosing Jinja2 over Django for us. Better performance (atleast… it was a lot better with previous Django versions), way more options (named arguments, multiple arguments for filters, etc), macros and simply easier […]

5 Comments Continue Reading →