• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email

All Samples(877)  |  Call(676)  |  Derive(1)  |  Import(200)
No Document.

src/g/e/gefira-HEAD/trunk/mq/code/python/gefira/mq/ai.py   gefira(Download)
"""
 
import warnings
from ctypes import c_long, byref, create_string_buffer, POINTER, c_int
 
from gefira.mq.common import lib, MQException, Connection, TREAT_WARNINGS_AS_ERRORS
from gefira.mq.cmqc import (MQCA_Q_NAME, MQHO_NONE, MQIA_CURRENT_Q_DEPTH, 
    def __init__(self, call_name, ignore_warnings=[]):
        self.call_name = call_name
        self.cc = c_long()
        self.rc = c_long()
        self.ignore_warnings = ignore_warnings
 
    def __enter__(self):
    def __init__(self, call_name, response_bag):
        super(_MQAIExecute,self).__init__(call_name)
 
        self.response_bag = response_bag
        self.nested_cc = c_long()
        self.nested_rc = c_long()
 
    def __enter__(self):
        return self.cc, self.rc
 
    def __exit__(self, exc_type, exc_value, traceback):
        if self.cc.value == MQCC_FAILED and self.rc.value == MQRCCF_COMMAND_FAILED:
            # Doh, the command failed, dig into details
            error_bag = c_long(MQHB_UNUSABLE_HBAG)
    def execute(self, command, filter={}, query=[], timeout=None, admin_queue=None, 
                    response_queue=None, strip_strings=True):
        admin_bag = c_long(MQHB_UNUSABLE_HBAG)
        response_bag = c_long(MQHB_UNUSABLE_HBAG)
        attrs_bag = c_long(MQHB_UNUSABLE_HBAG)
 
        with MQAICall("mqCreateBag") as (cc, rc):
                 byref(rc))
 
        if timeout:
            options_bag = c_long(MQHB_UNUSABLE_HBAG)
            with MQAICall("mqCreateBag") as (cc, rc):
                lib.mqCreateBag(MQCBO_ADMIN_BAG, byref(options_bag), byref(cc), 
                    byref(rc))
                            response_bag, MQHO_NONE, MQHO_NONE, byref(cc), 
                            byref(rc))
 
        number_of_bags = c_long()
        with MQAICall("mqCountItems") as (cc,rc):
            lib.mqCountItems(response_bag, MQHA_BAG_HANDLE, 
                                byref(number_of_bags), byref(cc), byref(rc))

src/g/e/gefira-HEAD/mq/code/python/gefira/mq/ai.py   gefira(Download)
"""
 
import warnings
from ctypes import c_long, byref, create_string_buffer, POINTER, c_int
 
from gefira.mq.common import lib, MQException, Connection, TREAT_WARNINGS_AS_ERRORS
from gefira.mq.cmqc import (MQCA_Q_NAME, MQHO_NONE, MQIA_CURRENT_Q_DEPTH, 
    def __init__(self, call_name, ignore_warnings=[]):
        self.call_name = call_name
        self.cc = c_long()
        self.rc = c_long()
        self.ignore_warnings = ignore_warnings
 
    def __enter__(self):
    def __init__(self, call_name, response_bag):
        super(_MQAIExecute,self).__init__(call_name)
 
        self.response_bag = response_bag
        self.nested_cc = c_long()
        self.nested_rc = c_long()
 
    def __enter__(self):
        return self.cc, self.rc
 
    def __exit__(self, exc_type, exc_value, traceback):
        if self.cc.value == MQCC_FAILED and self.rc.value == MQRCCF_COMMAND_FAILED:
            # Doh, the command failed, dig into details
            error_bag = c_long(MQHB_UNUSABLE_HBAG)
    def execute(self, command, filter={}, query=[], timeout=None, admin_queue=None, 
                    response_queue=None, strip_strings=True):
        admin_bag = c_long(MQHB_UNUSABLE_HBAG)
        response_bag = c_long(MQHB_UNUSABLE_HBAG)
        attrs_bag = c_long(MQHB_UNUSABLE_HBAG)
 
        with MQAICall("mqCreateBag") as (cc, rc):
                 byref(rc))
 
        if timeout:
            options_bag = c_long(MQHB_UNUSABLE_HBAG)
            with MQAICall("mqCreateBag") as (cc, rc):
                lib.mqCreateBag(MQCBO_ADMIN_BAG, byref(options_bag), byref(cc), 
                    byref(rc))
                            response_bag, MQHO_NONE, MQHO_NONE, byref(cc), 
                            byref(rc))
 
        number_of_bags = c_long()
        with MQAICall("mqCountItems") as (cc,rc):
            lib.mqCountItems(response_bag, MQHA_BAG_HANDLE, 
                                byref(number_of_bags), byref(cc), byref(rc))

src/c/o/cogen-0.2.1/cogen/core/proactors/ctypes_iocp_impl/api_wrappers.py   cogen(Download)
from ctypes import WINFUNCTYPE, GetLastError, \
            windll, pythonapi, cast, WinError, create_string_buffer, \
            c_ushort, c_ubyte, c_char, WINFUNCTYPE, c_short, c_ubyte, \
            c_int, c_uint, c_long, c_ulong, c_void_p, byref, c_char_p, \
            Structure, Union, py_object, POINTER, pointer, sizeof, string_at
 
from ctypes.wintypes import HANDLE, ULONG, DWORD, BOOL, LPCSTR, LPCWSTR, WinError

src/p/y/pyvisa-HEAD/trunk/src/vpp43.py   pyvisa(Download)
from vpp43_types import *
from vpp43_attributes import attributes
import os
from ctypes import byref, cdll, c_void_p, c_double, c_long, \
    create_string_buffer, POINTER
if os.name == 'nt':
    from ctypes import windll, WINFUNCTYPE as FUNCTYPE
        if isinstance(argument, float):
            converted_arguments.append(c_double(argument))
        elif isinstance(argument, int):
            converted_arguments.append(c_long(argument))
        elif isinstance(argument, str):    
            converted_arguments.append(argument)
        else:
def install_handler(vi, event_type, handler, user_handle = None):
    if user_handle is None:
        converted_user_handle = None
    else:
        if isinstance(user_handle, int):
            converted_user_handle = c_long(user_handle)
        elif isinstance(user_handle, float):

src/p/y/pyvisa-HEAD/src/vpp43.py   pyvisa(Download)
from vpp43_types import *
from vpp43_attributes import attributes
import os
from ctypes import byref, cdll, c_void_p, c_double, c_long, \
    create_string_buffer, POINTER
if os.name == 'nt':
    from ctypes import windll, WINFUNCTYPE as FUNCTYPE
        if isinstance(argument, float):
            converted_arguments.append(c_double(argument))
        elif isinstance(argument, int):
            converted_arguments.append(c_long(argument))
        elif isinstance(argument, str):    
            converted_arguments.append(argument)
        else:
def install_handler(vi, event_type, handler, user_handle = None):
    if user_handle is None:
        converted_user_handle = None
    else:
        if isinstance(user_handle, int):
            converted_user_handle = c_long(user_handle)
        elif isinstance(user_handle, float):

src/p/y/PyVISA-1.3/src/vpp43.py   PyVISA(Download)
from vpp43_types import *
from vpp43_attributes import attributes
import os
from ctypes import byref, cdll, c_void_p, c_double, c_long, \
    create_string_buffer, POINTER
if os.name == 'nt':
    from ctypes import windll, WINFUNCTYPE as FUNCTYPE
        if isinstance(argument, float):
            converted_arguments.append(c_double(argument))
        elif isinstance(argument, int):
            converted_arguments.append(c_long(argument))
        elif isinstance(argument, str):    
            converted_arguments.append(argument)
        else:
def install_handler(vi, event_type, handler, user_handle = None):
    if user_handle is None:
        converted_user_handle = None
    else:
        if isinstance(user_handle, int):
            converted_user_handle = c_long(user_handle)
        elif isinstance(user_handle, float):

src/q/t/qtaste-HEAD/trunk/demo/pywinauto-0.3.8/pywinauto/win32structures.py   qtaste(Download)
from win32defines import LF_FACESIZE, NMTTDISPINFOW_V1_SIZE, HDITEMW_V1_SIZE
 
import ctypes
from ctypes import \
    c_int, c_uint, c_long, c_ulong, c_void_p, c_wchar, c_char, \
    c_ubyte, c_ushort, c_wchar_p, \
    POINTER, sizeof, alignment, Union

src/d/r/dragonfly-0.6.5/dragonfly/actions/action_mouse.py   dragonfly(Download)
import time
import win32con
import win32gui
from ctypes             import windll, pointer, c_long, c_ulong, Structure
from .sendinput         import MouseInput, make_input_array, send_input_array
from .action_base       import DynStrActionBase, ActionError
from ..windows.window   import Window
def set_cursor_position(x, y):
    result = windll.user32.SetCursorPos(c_long(int(x)), c_long(int(y)))
    if result:  return False
    else:       return True
 
 
#---------------------------------------------------------------------------

src/q/t/qtaste-HEAD/demo/pywinauto-0.3.8/pywinauto/win32structures.py   qtaste(Download)
from win32defines import LF_FACESIZE, NMTTDISPINFOW_V1_SIZE, HDITEMW_V1_SIZE
 
import ctypes
from ctypes import \
    c_int, c_uint, c_long, c_ulong, c_void_p, c_wchar, c_char, \
    c_ubyte, c_ushort, c_wchar_p, \
    POINTER, sizeof, alignment, Union

src/p/y/pyia-HEAD/pyia/accessible.py   pyia(Download)
import new
import types
from comtypes.automation import VARIANT, VT_I4, VT_DISPATCH
from ctypes import c_long, oledll, byref, create_unicode_buffer
from comtypes.gen.Accessibility import IAccessible
from comtypes import named_property, COMError, hresult
from constants import CHILDID_SELF, \
    def __iter__(self):
        accChildCount = self.accChildCount
        VariantArrayType = VARIANT * accChildCount
        rgvarChildren = VariantArrayType()
        pcObtained = c_long()
        try:
            oledll.oleacc.AccessibleChildren(self, 0, accChildCount, 
                                             rgvarChildren, byref(pcObtained))
        except:
            pcObtained = c_long(0)

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next