[pywin32-bugs] [ pywin32-Bugs-3603059 ] Cannot pass array of arrays
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2013-02-02 03:19:49
|
Bugs item #3603059, was opened at 2013-02-01 19:19 Message generated for change (Tracker Item Submitted) made by wtanaka You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3603059&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: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Wesley Tanaka (wtanaka) Assigned to: Nobody/Anonymous (nobody) Summary: Cannot pass array of arrays Initial Comment: With code that looks like this: instance = win32com.client.gencache.EnsureDispatch("InDesign.Application") doc = instance.Open("some_path") pages = doc.Pages page0 = pages.FirstItem() opposing_corners=((0.0, 0.0), (72.0, 72.0)) page0.Reframe( In=2021222766, OpposingCorners=opposing_corners) The reframe method: http://cssdk.host.adobe.com/sdk/1.0/docs/WebHelp/references/csawlib/com/adobe/indesign/Page.html#reframe%28%29 expects an array containing two arrays, where each of those two arrays contains two doubles. If I pass in a scalar like 5.0 or a 1-D array like (1.0, 1.0) or even if I add an extra item to the array like ((0.0, 0.0), (72.0, 72.0), 5.0) or ((0.0, 0.0), (72.0, 72.0), None), the exception coming back from InDesign references the value that I passed to the Reframe method. However, if I pass ((0.0, 0.0), (72.0, 72.0)), then InDesign says that it is receiving "()" This thread looks similar: http://stackoverflow.com/questions/10166064/python-win32com-and-2-dimensional-arrays/10167882#10167882 and the solution there is to use comtypes instead of win32com. Is this a known issue with win32com? I tried looking at the underlying InvokeTypes call but stopped when I saw this mailing list post saying that it's poorly documented: http://mail.python.org/pipermail/python-win32/2005-December/004031.html ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3603059&group_id=78018 |