On 08Nov2011 23:19, MrSmile <n...@mail.de> wrote: | I am looking for a way to get the command line in the script. | | Let us say I am in the folder "/tmp" okay! | | now from /tmp I execute in the console this: | python /home/tamer/MyApp/MyScript.py | | in the app itself, I want to grep the path and the scriptname itself, | like: /home/tamer/MyApp is being somewhere available.
Have you looked in sys.argv[0]? -- Cameron Simpson <c...@zip.com.au> DoD#743 http://www.cskk.ezoshosting.com/cs/ It is not true that life is one damn thing after another -- it's one damn thing over and over. - Edna St. Vincent Millay -- http://mail.python.org/mailman/listinfo/python-list