Boston Linux & UNIX was originally founded in 1994 as part of The Boston Computer Society. We meet on the third Wednesday of each month, online, via Jitsi Meet.

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss] Python programming questtion



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
>



Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org