[pytango] 56/483: final changes to fix #3374026
Sandor Bodo-Merle
sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:14:24 UTC 2017
This is an automated email from the git hooks/post-receive script.
sbodomerle-guest pushed a commit to annotated tag bliss_8.10
in repository pytango.
commit 6f3e17c85ea8dc7f4ce4789efa00ec9c861a5c42
Author: tiagocoutinho <tiagocoutinho at 4e9c00fd-8f2e-0410-aa12-93ce3db5e235>
Date: Mon Nov 14 12:02:29 2011 +0000
final changes to fix #3374026
git-svn-id: http://svn.code.sf.net/p/tango-cs/code/bindings/PyTango/trunk@18369 4e9c00fd-8f2e-0410-aa12-93ce3db5e235
---
PyTango/__init__.py | 148 ++++++++++++++++++++++++++++++++++++-----------
PyTango/device_proxy.py | 39 +++++++++++++
PyTango/device_server.py | 12 ++--
PyTango/pytango_init.py | 6 +-
PyTango/release.py | 2 +
setup.py | 2 +
6 files changed, 165 insertions(+), 44 deletions(-)
diff --git a/PyTango/__init__.py b/PyTango/__init__.py
index b68ff8c..4189e71 100644
--- a/PyTango/__init__.py
+++ b/PyTango/__init__.py
@@ -28,10 +28,63 @@ Documentation for this package can be found online:
http://www.tango-controls.org/static/PyTango/latest/doc/html/index.html
"""
+__all__ = [ 'AccessControlType', 'ApiUtil', 'ArchiveEventInfo',
+'ArchiveEventProp', 'ArgType', 'AsynCall', 'AsynReplyNotArrived', 'AttReqType',
+'Attr', 'AttrConfEventData', 'AttrData', 'AttrDataFormat', 'AttrList',
+'AttrProperty', 'AttrQuality', 'AttrReadEvent', 'AttrSerialModel',
+'AttrWriteType', 'AttrWrittenEvent', 'Attribute', 'AttributeAlarm',
+'AttributeAlarmInfo', 'AttributeConfig', 'AttributeConfig_2',
+'AttributeConfig_3', 'AttributeDimension', 'AttributeEventInfo',
+'AttributeInfo', 'AttributeInfoEx', 'AttributeInfoList', 'AttributeInfoListEx',
+'AttributeList', 'AttributeProxy', 'ChangeEventInfo', 'ChangeEventProp',
+'CmdArgType', 'CmdDoneEvent', 'CommandInfo', 'CommandInfoList',
+'CommunicationFailed', 'Connection', 'ConnectionFailed',
+'ConstDevString', 'DServer', 'DataReadyEventData', 'Database', 'DbData',
+'DbDatum', 'DbDevExportInfo', 'DbDevExportInfos', 'DbDevImportInfo',
+'DbDevImportInfos', 'DbDevInfo', 'DbDevInfos', 'DbHistory',
+'DbHistoryList', 'DbServerInfo', 'DebugIt', 'DevBoolean', 'DevCommandInfo',
+'DevDouble', 'DevEncoded', 'DevError', 'DevFailed', 'DevFloat', 'DevInt',
+'DevLong', 'DevLong64', 'DevShort', 'DevSource', 'DevState', 'DevString',
+'DevUChar', 'DevULong', 'DevULong64', 'DevUShort', 'DevVarBooleanArray',
+'DevVarCharArray', 'DevVarDoubleArray', 'DevVarDoubleStringArray',
+'DevVarFloatArray', 'DevVarLong64Array', 'DevVarLongArray',
+'DevVarLongStringArray', 'DevVarShortArray', 'DevVarStringArray',
+'DevVarULong64Array', 'DevVarULongArray', 'DevVarUShortArray',
+'DevVoid', 'DeviceAttribute', 'DeviceAttributeConfig',
+'DeviceAttributeHistory', 'DeviceClass', 'DeviceData', 'DeviceDataHistory',
+'DeviceDataHistoryList', 'DeviceImpl', 'DeviceInfo', 'DeviceProxy',
+'DeviceUnlocked', 'Device_2Impl', 'Device_3Impl', 'Device_4Impl',
+'DispLevel', 'EncodedAttribute', 'ErrSeverity', 'ErrorIt',
+'EventData', 'EventProperties', 'EventSystemFailed', 'EventType',
+'Except', 'ExtractAs', 'FMT_UNKNOWN', 'FatalIt', 'Group', 'GroupAttrReply',
+'GroupAttrReplyList', 'GroupCmdReply', 'GroupCmdReplyList', 'GroupElement',
+'GroupReply', 'GroupReplyList', 'IMAGE', 'ImageAttr', 'InfoIt',
+'KeepAliveCmdCode', 'Level', 'LockCmdCode', 'LockerInfo', 'LockerLanguage',
+'LogIt', 'LogLevel', 'LogTarget', 'Logger', 'Logging', 'MessBoxType',
+'MultiAttribute', 'MultiClassAttribute', 'NamedDevFailed',
+'NamedDevFailedList', 'NonDbDevice', 'NonSupportedFeature',
+'NotAllowed', 'NumpyType', 'PeriodicEventInfo', 'PeriodicEventProp',
+'PollCmdCode', 'PollDevice',
+'PollObjType', 'READ', 'READ_WITH_WRITE', 'READ_WRITE', 'Release', 'SCALAR',
+'SPECTRUM', 'SerialModel', 'SpectrumAttr', 'StdDoubleVector',
+'StdGroupAttrReplyVector', 'StdGroupCmdReplyVector', 'StdGroupReplyVector',
+'StdLongVector', 'StdNamedDevFailedVector', 'StdStringVector', 'SubDevDiag',
+'TangoStream', 'TimeVal', 'UserDefaultAttrProp', 'Util', 'WAttribute',
+'WRITE', 'WarnIt', 'WrongData', 'WrongNameSyntax', '__version__',
+'__version_description__', '__version_info__', '__version_long__',
+'__version_number__', 'alarm_flags', 'asyn_req_type', 'cb_sub_model',
+'class_factory', 'class_list', 'constants', 'constructed_class',
+'cpp_class_list', 'delete_class_list', 'get_class', 'get_classes',
+'get_constructed_class', 'get_constructed_classes', 'get_cpp_class',
+'get_cpp_classes', 'isBufferLikeType', 'is_array_type', 'is_float_type',
+'is_int_type', 'is_numerical_type', 'is_scalar_type', 'numpy_image',
+'numpy_spectrum', 'numpy_type', 'obj_2_str', 'raise_asynch_exception',
+'seqStr_2_obj']
+
__docformat__ = "restructuredtext"
try:
- from _PyTango import *
+ from _PyTango import DeviceProxy
except ImportError, ie:
if not ie.args[0].count("_PyTango"):
raise ie
@@ -45,11 +98,50 @@ except ImportError, ie:
import sys
sys.exit(1)
-ArgType = _PyTango.CmdArgType
+from _PyTango import \
+ (AccessControlType, ApiUtil, ArchiveEventInfo,
+ AsynCall, AsynReplyNotArrived, AttReqType, Attr, AttrConfEventData,
+ AttrDataFormat, AttrList, AttrProperty, AttrQuality, AttrReadEvent,
+ AttrSerialModel, AttrWriteType, AttrWrittenEvent, Attribute,
+ AttributeAlarmInfo, AttributeDimension, AttributeEventInfo, AttributeInfo,
+ AttributeInfoEx, AttributeInfoList, AttributeInfoListEx, AttributeList,
+ ChangeEventInfo, CmdArgType,
+ CmdDoneEvent, CommandInfo, CommandInfoList, CommunicationFailed,
+ Connection, ConnectionFailed, ConstDevString, DServer, DataReadyEventData,
+ Database, DbData, DbDatum, DbDevExportInfo, DbDevExportInfos,
+ DbDevImportInfo, DbDevImportInfos, DbDevInfo, DbDevInfos, DbHistory,
+ DbHistoryList, DbServerInfo, DevBoolean, DevCommandInfo, DevDouble,
+ DevEncoded, DevError, DevFailed, DevFloat, DevInt, DevLong, DevLong64,
+ DevShort, DevSource, DevState, DevString, DevUChar, DevULong, DevULong64,
+ DevUShort, DevVarBooleanArray, DevVarCharArray, DevVarDoubleArray,
+ DevVarDoubleStringArray, DevVarFloatArray, DevVarLong64Array,
+ DevVarLongArray, DevVarLongStringArray, DevVarShortArray, DevVarStringArray,
+ DevVarULong64Array, DevVarULongArray, DevVarUShortArray, DevVoid,
+ DeviceAttribute, DeviceAttributeConfig, DeviceAttributeHistory,
+ DeviceData, DeviceDataHistory, DeviceDataHistoryList,
+ DeviceImpl, DeviceInfo, DeviceUnlocked, Device_2Impl,
+ Device_3Impl, Device_4Impl, DispLevel, EncodedAttribute, ErrSeverity,
+ EventData, EventSystemFailed, EventType,
+ Except, ExtractAs, FMT_UNKNOWN, GroupAttrReply, GroupAttrReplyList,
+ GroupCmdReply, GroupCmdReplyList, GroupElement, GroupReply, GroupReplyList,
+ IMAGE, ImageAttr, KeepAliveCmdCode, Level, LockCmdCode, LockerInfo,
+ LockerLanguage, LogLevel, LogTarget, Logger, Logging, MessBoxType,
+ MultiAttribute, MultiClassAttribute, NamedDevFailed, NamedDevFailedList,
+ NonDbDevice, NonSupportedFeature, NotAllowed, PeriodicEventInfo,
+ PollCmdCode, PollDevice, PollObjType, READ,
+ READ_WITH_WRITE, READ_WRITE, SCALAR, SPECTRUM, SerialModel,
+ SpectrumAttr, StdDoubleVector, StdGroupAttrReplyVector,
+ StdGroupCmdReplyVector, StdGroupReplyVector, StdLongVector,
+ StdNamedDevFailedVector, StdStringVector, SubDevDiag, TimeVal,
+ UserDefaultAttrProp, WAttribute, WRITE, WrongData, WrongNameSyntax,
+ alarm_flags, asyn_req_type, cb_sub_model, constants, isBufferLikeType,
+ raise_asynch_exception)
+
+ArgType = CmdArgType
from release import Release
-__author__ = "\n".join([ "%s <%s>" % x for x in Release.authors.values()])
+__author__ = Release.author_lines
__version_info__ = Release.version_info
__version__ = Release.version
__version_long__ = Release.version_long
@@ -57,35 +149,23 @@ __version_number__ = Release.version_number
__version_description__ = Release.version_description
__doc__ = Release.long_description
-import pytango_init
-from attr_data import *
-from log4tango import *
-from device_server import *
-from attribute_proxy import *
-from group import *
-from pyutil import *
-from device_class import *
-from globals import *
-from utils import *
-from tango_numpy import *
+from attr_data import AttrData
+from log4tango import TangoStream, LogIt, DebugIt, InfoIt, WarnIt, \
+ ErrorIt, FatalIt
+from device_server import ChangeEventProp, PeriodicEventProp, \
+ ArchiveEventProp, AttributeAlarm, EventProperties, AttributeConfig, \
+ AttributeConfig_2, AttributeConfig_3
+from attribute_proxy import AttributeProxy
+from group import Group
+from pyutil import Util
+from device_class import DeviceClass
+from globals import get_class, get_classes, get_cpp_class, get_cpp_classes, \
+ get_constructed_class, get_constructed_classes, class_factory, \
+ delete_class_list, class_list, cpp_class_list, constructed_class
+from utils import is_scalar_type, is_array_type, is_numerical_type, \
+ is_int_type, is_float_type, obj_2_str, seqStr_2_obj
+from tango_numpy import NumpyType, numpy_type, numpy_spectrum, numpy_image
+
+from pytango_init import init as __init
+__init()
-# The following lines will replace the '*' imports above in the future.
-#from attr_data import AttrData
-#from log4tango import TangoStream, LogIt, DebugIt, InfoIt, WarnIt, \
-# ErrorIt, FatalIt
-#from device_server import ChangeEventProp, PeriodicEventProp, \
-# ArchiveEventProp, AttributeAlarm, EventProperties, AttributeConfig, \
-# AttributeConfig_2, AttributeConfig_3
-#from attribute_proxy import AttributeProxy
-#from group import Group
-#from pyutil import Util
-#from device_class import DeviceClass
-#from globals import get_class, get_classes, get_cpp_class, get_cpp_classes, \
-# get_constructed_class, get_constructed_classes, class_factory, \
-# delete_class_list, class_list, cpp_class_list, constructed_class
-#from utils import is_scalar_type, is_array_type, is_numerical_type, \
-# is_int_type, is_float_type, obj_2_str, seqStr_2_obj, document_method, \
-# document_static_method, document_enum, CaselessList, CaselessDict, \
-# EventCallBack, get_home, from_version_str_to_hex_str, \
-# from_version_str_to_int
-#from tango_numpy import NumpyType, numpy_type, numpy_spectrum, numpy_image
\ No newline at end of file
diff --git a/PyTango/device_proxy.py b/PyTango/device_proxy.py
index 3d2ce8b..661f365 100644
--- a/PyTango/device_proxy.py
+++ b/PyTango/device_proxy.py
@@ -1446,6 +1446,45 @@ def __doc_DeviceProxy():
New in PyTango 7.0.0
""" )
+
+ document_method("write_attribute_reply", """
+ write_attribute_reply(self, id) -> None
+
+ Check if the answer of an asynchronous write_attribute is arrived
+ (polling model). If the reply is arrived and if it is a valid reply,
+ the call returned. If the reply is an exception, it is re-thrown by
+ this call. An exception is also thrown in case of the reply is not
+ yet arrived.
+
+ Parameters :
+ - id : (int) the asynchronous call identifier.
+ Return : None
+
+ Throws : AsynCall, AsynReplyNotArrived, CommunicationFailed, DevFailed from device.
+
+ New in PyTango 7.0.0
+
+ write_attribute_reply(self, id, timeout) -> None
+
+ Check if the answer of an asynchronous write_attribute is arrived
+ (polling model). id is the asynchronous call identifier. If the
+ reply is arrived and if it is a valid reply, the call returned. If
+ the reply is an exception, it is re-thrown by this call. If the
+ reply is not yet arrived, the call will wait (blocking the process)
+ for the time specified in timeout. If after timeout milliseconds,
+ the reply is still not there, an exception is thrown. If timeout is
+ set to 0, the call waits until the reply arrived.
+
+ Parameters :
+ - id : (int) the asynchronous call identifier.
+ - timeout : (int) the timeout
+
+ Return : None
+
+ Throws : AsynCall, AsynReplyNotArrived, CommunicationFailed, DevFailed from device.
+
+ New in PyTango 7.0.0
+ """ )
#-------------------------------------
# Logging administration methods
diff --git a/PyTango/device_server.py b/PyTango/device_server.py
index 0172ca8..a456672 100644
--- a/PyTango/device_server.py
+++ b/PyTango/device_server.py
@@ -278,12 +278,12 @@ def __DeviceImpl__add_attribute(self, attr, r_meth=None, w_meth=None, is_allo_me
same class created after this attribute addition will also have this attribute.
Parameters :
- attr : (Attr or AttrData) the new attribute to be added to the list.
- r_meth : (callable) the read method to be called on a read request
- w_meth : (callable) the write method to be called on a write request
- (if attr is writable)
- is_allo_meth: (callable) the method that is called to check if it
- is possible to access the attribute or not
+ - attr : (Attr or AttrData) the new attribute to be added to the list.
+ - r_meth : (callable) the read method to be called on a read request
+ - w_meth : (callable) the write method to be called on a write request
+ (if attr is writable)
+ - is_allo_meth: (callable) the method that is called to check if it
+ is possible to access the attribute or not
Return : (Attr) the newly created attribute.
diff --git a/PyTango/pytango_init.py b/PyTango/pytango_init.py
index 4b2ae1c..193880b 100644
--- a/PyTango/pytango_init.py
+++ b/PyTango/pytango_init.py
@@ -25,7 +25,7 @@
This is an internal PyTango module.
"""
-__all__ = []
+__all__ = ['init']
__docformat__ = "restructuredtext"
@@ -52,7 +52,7 @@ import time_val
__INITIALIZED = False
__DOC = True
-def __init():
+def init():
global __INITIALIZED
if __INITIALIZED:
return
@@ -82,5 +82,3 @@ def __init():
attribute_proxy.init(doc=doc)
__INITIALIZED = True
-
-__init()
\ No newline at end of file
diff --git a/PyTango/release.py b/PyTango/release.py
index 96584d9..146d718 100644
--- a/PyTango/release.py
+++ b/PyTango/release.py
@@ -56,7 +56,9 @@ class Release:
long_description = 'This module implements the Python Tango Device API mapping'
license = 'LGPL'
authors = { 'Coutinho' : ('Tiago Coutinho' , 'tcoutinho at cells.es') }
+ author_lines = "\n".join([ "%s <%s>" % x for x in authors.values()])
url = 'http://packages.python.org/PyTango'
download_url = 'http://pypi.python.org/packages/source/P/PyTango'
platform = ['Linux', 'Windows XP/2000/NT', 'Windows 95/98/ME']
keywords = ['Tango', 'CORBA', 'binding']
+
\ No newline at end of file
diff --git a/setup.py b/setup.py
index dbee658..41a90cc 100644
--- a/setup.py
+++ b/setup.py
@@ -36,6 +36,8 @@ import distutils.sysconfig
try:
import sphinx
+ import sphinx.util.console
+ sphinx.util.console.color_terminal = lambda : False
from sphinx.setup_command import BuildDoc
except Exception,e:
print e
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pytango.git
More information about the debian-science-commits
mailing list