you can also use sys.argv[0]

if you're executing your python module as a script, it's best to put a  
little footer at the bottom of the script that only runs when the  
module is being executed and not imported:



#!/usr/bin/python

def main(path):
        # do something with path

if __name__ == '__main__':
        import sys
        currScript = sys.argv[0]
        main(currScript)


-chad



--~--~---------~--~----~------------~-------~--~----~
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
        • ... Chris G
          • ... Paul Molodowitch
            • ... kurian os ™ ®കോപ്പിയടിച്ചാല്©ഗോതമ്പുണ്ട!

Reply via email to