~ubuntu-branches/ubuntu/gutsy/blender/gutsy-security

« back to all changes in this revision

Viewing changes to source/blender/python/api2_2x/Sys.h

  • Committer: Bazaar Package Importer
  • Author(s): Florian Ernst
  • Date: 2005-11-06 12:40:03 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051106124003-3pgs7tcg5rox96xg
Tags: 2.37a-1.1
* Non-maintainer upload.
* Split out parts of 01_SConstruct_debian.dpatch again: root_build_dir
  really needs to get adjusted before the clean target runs - closes: #333958,
  see #288882 for reference

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* 
 
2
 * $Id: Sys.h,v 1.6 2004/10/07 19:25:40 stiv Exp $
2
3
 *
3
4
 * ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
4
5
 *
32
33
#ifndef EXPP_sys_H
33
34
#define EXPP_sys_H
34
35
 
35
 
#include <Python.h>
36
 
#include <BLI_blenlib.h> /* for BLI_last_slash() */
37
 
#include "gen_utils.h"
38
 
#include "modules.h"
39
 
 
40
 
/*****************************************************************************/
41
 
/* Python API function prototypes for the sys module.                        */
42
 
/*****************************************************************************/
43
 
static PyObject *M_sys_basename (PyObject *self, PyObject *args);
44
 
static PyObject *M_sys_dirname (PyObject *self, PyObject *args);
45
 
static PyObject *M_sys_splitext (PyObject *self, PyObject *args);
46
 
static PyObject *M_sys_time (PyObject *self);
47
 
 
48
 
/*****************************************************************************/
49
 
/* The following string definitions are used for documentation strings.      */
50
 
/* In Python these will be written to the console when doing a               */
51
 
/* Blender.sys.__doc__                                                       */
52
 
/*****************************************************************************/
53
 
static char M_sys_doc[] =
54
 
"The Blender.sys submodule\n\
55
 
\n\
56
 
This is a minimal system module to supply simple functionality available\n\
57
 
in the default Python module os.";
58
 
 
59
 
static char M_sys_basename_doc[]="(path) - Split 'path' in dir and filename.\n\
60
 
Return the filename.";
61
 
 
62
 
static char M_sys_dirname_doc[]="(path) - Split 'path' in dir and filename.\n\
63
 
Return the dir.";
64
 
 
65
 
static char M_sys_splitext_doc[]="(path) - Split 'path' in root and \
66
 
extension:\n/this/that/file.ext -> ('/this/that/file','.ext').\n\
67
 
Return the pair (root, extension).";
68
 
 
69
 
static char M_sys_time_doc[]="() - Return a float representing time elapsed \
70
 
in seconds.\n\
71
 
Each successive call is garanteed to return values greater than or\n\
72
 
equal to the previous call.";
73
 
 
74
 
/*****************************************************************************/
75
 
/* Python method structure definition for Blender.sys module:                */
76
 
/*****************************************************************************/
77
 
struct PyMethodDef M_sys_methods[] = {
78
 
  {"basename",    M_sys_basename,        METH_VARARGS, M_sys_basename_doc},
79
 
  {"dirname",     M_sys_dirname,         METH_VARARGS, M_sys_dirname_doc},
80
 
  {"splitext",    M_sys_splitext,        METH_VARARGS, M_sys_splitext_doc},
81
 
  {"time", (PyCFunction)M_sys_time,      METH_NOARGS,  M_sys_time_doc},
82
 
  {NULL, NULL, 0, NULL}
83
 
};
84
 
 
85
 
#endif /* EXPP_sys_H */
 
36
PyObject *sys_Init( void );
 
37
 
 
38
#endif                          /* EXPP_sys_H */