# TaoPythonSetType
Initialize a Tao object implemented in Python. 
## Synopsis
```
#include "petsctao.h" 
PetscErrorCode TaoPythonSetType(Tao tao, const char pyname[])
```
Collective


## Input Parameters

- ***tao -*** the optimation solver (Tao) context.
- ***pyname -*** full dotted Python name [package].module[.{class|function}]



## Options Database Key

- ***-tao_python_type <pyname> -*** python class





## See Also
 `TaoCreate()`, `TaoSetType()`, `TAOPYTHON`, `PetscPythonInitialize()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/python/pythontao.c.html#TaoPythonSetType">src/tao/python/pythontao.c</A>


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


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