new to Python - modules to leverage Perl scripts?

Rogelio scubacuda at gmail.com
Sun May 6 22:12:42 EDT 2012


I've got quite a few Perl scripts that I would like to leverage, and
I'd like to make some Python wrapper scripts for them.

The Perl scripts shell into various network appliances, run certain
commands, and then output those commands into a file.

I recently found out about the subprocess modules (including "call")
and am wondering what other Python libraries and modules I should
check out.  Specifically, I need functions that will do the
following...

1) Take a big IP file and break it up into smaller chunks (e.g. 20 IP
addresses per file)
2) Run the Perl script on those smaller IP files
3) Run the Perl commands in parallel (to take less time)
4) Take the little logs and concatenate the files
5) Look for existence of certain strings in the logs

I'm still playing with the subprocess.call command to make sure that
it calls everything okay.  But I'm hoping someone can point me where
to look for functions that will make this an effective wrapper script.



More information about the Python-list mailing list