[Zope] transaction commit inside a Python Script?

Andy McKay andy@agmweb.ca
Thu, 5 Sep 2002 22:45:24 -0700


Add:

ModuleSecurityInfo('Transaction').declarePublic('get_transaction')

to your PythonScript security file blah and then you can do:

import ZODB
ZODB.Transaction.get_transaction()

Will waiting for a the posts to tell me why this is bad, heres another way
http://www.zopelabs.com/cookbook/1000910877

Cheers
--
  Andy McKay
  Agmweb Consulting
  http://www.agmweb.ca

----- Original Message -----
From: "Richard Jones" <rjones@ekit-inc.com>
To: <zope@zope.org>
Sent: Thursday, September 05, 2002 10:08 PM
Subject: [Zope] transaction commit inside a Python Script?


> I need to perform a transaction commit inside a Python Script, but
> get_transaction doesn't appear to be available. Can anyone hint at how to
> access the transaction to commit it?
>
>
>     Richard
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>