Geeky nitty picky
posted by shuri on 2012-03-09 10:00:02
tags: news,django,yacc,python,email_re

I have been working on an amazingly exciting new project, that is some sort of excuse as to why I have not updated this blog in a while.

For people who love me and will not understand what I am about to write in this post: I love you too and I will write some more approachable stuff soon.

Anyway, two little technical annoyances that I overcame.

Using Yacc with Python? Maybe with django? Getting annoying permission denied messages about parser.out? Initialize Yacc like this (for example):

parser = yacc.yacc(debuglog=yacc.PlyLogger(sys.stderr))

You can also put another file inside there but this at least keeps it from failing.

 

Another one? Switching from django 1.1 to 1.3? Using email_re? You can do this:

try:

  from django.forms.fields import email_re

except ImportError:

  from django.core.validators import email_re

Hope it helps someone.