Sajjad,

I do not think you need a script for this. The mount command is very
easy to use. But since you made it anyway, here are my thoughts:

1. Use zenity or sth like that to provide GUI file and directory
selection to users.
2. ALWAYS use double quotes around filenames when passing them as
arguments to a command.
3. Its always better to make it a pre-requisite that the script is run
with root permissions than to ask for the root password in the script.
In any case, NEVER use raw_input to accept passwords from the user.
You DO NOT want the password to be echoed. Use getpass.getpass
(prompt_string).

Here's my code: http://pastebin.ca/1537318

Regards,
Nikhil

On Aug 20, 10:30 pm, Sajjad Anwar <[email protected]> wrote:
> Hello all,
>
> Just wrote a simple script in python to mount any iso image to any required
> location.
>
> Inspiration:
>
> My friends have been finding it difficult to mount iso's. they asked whether
> it could be made more easy. guess this went fine.
>
> Inputs:
>
> 1. Location of the iso
> 2. Destination to which it is to be mounted
> 3. sudo password
>
> To run this script:
>
> 1. Set permissions using the following command
> $ chmod a+x mnt.py
>
> 2. run the script using
> $ ./mnt.py
>
> please try and post comments.
>
> thanks
>
> Regards.
>
> --
> Sajjad Anwarhttp://geohackers.inhttp://fsugcalicut.org
> [email protected]
> +91 9995 19 13 12
>
>  mnt.py
> < 1KViewDownload
--~--~---------~--~----~------------~-------~--~----~
"Freedom is the only law". 
"Freedom Unplugged"
http://www.ilug-tvm.org

You received this message because you are subscribed to the Google
Groups "ilug-tvm" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]

For details visit the website: www.ilug-tvm.org or the google group page: 
http://groups.google.com/group/ilug-tvm?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to