You can use this.
sys.modules.get('idlelib')
<module 'idlelib' from 'C:\Python25\Lib\idlelib\__init__.pyc'>

On 23 avr, 09:51, Achayan <[email protected]> wrote:
> Hi All
>
> I have doubt , is there any way to find a file path in python ??
>
> for eg: I have a file named as testPython.py and its saved in D:\Temp
> While i am running the  testPython.py i need to find from where is
> getting sourced .
> Is there any chance ??
>
> I got a information about __file__ but it will work only if we import
> this script.
> Without importing the file i need to find the file path.
>
> Any help :)
>
> Thanks
>
> O.S.K
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/python_inside_maya
-~----------~----~----~----~------~----~------~--~---

  • ... Achayan
    • ... pierrotb
      • ... kurian os ™ ®കോപ്പിയടിച്ചാല്©ഗോതമ്പുണ്ട!
        • ... pierrotb
          • ... kurian os ™ ®കോപ്പിയടിച്ചാല്©ഗോതമ്പുണ്ട!
            • ... pierrotb
              • ... Chad Dombrova
                • ... kurian os ™ ®കോപ്പിയടിച്ചാല്©ഗോതമ്പുണ്ട!
                • ... jason . osipa
    • ... Bård Henriksen
      • ... Paul Molodowitch

Reply via email to