Bugs item #1582720, was opened at 2006-10-23 11:02
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1582720&group_id=78018
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: com
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Matt (matthiaskirst)
Assigned to: Nobody/Anonymous (nobody)
Summary: Python long integers aren't translated to Variant/long
Initial Comment:
Since Version 208 Python long integers are not
translated to Variant/long type anymore.
I think that is on purpose since long integers have
undefined precision.
But isn't it possible to gracefully convert to Variant/
long like in the versions up to 207?
Maybe there is existing code around that can be broken
by the above mentioned behaviour (like my one).
Test code:
import pythoncom
class Test:
_public_methods_ = [ 'Test' ]
_reg_progid_ = "Python.COMTest3"
_reg_clsid_ = "{2D7DD06A-83D3-4F31-848C-
57AFA22A650D}"
_reg_clsctx_ = pythoncom.CLSCTX_INPROC_SERVER
def Test( self ):
a = long( 0 )
return a
if __name__ == "__main__":
import win32com.server.register
print "Registering..."
win32com.server.register.UseCommandLine( Test )
In VB:
Private Sub Form_Load()
Dim p As Object
Dim a
Set p = CreateObject("Python.COMTest3")
a = p.Test()
End Sub
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1582720&group_id=78018
|