Personal tools
You are here: Home Documentation How-Tos Make use of add-ons via eggs

Make use of add-ons via eggs

This How-to applies to: Any version.
This How-to is intended for: Developer, Advanced Developer

How to include additional third-party code packaged as eggs (using megrok.form as the example).

Might be outdated! This document hasn't been reviewed for Grok 1.0 and may be outdated. If you would like to review the document, please read this post


A new egg has been released that will give your application lots more functionality or bling. The developer was nice enough to release it as an egg to the community via the Python packaging index (pypi). The steps below will explain how to get the new functionality into your application.


I'm assuming that you already have grok installed using grokproject. For this howto, I'm using a grokproject called 'megrokformexample'. The directory structure is represented below. The key files for this exercise are and configure.zcml, they are highlighted below:

|-- bin
|-- buildout.cfg
|-- develop-eggs
|   `-- megrokformexample.egg-link
|-- parts
`-- src
    |-- megrokformexample
    |   |--
    |   |--
    |   |-- app_templates
    |   |   `--
    |   |-- configure.zcml
    |   |-- ftesting.zcml
    |   `--
    `-- megrokformexample.egg-info


Step by step

Step 1 - Identify the package that you would like to use

For our example we want to use megrok.form

the listing at pypi looks like screenshot below:

megrok.form pypi listing


Step 2 - Add the package information to the and configure.zcml of your project

This is what megrokformexample/

looks like:

from setuptools import setup, find_packages

version = '0.0'

      # Get strings from
      package_dir={'': 'src'},
                        # Add extra requirements here
      # Add entry points here

This is what src/megrokformexample/configure.zcml looks like:

<configure xmlns=""
  <include package="grok" />
  <include package="megrok.form" />
  <grok:grok package="." />

Step 3 - run bin/buildout

While inside the megrokformexample directory run bin/buildout:


The output should look similar to this:

Develop: '/home/david/megrokform/megrokformexample/.'
Updating app.
Getting distribution for 'megrok.form'.
Got megrok.form 0.1.
Getting distribution for 'collective.namedfile'.
Got collective.namedfile 1.1.
Getting distribution for 'zc.datetimewidget'.
Got zc.datetimewidget 0.6.1dev-r72453.
Getting distribution for 'z3c.widget'.
Got z3c.widget 0.1.7.
Getting distribution for 'zc.resourcelibrary'.
Got zc.resourcelibrary 1.0.0.
Getting distribution for 'zc.i18n>=0.5'.
Got zc.i18n 0.6.1dev-r72454.
Getting distribution for ''.
Got 3.4.0.
Getting distribution for 'z3c.schema'.
Got z3c.schema 0.1-r73916.
Getting distribution for 'z3c.javascript'.
Got z3c.javascript 0.2-r80712.
Getting distribution for 'z3c.i18n'.
Got z3c.i18n 0.1.1.
Generated script '/home/david/megrokform/megrokformexample/parts/app/runzope'.
Generated script '/home/david/megrokform/megrokformexample/parts/app/debugzope'.
Updating data.
Updating zopectl.
Updating i18n.
The recipe for i18n doesn't define an update method. Using its install method.
i18n: setting up i18n tools
Generated script 'bin/i18nextract'.
Generated script 'bin/i18nmergeall'.
Updating test.
Generated script '/home/david/megrokform/megrokformexample/bin/test'.

Further information

Always read the information about the package at pypi. This is helpful in cases where a package may need additional things before it will install.

see also:

Install multiple Grok apps using zc.buildout
Grok is packaged as Python eggs. zc.buildout is a tool for managing these eggs, and let's you quickly try out or develop a Grok-based project.

Problem on Windows XP

Posted by Alaa Barazi at Feb 29, 2008 11:26 AM

I followed all the steps in the tutorial and had the error in the last step which is :


While: Initializing. Error: Couldn't open C:\megrokformexample\bin\buildout.cfg

Could you help me in solving this problem?


Problem Solved

Posted by Alaa Barazi at Mar 01, 2008 02:55 AM

Copy buildout.exe and from C:\megrokformexample\bin\ to C:\megrokformexample\ and run builout.exe from C:\megrokformexample\.

No need to copy buildout.exe and

Posted by Alaa Barazi at Mar 01, 2008 08:46 AM

No need to copy buildout.exe and just run bin\builout "not bin/buildout" from C:\megrokformexample. Like the following: C:\megrokformexample>bin\builout

"bin\buildout" not "bin\builout"

Posted by Alaa Barazi at Mar 01, 2008 09:23 AM

"C:\megrokformexample>bin\buildout.exe" not "C:\megrokformexample\bin>buildout.exe"


Posted by Royaryshoma at Oct 20, 2011 07:10 PM
Effexor Xr For Depression No Prescription Accutane Online Acne <a href=>Effexor Xr No Prescription Taking</a> Ordering Alprazolam Online Motrin For Kittens Infant Immunizations And Motrin Stops Working Effexor Xr Buy Motrin 800 <a href=>No Prescription Motrin Acetaminophen</a> Lisinopril With Motrin How Fast Does Accutane Create Working Effexor Bijwerkingen Toddler Motrin Dosage Pain Reliever Effexor Canada Delivery <a href=[…]noprescription>Promotion Paroxetine No Prescription</a> Motrin And Delsym Cough Medicine Acne Treatment After Accutane My Doctor Weight Gain On Effexor Effexor Depression Clinical Webkinz Effexor Xr 150 <a href=>Generic Drugs No Prescription Avodart</a> Alprazolam Pdr Paroxetine And Xanax Social Anxiety Disorder Alprazolam Mechanism Panic Disorder