[Zope] How to get context from Zope 2

Tres Seaver tseaver at palladion.com
Tue Aug 10 14:06:51 EDT 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Baiju M wrote:

>     How can I get the context (say, root folder) within a function
> called by a scheduler.  I am using tgscheduler to call a function
> at particular interval: http://code.google.com/p/tgscheduler/
> 
> How can I get the root folder (context) from this function ?

Through Zope2's API::

  import Zope2
  app = Zope2.app()


Tres.
- --
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEUEARECAAYFAkxhlTcACgkQ+gerLs4ltQ5gGgCXcT47K66JoWWJkp9x4ZHVP6iE
ZgCeM4CZrDh9RbLQ/NGWXNzQfVzCU78=
=YqNY
-----END PGP SIGNATURE-----



More information about the Zope mailing list