[BangPypers] Need help for python coding

Rahul R rahul8590 at gmail.com
Thu Apr 18 15:04:43 CEST 2013


os.path.realpath(__filename__)
that should do the trick.

./Rahul



On Thu, Apr 18, 2013 at 6:15 PM, Kamalakar gs <foxrun2005 at gmail.com> wrote:

> HI all,
> I have a query that i have doc which is  read through python.But instead of
> giving path and filename
> in the coding.I want to manipulate it like "python has to ask USER for a
> specific filename so that python recognizes the directory internally and
> read the file ".How do i do this.I have tried with
> filename = input ("filename") but it just file name and will not recognises
> the path.
>
> For example:
>
> file name = input ("file name: ")
>
>              file name = python
>
> it has to recognizes the path like    "C:\users\desktop\python"
>
>
> Thanks
> Regards
> Kamalakar
> _______________________________________________
> BangPypers mailing list
> BangPypers at python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>


More information about the BangPypers mailing list