Module import best practice

DL Neil PythonList at DancesWithMice.info
Thu Mar 26 18:54:06 EDT 2020


> I'm not a professional coder. I'm an environmental consultant and I use a

I take it all back then...

No! No need to feel apologetic, the Python community works hard to be 
inclusive - which I take to include levels of expertise, not merely 
countering the various "-isms".


> variety of tools depending on the project's requirements. Most every day 
> I'm
> in emacs. use LyX for almost all writing, R and GRASS for data analyses, 
> SQL
> for database work, awk, sed, shell scripts, and python as required. This
> means I'm constantly relearning what I forgot since the last time. This has
> worked well for me for almost 30 years so I'm not complaining.

With that list, I'm having difficulty crediting your claim. It's good 
that you recognised programming as a tool, and made it work for you!


> But now I am adding GUIs and other Real Application(TM) bits to postgres
> applications I run from the command line for my own use so I can give these
> tools to others who might benefit from them. The last database-backend
> application I wrote in python2 and wxPython was more than a decade ago. Now
> I'm working exclusively with Python3 and learning tkinter. I've much to
> learn. ;-)

Know that feeling! I try to keep a note-/lab-/log-book of 
learning-experiences. Of course, remembering if/where I've noted topics 
is quite another matter...

The Python-list has gone a bit quiet. I imagine many are busy trying to 
encourage/support colleagues new to the work-from-home gig. (hopefully 
not any other reason!) Usually questions attract more, and more prompt, 
answers.

There are others who are tk-oriented. These days I (disclaiming bias) 
tend to follow the browser-based philosophy and thus web 
front-ends/HTML5-as-a-GUI (which don't need to be hosted on a web-server).

When introduced to Python GUIs (also wxPython), I found that following 
'the bare minimum' rule (cf 'kitchen sink') was the better option. 
Indeed it was usually easier to add things later, than to try to remove 
components - which usually 'broke stuff' at an alarming rate.

"YAGNI" applies!

Plus, before you try to hide your computing skills under the proverbial 
bushel, one of our most active skilled members has recently faced a 
similar issue of trying to add GUI-usually functionality into a cmdLN 
app. So...


> Thanks for the complete explanation and I hope your dinner didn't burn on
> the grill.

OT:
the word "environment" may mean slightly (or not so slight) different 
things to different people/cultures. Over here it is almost synonymous 
with "conservation" and the tourist advertising of "Clean, green, New 
Zealand". Thus, I think if I started on a diet of our living-dinosaurs, 
the Conservation Department would, shall we say, take an apposite stance.

Given the time zone (it's already Friday here - would the rest of you 
please try to keep up with us!) I look-forward to my dinner...

Pleased to hear of your age-group - hopefully it enabled you to 
understand the humor (and more readily accept (grand-)dad-jokes!).

Perhaps of interest, here's a combination of the two - environment and 
(grand-)children: the New Zealand Geographic (magazine) is:-
<<<
Every day of this lock-down New Zealand Geographic will send a story or 
a video that can be shared among your family. The first one is below, 
and with it some talking points to fill our days at home together. If 
you’re a grandparent or a Kiwi overseas, you can participate too, and 
join your family discussion over phone or video conferencing.
 >>>
https://www.nzgeo.com/newsletter/together-at-home/?t=34143_9db23c969a4ba2818c82d9b1c7f0ec9f&campaign_id=
-- 
Regards =dn


More information about the Python-list mailing list