Dennis Lee Bieber <[EMAIL PROTECTED]> writes: > Ugh... Seems to me it would be better to find some Python library > for SSH, something similar to telnetlib, rather than doing an > os.system() per command line. EACH of those os.system() calls probably > causes a full fork() operation on Linux/UNIX, and the equivalent on > Windows (along with loading a command shell interpreter to handle the > actual statement).
I think Carl is using Linux, so the awful overhead of process creation in Windows doesn't apply. Forking in Linux isn't that big a deal. os.system() usually forks a shell, and the shell forks the actual command, but even two forks per ssh is no big deal. The Apache web server usually runs with a few hundred processes, etc. Carl, just how many of these ssh's do you need active at once? If it's a few hundred or less, I just wouldn't worry about these optimizations you're asking about. -- http://mail.python.org/mailman/listinfo/python-list