Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to view the value of a Metashape Application attribute that displays in angle brackets < >

How do I access the value of an object attribute that displays in angle brackets like: <attribute 'version' of 'Metashape.Metashape.Application' objects>?

Specifically, I am using the Metashape Python module and run the following lines within an interactive Python session:

import Metashape
a = Metashape.Application
a.version

and this is when I get

<attribute 'version' of 'Metashape.Metashape.Application' objects>

I've tried print(a.version) and get the same output.

According to the module reference doc, this attribute should be a string, so I'm confused why it can't just be displayed as a string.

like image 287
dyoung Avatar asked Oct 14 '25 11:10

dyoung


1 Answers

According to the docs:

An instance of Application object can be accessed using Metashape.app attribute, so there is usually no need to create additional instances in the user code.

so...

import Metashape
print(Metashape.app.version)

If you want to do it your way, you need to instance Application.

import Metashape
app = Metashape.Application()
print(app.version)
like image 145
OneMadGypsy Avatar answered Oct 17 '25 01:10

OneMadGypsy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!