Getting all groups but not 'AuthenticatedUsers'

I use:

members_groups =
all_groups = ',  '.join(str(e) for e in member_groups[0:])

( which shows something like 'Member of football, tennis', 'etc' in a browser

Is there a syntax for getting every group but not 'AuthenticatedUsers' (it is a Virtual Group'.)
(instead of searching for it and removing it ):

yeah, list.remove:

>>> groups = ['AuthenticatedUsers','Monkey', 'Nut', 'Fire']
>>> groups.remove('AuthenticatedUsers')
>>> groups
['Monkey', 'Nut', 'Fire']


I was a bit unsure if 'AuthenticatedUsers' could end up being translated somewhere, or if groups are:

 groups = ['AuthenticatedUsers','Monkey', 'Nut', 'Fire']


groups = [< Some Groups Object>, < Some other object>]

EDIT the above line had disappeared.

Makes no sense..the API does not exposed ids or whatever in a translated should know this.

groups = gives group=

[< GroupData at /xxx/portal_groupdata/AuthenticatedUsers used for /xxx/acl_users>,  
  <GroupData at /xxx/portal_groupdata/ABC used for /dgh/acl_users/source_groups>]

So, to remove it I need to convert it to string somehow ??
Something like this would work, but it looks very clumsy…

groups =   
grup = ' '.join(str(e) for e in groups).split()
group = ', '.join(str(e) for e in grup)

Why are you joining the names and then splitting it again?
Just do this:

groups = 
groups = [e.getGroupName() for e in groups]
groups = ','.join(groups)

Unsure about the e.getGroupName() stuff, though. It might be, or something like that.

because I did not think/know of doing it the e.getGroupName way… so I ended up with an 'id that changed'. :blush:

Thanks for your help

Oh, not that, but the grup = ' '.join(str(e) for e in groups).split() bit :smiley:
grup = [str(e) for e in groups] is the same :slight_smile: