Hi all,

Sorry for what I consider a very simple question.

I want to check something I have done.

I wanted to do some test driven development for a specific part of my
project.

In order to run the tests I need to import the google libs (I am
running on MacOS)

I have put this at the top of my test script (Which I snaffled from
dev_appserver.py)

----

import os
import sys

DIR_PATH='/usr/local/google_appengine'
#SORT OUT THE IMPORTS FOR THE LIBS
EXTRA_PATHS = [
  DIR_PATH,
  os.path.join(DIR_PATH, 'lib', 'antlr3'),
  os.path.join(DIR_PATH, 'lib', 'django_0_96'),
  os.path.join(DIR_PATH, 'lib', 'fancy_urllib'),
  os.path.join(DIR_PATH, 'lib', 'ipaddr'),

  os.path.join(DIR_PATH, 'lib', 'webob'),
  os.path.join(DIR_PATH, 'lib', 'yaml', 'lib'),
  os.path.join(DIR_PATH, 'lib', 'simplejson'),
  os.path.join(DIR_PATH, 'lib', 'graphy'),
]

sys.path = EXTRA_PATHS + sys.path

----

Now my test can use the google libs, and all is well.
Just wondered if there was a better way to achieve this?


Thanks ever so much

J

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to