Back to index

python3.2  3.2.2
Functions | Variables
spwdmodule.c File Reference
#include "Python.h"
#include <sys/types.h>

Go to the source code of this file.

Functions

 PyDoc_STRVAR (spwd__doc__,"This module provides access to the Unix shadow password database.\n\ It is available on various Unix versions.\n\ \n\ Shadow password database entries are reported as 9-tuples of type struct_spwd,\n\ containing the following items from the password database (see `<shadow.h>'):\n\ sp_namp, sp_pwdp, sp_lstchg, sp_min, sp_max, sp_warn, sp_inact, sp_expire, sp_flag.\n\ The sp_namp and sp_pwdp are strings, the rest are integers.\n\ An exception is raised if the entry asked for cannot be found.\n\ You have to be root to be able to use this module.")
PyMODINIT_FUNC PyInit_spwd (void)

Variables

static PyMethodDef spwd_methods []
static struct PyModuleDef

Function Documentation

PyDoc_STRVAR ( spwd__doc__  ,
"This module provides access to the Unix shadow password database.\n\It is available on various Unix versions.\n\\n\Shadow password database entries are reported as 9-tuples of type  struct_spwd,
\n\containing the following items from the password database(see`< shadow.h >'):\n\  sp_namp,
sp_pwdp  ,
sp_lstchg  ,
sp_min  ,
sp_max  ,
sp_warn  ,
sp_inact  ,
sp_expire  ,
sp_flag.\n\The sp_namp and sp_pwdp are  strings,
the rest are integers.\n\An exception is raised if the entry asked for cannot be found.\n\You have to be root to be able to use this module."   
)

Definition at line 193 of file spwdmodule.c.

{
    PyObject *m;
    m=PyModule_Create(&spwdmodule);
    if (m == NULL)
        return NULL;
    if (!initialized)
        PyStructSequence_InitType(&StructSpwdType,
                                  &struct_spwd_type_desc);
    Py_INCREF((PyObject *) &StructSpwdType);
    PyModule_AddObject(m, "struct_spwd", (PyObject *) &StructSpwdType);
    initialized = 1;
    return m;
}

Here is the call graph for this function:


Variable Documentation

struct PyModuleDef [static]
Initial value:
 {
    PyModuleDef_HEAD_INIT,
    "spwd",
    spwd__doc__,
    -1,
    spwd_methods,
    NULL,
    NULL,
    NULL,
    NULL
}

Definition at line 180 of file spwdmodule.c.

Initial value:
 {






    {NULL,              NULL}           
}

Definition at line 168 of file spwdmodule.c.