Indeed. The joys of an on-screen keyboard...

Vernon Cole
(sent from my 'droid phone)

On Mar 30, 2011 6:45 PM, "Daniel Jennings" <[email protected]> wrote:
> I think you mean print repr(x) :)
>
> From: [email protected] [mailto:
[email protected]] On Behalf Of Vernon Cole
> Sent: Wednesday, March 30, 2011 5:39 PM
> To: Discussion of IronPython
> Subject: Re: [IronPython] Newbie InterOp-related question
>
>
> x = my_goofy_routine()
> print repr
>
> Vernon Cole
> (sent from my 'droid phone)
>
> On Mar 30, 2011 1:27 PM, "Tilley, Paul" <[email protected]<mailto:
[email protected]>> wrote:
>> Thanks Markus,
>>
>>
>>
>> I'll use the info to try to figure out how things will work in my actual
real world example. That involves the return of 4 or 5 arrays of strings and
ints (horrible API I'm dealing with)
>>
>>
>>
>> Paul
>>
>>
>>
>> From: Markus Schaber [mailto:[email protected]<mailto:
[email protected]>]
>> Sent: Wednesday, March 30, 2011 12:42 AM
>> To: Discussion of IronPython
>> Subject: Re: [IronPython] Newbie InterOp-related question
>>
>>
>>
>> Hi, Paul,
>>
>>
>>
>> it's documented at
http://ironpython.net/documentation/dotnet/dotnet.html#ref-and-out-parameters
.
>>
>>
>>
>> The out parameter will be mapped as an additional return value.
>>
>>
>>
>> So if myComObj.foo returns void, a simple call like
>>
>>
>>
>> blah = myComObj.Foo()
>>
>>
>>
>> should do the trick.
>>
>>
>>
>> Grüße,
>>
>> Markus
>>
>>
>>
>> Von: [email protected]<mailto:
[email protected]> [mailto:
[email protected]<mailto:[email protected]>]
Im Auftrag von Tilley, Paul
>> Gesendet: Mittwoch, 30. März 2011 01:10
>> An: [email protected]<mailto:[email protected]>
>> Betreff: [IronPython] Newbie InterOp-related question
>>
>>
>>
>> Hi,
>>
>>
>>
>> I've just started using IronPython but have hit a bit of a roadblock.
This may also be caused by inadequate .Net knowledge.
>>
>>
>>
>> In C# I can call a COM object (where the COM method is going to fill in
the parameter) like so:
>>
>> object blah;
>>
>> myComObj.Foo(out blah);
>>
>>
>>
>> If for example the COM method returns an array of strings ( with the
parameter VARIANT* in COM method signature) then in C# I get an object[]
back which with appropriate massaging I can process.
>>
>>
>>
>> How would I declare the variable in Python if I want access the returned
contents correctly? Knowing I was to get an array back I naively tried:
>>
>> blah = []
>>
>> myComObj.Foo(blah)
>>
>>
>>
>> The call is made correctly - I can see the COM object is filling out the
return parameter OK but blah remains an empty list.
>>
>> Any insights on what I should be doing more than welcome,
>>
>>
>>
>> Thanks,
>>
>>
>>
>> Paul
>>
>>
>>
>>
>>
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to