Bu chad if i am running like this D:\Scipts\python>python mayaMp3player.pyin command prompt I will get only mayaMp3player.py , but i need D:\Scipts\python\mayaMp3player.py
Is it clear ?? On Fri, Apr 24, 2009 at 1:01 AM, Chad Dombrova <[email protected]> wrote: > > 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 -~----------~----~----~----~------~----~------~--~---
