def create_player(key, email, password, typeclass=None, is_superuser=False, locks=None, permissions=None, report_to=None):
 global _PlayerDB
 if (not _PlayerDB):
  from evennia.players.models import PlayerDB as _PlayerDB
 typeclass = (typeclass if typeclass else settings.BASE_PLAYER_TYPECLASS)
 if isinstance(typeclass, basestring):
  typeclass = class_from_module(typeclass, settings.TYPECLASS_PATHS)
 if (not email):
  email = 'dummy@dummy.com'
 if _PlayerDB.objects.filter(username__iexact=key):
  raise ValueError(("A Player with the name '%s' already exists." % key))
 report_to = dbid_to_obj(report_to, _PlayerDB)
 now = timezone.now()
 email = typeclass.objects.normalize_email(email)
 new_player = typeclass(username=key, email=email, is_staff=is_superuser, is_superuser=is_superuser, last_login=now, date_joined=now)
 new_player.set_password(password)
 new_player._createdict = {'locks': locks, 'permissions': permissions, 'report_to': report_to}
 new_player.save()
 return new_player

def create_player ( key , email , password , typeclass = None , is_superuser = False , locks = None , permissions = None , report_to = None ) : global _PlayerDB if ( not _PlayerDB ) : from evennia . players . models import PlayerDB as _PlayerDB typeclass = ( typeclass if typeclass else settings . BASE_PLAYER_TYPECLASS ) if isinstance ( typeclass , basestring ) : typeclass = class_from_module ( typeclass , settings . TYPECLASS_PATHS ) if ( not email ) : email = 'dummy@dummy.com' if _PlayerDB . objects . filter ( username__iexact = key ) : raise ValueError ( ( "A Player with the name '%s' already exists." % key ) ) report_to = dbid_to_obj ( report_to , _PlayerDB ) now = timezone . now ( ) email = typeclass . objects . normalize_email ( email ) new_player = typeclass ( username = key , email = email , is_staff = is_superuser , is_superuser = is_superuser , last_login = now , date_joined = now ) new_player . set_password ( password ) new_player . _createdict = { 'locks' : locks , 'permissions' : permissions , 'report_to' : report_to } new_player . save ( ) return new_player
this creates a new player .