Hi guys,
By little searching found out the following.
The script for the problem statement can be written as follows.

===================================
    import os

    path='/local/mnt/myspace/sample1'
    os.chdir(path)
    os.system('cmd1')

    path='/local/mnt/myspace/sample2'
    os.chdir(path)
    os.system('cmd2')

    path='/local/mnt/myspace'
    os.chdir(path)
    os.system('cmd3')

....and so on.......
===================================

if anyone have the better way to do it. Kindly post.
thanks in advance.



On Aug 11, 11:54 am, Ablaze <androida...@gmail.com> wrote:
> Hi...
> Its more related to python but the commands which i will be applying
> is on android source code.
>
> I am working in Ubuntu. I have a bunch of commands (say 10 commands
> like cmd1, cmd2, cmd3..............cmd10)
> I want to write a python script, which can achieve the following:
>
> It should traverse through the directory structure and apply a command
> at particular directory path.
> The location and the commands are already known to me.
>
> Here is how, I want the script to operate.
>
> /local/mnt/myspace/sample1$ cmd1
> /local/mnt/myspace/sample2$ cmd2
> /local/mnt/myspace$ cmd3
> /local/mnt$cmd4
> /local/mnt/myspace/sample9$ cmd 8
> /local/mnt/myspace/sample3$ dmd10
>
> can someone please help on this.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to