Hello Nikhil, Thank you for your comments. Here are my questions: 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.
> i would try this > > 2. ALWAYS use double quotes around filenames when passing them as > arguments to a command. > Sure. But what is necessity? > > 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). > I felt echoing bit comfortable and easy. > How do I 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 > > > -- Sajjad Anwar http://geohackers.in http://fsugcalicut.org [email protected] +91 9995 19 13 12 --~--~---------~--~----~------------~-------~--~----~ "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 -~----------~----~----~----~------~----~------~--~---
