Re: [Tutor] A simple Question...

2007-10-02 Thread Noufal Ibrahim
bhaaluu wrote: > On 10/2/07, Kent Johnson <[EMAIL PROTECTED]> wrote: >> traceback.print_stack() prints the stack trace to the current point of >> execution. No forced error or drama needed :-) >> >> Kent > > Exactly how is this used, please? > > Traceback (most recent call last): > File "print_

Re: [Tutor] A simple Question...

2007-10-02 Thread Kent Johnson
bhaaluu wrote: > On 10/2/07, Kent Johnson <[EMAIL PROTECTED]> wrote: >> traceback.print_stack() prints the stack trace to the current point of >> execution. No forced error or drama needed :-) >> >> Kent > > Exactly how is this used, please? > > Traceback (most recent call last): > File "print_

Re: [Tutor] A simple Question...

2007-10-02 Thread bhaaluu
On 10/2/07, Kent Johnson <[EMAIL PROTECTED]> wrote: > > traceback.print_stack() prints the stack trace to the current point of > execution. No forced error or drama needed :-) > > Kent Exactly how is this used, please? Traceback (most recent call last): File "print_stack.py", line 160, in ?

Re: [Tutor] A simple Question...

2007-10-02 Thread Kent Johnson
Suzanne Peel wrote: > > Thankyou for your help, > > However both suggestions will only give me that name of the 1st file > executed eg when I use *execfile('EA_Owner.py')* the name returned > when the __file__ or sys.argv[0] is executed always EA_Owner.py . > > The Traceback feature is an ex

Re: [Tutor] A simple Question...

2007-10-02 Thread Eric Brunson
Alan Gauld wrote: > "Suzanne Peel" <[EMAIL PROTECTED]> wrote > > >> However both suggestions will only give me that name of the 1st file >> executed eg when I use execfile('EA_Owner.py') the name returned >> when >> the __file__ or sys.argv[0] is executed always EA_Owner.py . >> > > You

Re: [Tutor] A simple Question...

2007-10-02 Thread Alan Gauld
"Suzanne Peel" <[EMAIL PROTECTED]> wrote > However both suggestions will only give me that name of the 1st file > executed eg when I use execfile('EA_Owner.py') the name returned > when > the __file__ or sys.argv[0] is executed always EA_Owner.py . You didn't mention you were doing wacky stuf

[Tutor] A simple Question...

2007-10-01 Thread Suzanne Peel
Thankyou for your help, However both suggestions will only give me that name of the 1st file executed eg when I use execfile('EA_Owner.py') the name returned when the __file__ or sys.argv[0] is executed always EA_Owner.py . The Traceback feature is an excellent resource however the errors I

Re: [Tutor] A simple Question...

2007-10-01 Thread Kent Johnson
Suzanne Peel wrote: > > Hi, > > I have a very simple question that I cannot find the answer to ... if I > knew the correct question to ask it would be simple. > > I am trying to find the name of the file I am currently running (please > don't laugh at me I know it's simple but I cannot figure

Re: [Tutor] A simple Question...

2007-10-01 Thread John Fouhy
On 02/10/2007, Suzanne Peel <[EMAIL PROTECTED]> wrote: > I am trying to find the name of the file I am currently running (please > don't laugh at me I know it's simple but I cannot figure it out). Have a look at sys.argv[0] :-) -- John. ___ Tutor mai

[Tutor] A simple Question...

2007-10-01 Thread Suzanne Peel
Hi, I have a very simple question that I cannot find the answer to ... if I knew the correct question to ask it would be simple. I am trying to find the name of the file I am currently running (please don't laugh at me I know it's simple but I cannot figure it out). I want to know where my er

Re: [Tutor] A simple question about creating a program

2005-03-31 Thread Max Noel
On Mar 31, 2005, at 23:07, Alan Gauld wrote: And if Sun ever get round to finishing their JVM on a chip we'll have a chip that is both OO and procedural! At that point it would be a JRM, then, wouldn't it? :D -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic c

Re: [Tutor] A simple question about creating a program

2005-03-31 Thread Alan Gauld
Just to be picky... > code to be executed by the processor. Machine language is not > object-oriented. In some cases it is. The Rekursiv computer by Linn systems had a CPU that had an OO machine language which supported parallelism by exposing 'threads' as active objects at the machine code l

Re: [Tutor] A simple question about creating a program

2005-03-31 Thread Alan Gauld
> I was wondering, can you make a program the uses alot of classes do > the exact same thing with out useing classes? Yes you can always write a program without classes but it may be a lot more work and its likely to be a lot harder to maintain. Especially if its a big program. However if you

Re: [Tutor] A simple question about creating a program

2005-03-30 Thread Danny Yoo
On Wed, 30 Mar 2005, Kevin wrote: > I was wondering, can you make a program the uses alot of classes do the > exact same thing with out useing classes? Hi Kevin, Yes. We can even do a lot of object oriented programming without classes, although it might be slightly painful. You asked an ea

Re: [Tutor] A simple question about creating a program

2005-03-30 Thread Max Noel
On Mar 30, 2005, at 23:00, Kevin wrote: I was wondering, can you make a program the uses alot of classes do the exact same thing with out useing classes? Yes. At some point, a program always has to be translated to machine code to be executed by the processor. Machine language is not object-orie

Re: [Tutor] A simple question about creating a program

2005-03-30 Thread Liam Clarke
Yes you can, but if an app uses a lot of classes, chances are that it's the simplest way to do it. OOP is really just a convenient way to work with code. On Wed, 30 Mar 2005 16:00:03 -0500, Kevin <[EMAIL PROTECTED]> wrote: > I was wondering, can you make a program the uses alot of classes do > th

RE: [Tutor] A simple question about creating a program

2005-03-30 Thread Ryan Davis
Sure. Thanks, Ryan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Sent: Wednesday, March 30, 2005 4:00 PM To: tutor@python.org Subject: [Tutor] A simple question about creating a program I was wondering, can you make a program the uses alot of

[Tutor] A simple question about creating a program

2005-03-30 Thread Kevin
I was wondering, can you make a program the uses alot of classes do the exact same thing with out useing classes? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor