Re: [Tutor] Getting Running File's Name

2006-01-31 Thread Bryan Carbonnell
On 31 Jan 2006 at 9:17, Rinzwind wrote:

> Why would that be any different under Linux?
> 
> sys.argv[0]

> On 1/31/06, Hans Dushanthakumar <[EMAIL PROTECTED]> wrote:
> > Under WinXP, the variable
> > sys.argv[0] holds the script file name (including the path). Not sure,

Wim/Hans,

Thank you both. It worked perfectly.


-- 
Bryan Carbonnell - [EMAIL PROTECTED]
If you lend someone $20, and never see that person again, it was 
probably worth it. 


___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Getting Running File's Name

2006-01-31 Thread Rinzwind
Why would that be any different under Linux?

sys.argv[0]

Wim

On 1/31/06, Hans Dushanthakumar <[EMAIL PROTECTED]> wrote:
> Under WinXP, the variable
> sys.argv[0] holds the script file name (including the path). Not sure,
> but it may work the same under Linux as well.
>
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of Bryan Carbonnell
> Sent: Tuesday, 31 January 2006 3:11 p.m.
> To: tutor@python.org
> Subject: [Tutor] Getting Running File's Name
>
> Can Python return the name of the current file's name?
>
> In other works, if I am running a Python file (MyPythonFile.py) is there
> a function that will return 'MyPythonFile.py'?
>
> This will be used in Linux if that matters.
>
> Thanks
>
> --
> Bryan Carbonnell - [EMAIL PROTECTED]
> Warning: dates on calendar are closer than they appear.
>
>
> ___
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
> ___
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Getting Running File's Name

2006-01-30 Thread Hans Dushanthakumar
Under WinXP, the variable
sys.argv[0] holds the script file name (including the path). Not sure,
but it may work the same under Linux as well.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Bryan Carbonnell
Sent: Tuesday, 31 January 2006 3:11 p.m.
To: tutor@python.org
Subject: [Tutor] Getting Running File's Name

Can Python return the name of the current file's name?

In other works, if I am running a Python file (MyPythonFile.py) is there
a function that will return 'MyPythonFile.py'?

This will be used in Linux if that matters.

Thanks

--
Bryan Carbonnell - [EMAIL PROTECTED]
Warning: dates on calendar are closer than they appear.


___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Getting Running File's Name

2006-01-30 Thread Bryan Carbonnell
Can Python return the name of the current file's name?

In other works, if I am running a Python file (MyPythonFile.py) is 
there a function that will return 'MyPythonFile.py'?

This will be used in Linux if that matters.

Thanks

-- 
Bryan Carbonnell - [EMAIL PROTECTED]
Warning: dates on calendar are closer than they appear.


___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor