Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(65603)

Delta Between Two Patch Sets: Doc/library/ctypes.rst

Issue 21042: ctypes.util.find_library() should return full pathname instead of filename in linux
Left Patch Set: Created 3 years, 8 months ago
Right Patch Set: Created 3 years, 8 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | Lib/ctypes/test/test_find.py » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 :mod:`ctypes` --- A foreign function library for Python 1 :mod:`ctypes` --- A foreign function library for Python
2 ======================================================= 2 =======================================================
3 3
4 .. module:: ctypes 4 .. module:: ctypes
5 :synopsis: A foreign function library for Python. 5 :synopsis: A foreign function library for Python.
6 .. moduleauthor:: Thomas Heller <theller@python.net> 6 .. moduleauthor:: Thomas Heller <theller@python.net>
7 7
8 8
9 :mod:`ctypes` is a foreign function library for Python. It provides C compatibl e 9 :mod:`ctypes` is a foreign function library for Python. It provides C compatibl e
10 data types, and allows calling functions in DLLs or shared libraries. It can be 10 data types, and allows calling functions in DLLs or shared libraries. It can be
(...skipping 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after
1249 be found, returns ``None``. 1249 be found, returns ``None``.
1250 1250
1251 The exact functionality is system dependent. 1251 The exact functionality is system dependent.
1252 1252
1253 On Linux, :func:`find_library` tries to run external programs 1253 On Linux, :func:`find_library` tries to run external programs
1254 (``/sbin/ldconfig``, ``gcc``, and ``objdump``) to find the library file. It 1254 (``/sbin/ldconfig``, ``gcc``, and ``objdump``) to find the library file. It
1255 returns the absolute path of the library file. Here are some examples:: 1255 returns the absolute path of the library file. Here are some examples::
1256 1256
1257 >>> from ctypes.util import find_library 1257 >>> from ctypes.util import find_library
1258 >>> find_library("m") 1258 >>> find_library("m")
1259 '/lib/i386-linux-gnu/libm.so.6' 1259 '/lib/x86_64-linux-gnu/libm.so.6'
1260 >>> find_library("c") 1260 >>> find_library("c")
1261 '/lib/i386-linux-gnu/libc.so.6' 1261 '/lib/x86_64-linux-gnu/libc.so.6'
1262 >>> find_library("bz2") 1262 >>> find_library("bz2")
1263 '/lib/x86_64-linux-gnu/libbz2.so.1.0' 1263 '/lib/x86_64-linux-gnu/libbz2.so.1.0'
1264 >>> 1264 >>>
1265 1265
1266 On OS X, :func:`find_library` tries several predefined naming schemes and paths 1266 On OS X, :func:`find_library` tries several predefined naming schemes and paths
1267 to locate the library, and returns a full pathname if successful:: 1267 to locate the library, and returns a full pathname if successful::
1268 1268
1269 >>> from ctypes.util import find_library 1269 >>> from ctypes.util import find_library
1270 >>> find_library("c") 1270 >>> find_library("c")
1271 '/usr/lib/libc.dylib' 1271 '/usr/lib/libc.dylib'
(...skipping 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after
2450 2450
2451 .. attribute:: _type_ 2451 .. attribute:: _type_
2452 2452
2453 Specifies the type pointed to. 2453 Specifies the type pointed to.
2454 2454
2455 .. attribute:: contents 2455 .. attribute:: contents
2456 2456
2457 Returns the object to which to pointer points. Assigning to this 2457 Returns the object to which to pointer points. Assigning to this
2458 attribute changes the pointer to point to the assigned object. 2458 attribute changes the pointer to point to the assigned object.
2459 2459
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+