[Tutor] Python dir(handle) function acts weird

Steven D'Aprano steve at pearwood.info
Mon Apr 6 02:43:58 CEST 2015


On Sun, Apr 05, 2015 at 09:39:02AM -0400, Solomon Vimal wrote:
> Hi,
> I have two versions of the same software S4.1 and S5, say - they are
> treated as COM handles.
> When I use methodsview in MATLAB to see the list of methods in both, I get
> more or less the same function list, but in Python, when I use dir(s4.1) I
> get the identical list to MATLAB methodsview, but dir(s5) is a subset of
> the list. This is weird behavior I thought.
> 
> Does anyone know what is wrong here? Please let me know soon.

I have no idea what you are talking about.

What are S4.1 and S5? What sort of software are they?

What is methodsview in MATLAB?

How are you using the same software in MATLAB and Python?

You cannot run dir(s4.1) in Python, that's a syntax error. So what are 
you actually doing?

Please COPY and PASTE the exact code you are using, don't summarise it, 
and especially don't write it out from memory. Remember that we cannot 
see your computer, nor do we understand the background to your question. 
Don't assume we are MATLAB experts.


-- 
Steve


More information about the Tutor mailing list