# SNESPythonSetType
Initialize a `SNES` object implemented in Python. 
## Synopsis
```
#include "petscsnes.h" 
PetscErrorCode SNESPythonSetType(SNES snes, const char pyname[])
```
Collective on snes


## Input Parameters

- ***snes -*** the nonlinear solver (`SNES`) context.
- ***pyname -*** full dotted Python name [package].module[.{class|function}]



## Options Database Key

- ***-snes_python_type <pyname> -*** python class





## See Also
 `SNESCreate()`, `SNESSetType()`, `SNESPYTHON`, `PetscPythonInitialize()`, `SNESPythonGetType()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/impls/python/pythonsnes.c.html#SNESPythonSetType">src/snes/impls/python/pythonsnes.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/snes/impls/python/pythonsnes.c)


[Index of all SNES routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
