Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion NameValuePairList erase method ...
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post will appear after it is approved by moderators
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
dermont  
View profile  
 More options Sep 14 2010, 1:15 am
From: dermont <dermontg...@gmail.com>
Date: Mon, 13 Sep 2010 22:15:35 -0700 (PDT)
Local: Tues, Sep 14 2010 1:15 am
Subject: Re: NameValuePairList erase method ...
I thought NameValuePairList was already exposed as a python
dictionary, can you simply not remove a key by:

>>del nv['MyKey']

On Sep 14, 12:53 pm, andy miller <a...@kiwisoft.com> wrote:
> Probably a limitation of the boost implementation that I'd need to look at
> -- would be great if you could add it to the bug tracker on sourceforce...

> In the mean time you might want to think about keeping a regular python
> dictionary as your 'master' and creating a NameValuePair based upon that
> dictionary each time you use it..  Not as efficient but should serve as a
> work around...

> Regards
> Andy

> On Tue, Sep 14, 2010 at 8:48 AM, futnuh <dar...@edmstudio.com> wrote:
> > I'm trying to remove a key from an existing NameValuePairList.   I
> > believe python-ogre isn't exposing the erase method ...

> > Inhttp://www.ogre3d.org/docs/api/html/OgreCommon_8h_source.html
> > 00524     typedef map<String, String>::type NameValuePairList;

> > STL's map
> >http://www.cplusplus.com/reference/stl/map/erase/

> > >>> import ogre.renderer.OGRE as ogre
> > >>> nv = ogre.NameValuePairList()
> > >>> dir(nv)
> > ['NameValuePairList_entry', '__class__', '__contains__',
> > '__delattr__', '__delitem__', '__dict__', '__doc__', '__format__',
> > '__getattribute__', '__getitem__', '__hash__', '__init__',
> > '__instance_size__', '__iter__', '__len__', '__module__', '__new__',
> > '__reduce__', '__reduce_ex__', '__repr__', '__setattr__',
> > '__setitem__', '__sizeof__', '__str__', '__subclasshook__',
> > '__weakref__', 'count', 'has_key', 'insert', 'keys']
> > >>> nv.erase
> > Traceback (most recent call last):
> >  File "<stdin>", line 1, in <module>
> > AttributeError: 'NameValuePairList' object has no attribute 'erase'

> > Cheers,
> > Darran.

> > --
> > You received this message because you are subscribed to the Google Groups
> > "Python Ogre Developers" group.
> > To post to this group, send email to
> > python-ogre-developers@googlegroups.com.
> > To unsubscribe from this group, send email to
> > python-ogre-developers+unsubscribe@googlegroups.com<python-ogre-developers% 2Bunsubscribe@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/python-ogre-developers?hl=en.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.