how to identify a particular directory / file on remote machine

Discussion in 'Python' started by Swarna, Nov 10, 2005.

  1. Swarna

    Swarna Guest

    Hi all,

    I am trying to find out whether a particular directory is present on a
    remote machine or not from my local Python script in Linux . Can anyone
    help me with the command that i need to issue to os.system in my python
    script to acheive this?

    Thanks, for all your time !
    Swarna, Nov 10, 2005
    1. Advertisements

  2. Swarna

    Mike Meyer Guest

    Lots of possibilities, depending on whats running on the remote
    machine. My first try would be to use os.popen (or the subprocess
    module) and read the output of an "ssh remotemachine ls -d /path/to/dir".

    Mike Meyer, Nov 10, 2005
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.