PyList_Append( list, PyString_FromString( name.latin1() ) );
PyList_AppendStolen( list, PyString_FromString( name.latin1() ) );
static PyObject* wpItem_getAttr( wpItem* self, char* name ){	// Special Python things	/*		\rproperty item.content A list of all items inside of the container.	*/	if ( !strcmp( "content", name ) )	{		const ContainerContent &content = self->pItem->content();		PyObject* list = PyList_New( content.count() );		unsigned int i = 0;		for ( ContainerIterator it( content ); !it.atEnd(); ++it )			PyList_SetItem( list, i++, PyGetItemObject( *it ) );		return list;	}	/*		\rproperty item.tags A list of all tag names the object currently has.	*/	else if ( !strcmp( "tags", name ) )	{		// Return a list with the keynames		PyObject* list = PyList_New( 0 );		QStringList tags = self->pItem->getTags();		for ( QStringList::iterator it = tags.begin(); it != tags.end(); ++it )		{			QString name = *it;			if ( !name.isEmpty() )			{				PyList_Append( list, PyString_FromString( name.latin1() ) );			}		}		return list;	}	/*		\rproperty item.objects If the item is a multi object, this is a list of objects that are within		the multi. If it's not a multi, this property is None.	*/	else if ( !strcmp( "objects", name ) )	{		cMulti* multi = dynamic_cast<cMulti*>( self->pItem );		if ( !multi )		{			Py_RETURN_NONE;		}		const QPtrList<cUObject>& objects = multi->getObjects();		PyObject* tuple = PyTuple_New( objects.count() );		QPtrList<cUObject>::const_iterator it( objects.begin() );		unsigned int i = 0;		for ( ; it != objects.end(); ++it )		{			PyTuple_SetItem( tuple, i++, ( *it )->getPyObject() );		}		return tuple;	}	/*		\rproperty item.scripts Returns a list of all script names the object has.	*/	else if ( !strcmp( "scripts", name ) )	{		QStringList events = QStringList::split( ",", self->pItem->scriptList() );		if ( self->pItem->basedef() )		{			const QPtrList<cPythonScript> &list = self->pItem->basedef()->baseScripts();			QPtrList<cPythonScript>::const_iterator it( list.begin() );			while ( it != list.end() )			{				events.append( ( *it )->name() );				++it;			}		}		PyObject* list = PyList_New( events.count() );		for ( uint i = 0; i < events.count(); ++i )			PyList_SetItem( list, i, PyString_FromString( events[i].latin1() ) );		return list;	}	else	{		PyObject* result = self->pItem->getProperty( name );		if ( result )		{			return result;		}	}	return Py_FindMethod( wpItemMethods, ( PyObject * ) self, name );}