Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
35b90202
Kaydet (Commit)
35b90202
authored
Haz 11, 2008
tarafından
Thomas Heller
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Smaller doc fixes.
üst
2e9675ad
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
ctypes.rst
Doc/library/ctypes.rst
+4
-7
No files found.
Doc/library/ctypes.rst
Dosyayı görüntüle @
35b90202
...
@@ -1706,9 +1706,7 @@ the windows header file is this::
...
@@ -1706,9 +1706,7 @@ the windows header file is this::
LPCSTR lpCaption,
LPCSTR lpCaption,
UINT uType);
UINT uType);
Here is the wrapping with ``ctypes``:
Here is the wrapping with ``ctypes``::
::
>>> from ctypes import c_int, WINFUNCTYPE, windll
>>> from ctypes import c_int, WINFUNCTYPE, windll
>>> from ctypes.wintypes import HWND, LPCSTR, UINT
>>> from ctypes.wintypes import HWND, LPCSTR, UINT
...
@@ -1733,9 +1731,7 @@ function retrieves the dimensions of a specified window by copying them into
...
@@ -1733,9 +1731,7 @@ function retrieves the dimensions of a specified window by copying them into
HWND hWnd,
HWND hWnd,
LPRECT lpRect);
LPRECT lpRect);
Here is the wrapping with ``ctypes``:
Here is the wrapping with ``ctypes``::
::
>>> from ctypes import POINTER, WINFUNCTYPE, windll, WinError
>>> from ctypes import POINTER, WINFUNCTYPE, windll, WinError
>>> from ctypes.wintypes import BOOL, HWND, RECT
>>> from ctypes.wintypes import BOOL, HWND, RECT
...
@@ -1758,6 +1754,7 @@ do the error checking, and raises an exception when the api call failed::
...
@@ -1758,6 +1754,7 @@ do the error checking, and raises an exception when the api call failed::
... if not result:
... if not result:
... raise WinError()
... raise WinError()
... return args
... return args
...
>>> GetWindowRect.errcheck = errcheck
>>> GetWindowRect.errcheck = errcheck
>>>
>>>
...
@@ -1772,7 +1769,7 @@ instead, the normal processing will no longer take place::
...
@@ -1772,7 +1769,7 @@ instead, the normal processing will no longer take place::
... raise WinError()
... raise WinError()
... rc = args[1]
... rc = args[1]
... return rc.left, rc.top, rc.bottom, rc.right
... return rc.left, rc.top, rc.bottom, rc.right
>>>
...
>>> GetWindowRect.errcheck = errcheck
>>> GetWindowRect.errcheck = errcheck
>>>
>>>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment