Re: getting command line in python

2011-11-09 Thread Matej Cepl
Dne 8.11.2011 23:36, MrSmile napsal(a): Thank you all, that was it that I was searching for you. Except that most likely it wasn't the right answer. Take a look at http://docs.python.org/library/argparse.html (or optparse, if you are on Python < 2.7). Best, Matěj -- http://mail.python.org/

Re: getting command line in python

2011-11-08 Thread MrSmile
Thank you all, that was it that I was searching for you. Tamer Am 08.11.2011 23:32, schrieb Cameron Simpson: > On 08Nov2011 23:19, MrSmile 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 execut

Re: getting command line in python

2011-11-08 Thread Cameron Simpson
On 08Nov2011 23:19, MrSmile 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 script

Re: getting command line in python

2011-11-08 Thread Chris Rebert
On Tue, Nov 8, 2011 at 2:19 PM, 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 t

Re: getting command line in python

2011-11-08 Thread Irmen de Jong
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

getting command line in python

2011-11-08 Thread MrSmile
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 b