Stefan Baar replied to the topic 'PyIndi without IndiClient class' in the forum. 4 months ago

Hi Steve, Thank you for the quick reply.

SteveBz wrote: What difference does it make?Steve.

It makes a large difference for first time users of the module and for people that don't want to spend hours on writing a simple script just to take a picture.

SteveBz wrote: I imagine they both work.
Steve.


No, the second one doesn't work

SteveBz wrote: The first one is more Pythonic and in the longer term you will find it easier to maintain.

If you write procedural code, like your second example eventually it will become more spaghetti-like and you split it into classes to maintain it. Much easier to start with classes.

Sorry to lecture you.

Regards,

Steve.


What do you mean with Pythonic? Isn't Pythonic the opposite ... like clear and efficient ?
- towardsdatascience.com/how-to-be-pythoni...ld-care-188d63a5037e
- stackoverflow.com/questions/25011078/what-does-pythonic-mean

Or do you mean bureaucratic?

Usually, one can use IPython or Jupyter notebooks to play around with python libraries. That way one can get around reading manuals and documentation, using the tab key to get all available functions and so on.

As far as I can tell, this is not really possible with PyIndi, since you first have to check with the documentation, which tells you to construct an unnecessary class like some bureaucrat at the DMV (I am a scientist, I don't respect bureaucrats) .

But thanks for the lecture.

Cheers,

Stefan

Read More...