Working with a class that imports modules?

Generally speaking, once I get my modules solidified and they aren’t updated - this should work fine otherwise in a production environment right?

Yes, but the downside is supreme annoyance during development vs the downside of using fully qualified names... which is they're ugly.

Another gotcha in Ignition's Python environment is that you have to catch Java exceptions too. A standard try except won't catch those. See: Using Try/Except to Dummy Proof & Check if SQL Tables/Columns Exist - #4 by pturmel

My entire application is just all GUI forms and they all go through the same or very similar process, so I am trying hard to abstract the common processes away.

That's the crux of the DRY principle, innit?

Anyway this is the real cringe :sweat_smile:

		if userId is None:
			self.userId = self.form_payload['userId']
                else:
                        self.userId = userId

when you could

self.userId = userId or self.form_payload['userId']
1 Like