[Discuss] Python programming questtion

Jerry Feldman gaf.linux at gmail.com
Sat Jul 4 16:00:56 EDT 2026


Thanks Rich. The issue is really paramiko. It is inherently not threadsafe.
But, there is a ThreadPoolExecutor module recommended by paramiko.

The job I am doing is:
Log in to remote host
Read a directory of student used IDs
Then use getent to get their full names.
This is mostly io bound.

I'll see where the thread pool executor takes me.


Jerry Feldman <gaf.linux at gmail.com>
Boston Linux and Unix
http://www.blu.org/

On Sat, Jul 4, 2026, 3:17 PM Rich Pieri <richard.pieri at gmail.com> wrote:

> https://docs.python.org/3/library/concurrency.html
>
> "The appropriate choice of tool will depend on the task to be executed
> (CPU bound vs IO bound) and preferred style of development (event
> driven cooperative multitasking vs preemptive multitasking)."
>
> On Sat, 4 Jul 2026 14:04:42 -0400
> Jerry Feldman <gaf.linux at gmail.com> wrote:
>
> > I have a python GTK app that uses paramiko to log into a remote host
> > and perform a few tasks that populate a class. These work perfectly
> > BUT... I do get a 'python not responding' dialog.
> > Before I refactor the code,
> > Would I be better off using the threading or multiprocess module.
>
> --
> \m/ (--) \m/
> _______________________________________________
> Discuss mailing list
> Discuss at lists.blu.org
> https://lists.blu.org/mailman/listinfo/discuss
>


More information about the Discuss mailing list