getting command line in python

Irmen de Jong irmen.NOSPAM at xs4all.nl
Tue Nov 8 17:24:58 EST 2011


On 8-11-2011 23:19, MrSmile wrote:
> Hi people!
> 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.
>
>
> Tamer

sys.argv


Irmen




More information about the Python-list mailing list