~ubuntu-branches/ubuntu/trusty/python3.4/trusty-proposed

« back to all changes in this revision

Viewing changes to Lib/ctypes/test/test_errcheck.py

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2013-11-25 09:44:27 UTC
  • Revision ID: package-import@ubuntu.com-20131125094427-lzxj8ap5w01lmo7f
Tags: upstream-3.4~b1
ImportĀ upstreamĀ versionĀ 3.4~b1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import sys
 
2
from ctypes import *
 
3
 
 
4
##class HMODULE(Structure):
 
5
##    _fields_ = [("value", c_void_p)]
 
6
 
 
7
##    def __repr__(self):
 
8
##        return "<HMODULE %s>" % self.value
 
9
 
 
10
##windll.kernel32.GetModuleHandleA.restype = HMODULE
 
11
 
 
12
##print windll.kernel32.GetModuleHandleA("python23.dll")
 
13
##print hex(sys.dllhandle)
 
14
 
 
15
##def nonzero(handle):
 
16
##    return (GetLastError(), handle)
 
17
 
 
18
##windll.kernel32.GetModuleHandleA.errcheck = nonzero
 
19
##print windll.kernel32.GetModuleHandleA("spam")