class __getitem__ when item is not a sequence ???

2007-04-19 Thread cfriedalek
Sorry for the vague subject. Not sure what the right terminology is. How can I use an instance's data by reference to the instance name, not the instance attribute? OK the question is probably really poor but hopefully an example will make it clear. > x=1 > type(x) > x.__add__(1) 2 > print x 1 >

Re: matplotlib basic question

2007-04-19 Thread cfriedalek
> So, first off, what's up with the [ at 0x017C38C8>] line that shows up after my plot command? And second, > when I call show(), a new figure pops up with my sin wave -- seems all > right, yes? But I'm not given another >>> prompt in IDLE until or > unless I close the figure that popped up with

tricky(?) win32com question - Mark Hammond or other experts please.

2006-12-19 Thread cfriedalek
OK, I've asked this earlier this week with no response. Since then I've also received a suggestion from the app developers but that failed with the same type error problem. Hopefully Mark Hammond or other experts can offer a suggestion as to how to get around this problem. I'm foolish enough to thi

How does python handle VBS "Nothing" keyword

2006-12-14 Thread cfriedalek
I'm writing a python script using win32com to call a 3rd party program via its VBS based API. In VBS a query to get some plot data goes like this: Plot.QueryBegin datacode, Nothing What is this in python? Plot.QueryBegin(datacode, None) does not work. I get a type mismatch error as follows: co

Re: win32com problem - Problem Solved

2006-10-25 Thread cfriedalek
Problem solved. Turns out it was a problem of mistranslating VBS code to Python. The PYTHON line "print str(tet)" casts tet to a string and prints. This is what I thought the VBS line "Str = Tet.ConvertToString()" was doing. But of course "ConvertToString()" is a method of a Tet instance. So in p

Re: win32com problem

2006-10-25 Thread cfriedalek
Gabriel Genellina wrote: > Run it on the debugger step by step, and inspect all the intermediate objects. > Synergy.StudyDoc might be a function, by example, so you should add > another pair of (). > This is not obvious looking at the VB code. (Sorry, tied up this arvo so I could respond to your

Re: win32com problem

2006-10-24 Thread cfriedalek
> tet = Synergy.StudyDoc.GetFirstTet(), perhaps? com_error: (-2147352573, 'Member not found.', None, None) Sorry, should have mentioned that I tried that already. Any thoughts on how to establish if the problem is with win32com or the 3rd party app? -- http://mail.python.org/mailman/listinfo/py

win32com problem

2006-10-24 Thread cfriedalek
I'm interacting with a third party application using python and com. However having problems and don't know what to look at next to resolve the issue. The app. can be driven by VBS. The following VBS code works: Set Synergy = CreateObject("synergy.Synergy") Synergy.OpenProject "D:/temp/project.mp

Re: win32com Excel bug?

2006-04-19 Thread cfriedalek
yth (Yes That Helped). You know how it goes, I thought I'd already tried to include all arguments. Obviously I didn't, or stuffed it up in some other way. Also some confusion about the meaning of "required" and "default". The doc explains these arguments as required, but some have defaults. I gues

win32com Excel bug?

2006-04-18 Thread cfriedalek
I'm driving Excel from python, largely successfully. Now I'm trying to add errorbars to XY scatter plots. Keep getting a com_error. Can't track down the problem. I modified a simple example to duplicate the problem. Thanks to Mathieu Fenniak http://www.stompstompstomp.com/weblog/entries/67/ for th