To demonstrate the ease of writing Python-based modules, let's create a simple module. The purpose of this module will be to remotely copy a source file to a destination file, a simple task that we can build up from. To start our module, we need to create the module file. For easy access to our new module, we'll create the file in the library/ subdirectory of the working directory we've already been using. We'll call this module remote_copy.py, and to start it off, we'll need to put in a sha-bang line to indicate that this module is to be executed with Python:
#!/usr/bin/python #
For Python-based modules, the convention is to use /usr/bin/python as the listed executable. When executed on a remote system, the configured ...