• Login
  • Help/Guide
  • About Trac
  • Preferences
  • Wiki
  • Timeline
  • Roadmap
  • Browse Source
  • View Tickets
  • Search

Context Navigation

  • Start Page
  • Index
  • History
  • Last Change

Table of Contents

  1. About this manual
  2. Getting Started
    1. Installation
    2. Import gnrbag module
  3. Basic Bag
    1. How instantate a bag
    2. Setting and getting items
    3. Flat bags VS lists and dictionaries
      1. Duplicated labels
      2. Accessing to items by index
      3. Setting item's position
      4. Dictionary methods implemented by Bag
      5. List methods implemented by Bag
      6. The operator 'in'
      7. How to transform a flat bag in a dictionary
    4. Printing a bag
    5. Bag as a hierarchical container
      1. Bag's path
    6. Bag's attributes
      1. Setting attributes with setItem
      2. Setting attributes with setAttr
      3. Getting attributes
      4. Deleting attributes
      5. Digest method
      6. Attributes in path
    7. Bag merge and update
      1. merge
      2. update
    8. Bag Node
  4. Advanced features
    1. Backward path
      1. Back Reference
    2. Trigger
      1. Trigger on Bag
      2. Trigger on BagNode
    3. Validators
      1. Validation examples
      2. validator function
    4. Bag from/to source
    5. Bag and XML
      1. toXml
      2. from XML
  5. Resolver and dynamic bags
    1. Resolver
      1. Resolver Example 1: TimeResolver
      2. Resolver Example 2: UserInfoResolver
      3. Resolver Example 3: RssFeedResolver
      4. Shortcuts
    2. Bag Formula

Getting Started

Installation

First of all you have to download and unpack the source tar.gz or checkout it from our svn trunk.

Then run the command

python setup.py install

Import gnrbag module

Bag class is within the module gnrbag in the package core. So import it this way

from gnr.core.gnrbag import Bag

Download in other formats:

  • Plain Text

Trac Powered

Powered by Trac 0.11
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/