dl objects





8.5.1 Dl Objects
















Python Library Reference




Previous: 8.5 dl
Up: 8.5 dl
Next: 8.6 dbm





8.5.1 Dl Objects



Dl objects, as returned by open() above, have the
following methods:


close ()

Free all resources, except the memory.



sym (name)

Return the pointer for the function named name, as a number, if
it exists in the referenced shared object, otherwise None. This
is useful in code like:



>>> if a.sym('time'):
... a.call('time')
... else:
... time.time()



(Note that this function will return a non-zero number, as zero is the
NULL pointer)



call (name[, arg1[, arg2...]])

Call the function named name in the referenced shared object.
The arguments must be either Python integers, which will be
passed as is, Python strings, to which a pointer will be passed,
or None, which will be passed as NULL. Note that
strings should only be passed to functions as const char*, as
Python will not like its string mutated.


There must be at most 10 arguments, and arguments not given will be
treated as None. The function's return value must be a C
long, which is a Python integer.







Python Library Reference




Previous: 8.5 dl
Up: 8.5 dl
Next: 8.6 dbm



See About this document... for information on suggesting changes.





Wyszukiwarka

Podobne podstrony:
stream writer objects
ObjectImpl
function hwapi object remove
110 Amazing Magic Tricks With Everyday Objects
Glee S01E17 Bad Reputation 720p WEB DL DD5 1 h 264 LP(1)
function pg fetch object
Object
subject object questions
Thor The Dark World 2013 720p WEB DL H264 WEBiOS
How I Met Your Mother S09E10 Mom and Dad WEB DL x264 AAC
Object
bltin code objects
PrettyPrinter Objects
content handler objects
ObjectStreamField
ulotka DL
event objects
craft objects

więcej podobnych podstron