root / Pi / C / examples / swig / hello.py
Historique | Voir | Annoter | Télécharger (2,18 ko)
| 1 |
# This file was automatically generated by SWIG (http://www.swig.org).
|
|---|---|
| 2 |
# Version 2.0.7
|
| 3 |
#
|
| 4 |
# Do not make changes to this file unless you know what you are doing--modify
|
| 5 |
# the SWIG interface file instead.
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
from sys import version_info |
| 10 |
if version_info >= (2,6,0): |
| 11 |
def swig_import_helper(): |
| 12 |
from os.path import dirname |
| 13 |
import imp |
| 14 |
fp = None
|
| 15 |
try:
|
| 16 |
fp, pathname, description = imp.find_module('_hello', [dirname(__file__)])
|
| 17 |
except ImportError: |
| 18 |
import _hello |
| 19 |
return _hello
|
| 20 |
if fp is not None: |
| 21 |
try:
|
| 22 |
_mod = imp.load_module('_hello', fp, pathname, description)
|
| 23 |
finally:
|
| 24 |
fp.close() |
| 25 |
return _mod
|
| 26 |
_hello = swig_import_helper() |
| 27 |
del swig_import_helper
|
| 28 |
else:
|
| 29 |
import _hello |
| 30 |
del version_info
|
| 31 |
try:
|
| 32 |
_swig_property = property
|
| 33 |
except NameError: |
| 34 |
pass # Python < 2.2 doesn't have 'property'. |
| 35 |
def _swig_setattr_nondynamic(self,class_type,name,value,static=1): |
| 36 |
if (name == "thisown"): return self.this.own(value) |
| 37 |
if (name == "this"): |
| 38 |
if type(value).__name__ == 'SwigPyObject': |
| 39 |
self.__dict__[name] = value
|
| 40 |
return
|
| 41 |
method = class_type.__swig_setmethods__.get(name,None)
|
| 42 |
if method: return method(self,value) |
| 43 |
if (not static): |
| 44 |
self.__dict__[name] = value
|
| 45 |
else:
|
| 46 |
raise AttributeError("You cannot add attributes to %s" % self) |
| 47 |
|
| 48 |
def _swig_setattr(self,class_type,name,value): |
| 49 |
return _swig_setattr_nondynamic(self,class_type,name,value,0) |
| 50 |
|
| 51 |
def _swig_getattr(self,class_type,name): |
| 52 |
if (name == "thisown"): return self.this.own() |
| 53 |
method = class_type.__swig_getmethods__.get(name,None)
|
| 54 |
if method: return method(self) |
| 55 |
raise AttributeError(name) |
| 56 |
|
| 57 |
def _swig_repr(self): |
| 58 |
try: strthis = "proxy of " + self.this.__repr__() |
| 59 |
except: strthis = "" |
| 60 |
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) |
| 61 |
|
| 62 |
try:
|
| 63 |
_object = object
|
| 64 |
_newclass = 1
|
| 65 |
except AttributeError: |
| 66 |
class _object : pass |
| 67 |
_newclass = 0
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
def say_hello(*args): |
| 72 |
return _hello.say_hello(*args)
|
| 73 |
say_hello = _hello.say_hello |
| 74 |
# This file is compatible with both classic and new-style classes.
|
| 75 |
|
| 76 |
|