[Zope] How do I connect to a db from a PythonMethod?

Bill Welch bill@carbonecho.com
Wed, 20 Sep 2000 14:58:05 +0000 (GMT)


I have this in an ExternalMethod and it works fine:

  import MySQLdb
  conn = MySQLdb.Connection(user='xxxx', passwd='yyyyy', db='zzz')

In a PythonMethod, it fails because of the import restriction. What's the
easiest way to get around this. I'm not getting anything out of the
documentation in PythonMethods/ModuleSecurityInfo because it never says
where the code snippets should actually go.