Check this out: http://stackoverflow.com/questions/595305/python-path-of-script
On Sat, Sep 7, 2013 at 10:09 PM, qe qe <[email protected]> wrote: > Is there a way to find the path of the a running python script? > I'm trying to get it from __file__ or sys.argv[0]. > But both of them give errors. > When I tried __file__, it says __file__ is not defined. > When i tried sys.argv[0], it says 'module' object has no attribute 'argv'. > > Thanks, > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the ParaView Wiki at: > http://paraview.org/Wiki/ParaView > > Follow this link to subscribe/unsubscribe: > http://www.paraview.org/mailman/listinfo/paraview _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview
