Re: [Tutor] python function to know the path of the program in execution *

2010-02-05 Thread David Hutto
scripts\lowerdir\lowerdir.py >>> As long as you have sys imported at somepoint, then all you have to do is print sys.argv[0], and that should be the exact name and location of the current running script, David --- On Fri, 2/5/10, Daniel Sarmiento wrote: From: Daniel Sarmiento Su

Re: [Tutor] python function to know the path of the program in execution *

2010-02-05 Thread David Hutto
ir\lowerdir.py >>> As long as you have sys imported at somepoint, then all you have to do is print sys.argv[0], and that should be the exact name and location of the current running script, David --- On Fri, 2/5/10, Daniel Sarmiento wrote: From: Daniel Sarmiento Subject: Re: [Tu

Re: [Tutor] python function to know the path of the program in execution * *

2010-02-05 Thread Rohit Roger$
tps://www.boxbe.com/anno?tc=1530328725_1435846689&disp=b> | Block > domain <https://www.boxbe.com/anno?tc=1530328725_1435846689&disp=b&dom> > > > > Date: Fri, 5 Feb 2010 17:43:37 +0530 >> From: Spoorthi >> To: "Rohit Roger$" >> Cc:

Re: [Tutor] python function to know the path of the program in execution *

2010-02-05 Thread Daniel Sarmiento
Date: Fri, 5 Feb 2010 17:43:37 +0530 From: Spoorthi To: "Rohit Roger$" Cc: tutor Subject: Re: [Tutor] python function to know the path of the program in execution * Message-ID: <6c9f52051002050413o57bd76bax7ac5986b17304...@mail.gmail.com> Content-

Re: [Tutor] python function to know the path of the program in execution *

2010-02-05 Thread Rohit Roger$
it tell the path upto the python file.. On Fri, Feb 5, 2010 at 5:43 PM, Spoorthi wrote: > The below data(in blue) made me converge upon sys.path[0] for this > particular problem...I dont think it returns None if a Python script is > used. Can anyone please correct me if I am wrong > > *As initia

Re: [Tutor] python function to know the path of the program in execution *

2010-02-05 Thread Spoorthi
The below data(in blue) made me converge upon sys.path[0] for this particular problem...I dont think it returns None if a Python script is used. Can anyone please correct me if I am wrong *As initialized upon program startup, the first item of this list, path[0], is the directory containing the sc

Re: [Tutor] python function to know the path of the program in execution *

2010-02-05 Thread Rohit Roger$
sys.path[0] returns none On Fri, Feb 5, 2010 at 5:36 PM, Spoorthi wrote: > sys.path[0] should be serving the purpose effectively I guess > > > On Fri, Feb 5, 2010 at 5:29 PM, Rohit Roger$ wrote: > >> Answer : >> >>> import sys >> >>> rohit = sys.argv[0] >> >>> print rohit >> it returns the na

Re: [Tutor] python function to know the path of the program in execution *

2010-02-05 Thread Spoorthi
sys.path[0] should be serving the purpose effectively I guess On Fri, Feb 5, 2010 at 5:29 PM, Rohit Roger$ wrote: > Answer : > >>> import sys > >>> rohit = sys.argv[0] > >>> print rohit > it returns the name of the path > > On Fri, Feb 5, 2010 at 4:13 PM, David Hutto wrote: > >> Junk Score: 2

Re: [Tutor] python function to know the path of the program in execution *

2010-02-05 Thread Rohit Roger$
Answer : >>> import sys >>> rohit = sys.argv[0] >>> print rohit it returns the name of the path On Fri, Feb 5, 2010 at 4:13 PM, David Hutto wrote: > Junk Score: 2 out of 10 (below your Auto Allow > threshold) > | Approve sender

Re: [Tutor] python function to know the path of the program in execution

2010-02-05 Thread David Hutto
--- On Fri, 2/5/10, nikunj badjatya wrote: From: nikunj badjatya Subject: [Tutor] python function to know the path of the program in execution To: tutor@python.org Date: Friday, February 5, 2010, 5:08 AM Hi , Is there any python function to know the path of the python program under execution