Re: [Tutor] Controlling Where My Program Ends

2005-06-14 Thread Don Parris
On Wed, 15 Jun 2005 00:59:24 - "DC Parris" <[EMAIL PROTECTED]> wrote: > Never mind. I found it - sys.exit() > > Sorry to have wasted the bandwidth/time. > -- This was in reference to a post about exiting from a program. I couldn't figure out why my program wouldn't let me exit from within

Re: [Tutor] Controlling Where My Program Ends

2005-06-14 Thread DC Parris
Never mind. I found it - sys.exit() Sorry to have wasted the bandwidth/time. -- DC Parris Matheteuo Christian Fellowship [EMAIL PROTECTED] http://matheteuo.org/ Free software is like God's love - you can share it with anyone anywhere anytime! ___ Tuto

Re: [Tutor] can't see emacs timer in action

2005-06-14 Thread Danny Yoo
On Wed, 15 Jun 2005, Pujo Aji wrote: > Thanks Danny, > > Btw, I use xemacs now does it has folding class and method capabilities? Hi Pujo, [Note: in replies, please make sure to put tutor@python.org in CC.] According to: http://groups.google.ca/group/comp.lang.python/msg/956f1c2d37f93995?

Re: [Tutor] can't see emacs timer in action

2005-06-14 Thread Danny Yoo
On Tue, 14 Jun 2005, Pujo Aji wrote: > I tried this code in emacs. > for i in range(3): > time.sleep(1) > print i > > It shows the result but total result not second per second. Hi Pujo, In Emacs, you may want to first start up a Python subprocess by using the keystroke: C-c ! and t

Re: [Tutor] can't see emacs timer in action

2005-06-14 Thread Max Noel
On Jun 14, 2005, at 23:17, Pujo Aji wrote: > I just use Ctrl+C Ctrl+C to run the code. > The code wait for 3 second and show all i all together. > > I can't feel every second pass. > > pujo Try running your script from a terminal (outside of emacs, that is). -- Max maxnoel_fr at yahoo do

Re: [Tutor] can't see emacs timer in action

2005-06-14 Thread Max Noel
On Jun 14, 2005, at 22:56, Pujo Aji wrote: > Hello, > > I tried this code in emacs. > for i in range(3): > time.sleep(1) > print i > > It shows the result but total result not second per second. > > Any one experiance this problem > > pujo Works for me... How do you run it? Do you use a

[Tutor] can't see emacs timer in action

2005-06-14 Thread Pujo Aji
Hello, I tried this code in emacs. for i in range(3): time.sleep(1) print i It shows the result but total result not second per second. Any one experiance this problem pujo ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/lis

Re: [Tutor] is this a bug global i ???

2005-06-14 Thread Alan G
class A: def __init__(self,j): self.j = j def something(self): print self.j print i# PROBLEM is here there is no var i in class A but it works ??? if __name__ == '__main__': i = 10 a = A(5) a.something() > I don't define global i but it will takes var i from ou

Re: [Tutor] Trying Ruby...

2005-06-14 Thread Terry Carroll
My original question: > I vaguely recall a post a few months ago, I don't know if it was in this > forum, where someone had a problem in Python, and it turns out it was > because a Ruby install messed with some setting, perhaps in the Windows > registry Anyway, I'd like to install Ruby, but wa

Re: [Tutor] is this a bug global i ???

2005-06-14 Thread Marilyn Davis
On Tue, 14 Jun 2005, Pujo Aji wrote: > I have code like this: > > class A: > def __init__(self,j): > self.j = j > > def something(self): > print self.j > print i# PROBLEM is here there is no var i in class A > but it works ??? > > if __name__ == '__main__': > i =

[Tutor] Which Popen For Win32?

2005-06-14 Thread Gooch, John
I am using the Winzip 9.0 Command Line Add-on to archive very large files ( 1GB and over ) that are too large to be handled by Zipfile( this bug has been reported but not resolved ). I tried calling the external program using os.system(), but something about the output crashes my IDE ( Eclipse ), s

Re: [Tutor] Passing command line argument in function

2005-06-14 Thread Gary Taylor
>> >> >> ftp.storbinary(stor file_to_transfer, open(file_to_transfer,"r")) >> > >You need to create the command as a string: >ftp.storbinary("stor " + file_to_transfer, >open(file_to_transfer,"r")) > >Kent That worked perfectly, I was way off. Thank-you! Gary p.s. sorry for the out of thread

Re: [Tutor] is this a bug global i ???

2005-06-14 Thread Kent Johnson
Pujo Aji wrote: > I have code like this: > > class A: > def __init__(self,j): > self.j = j > > def something(self): > print self.j > print i# PROBLEM is here there is no var i in class A > but it works ??? > > if __name__ == '__main__': > i = 10 > a = A(5) > a

Re: [Tutor] Passing command line argument in function

2005-06-14 Thread Kent Johnson
Gary Taylor wrote: > I'm trying to pass the name of a file as the first argument > to the ftp.storbinary function(?) below. The only thing I > can get to work is the real file name hard coded as the > argument. I've tried parenthesis, single quotes, double > quotes, and many combinations of the p

[Tutor] is this a bug global i ???

2005-06-14 Thread Pujo Aji
I have code like this: class A: def __init__(self,j): self.j = j def something(self): print self.j print i# PROBLEM is here there is no var i in class A but it works ??? if __name__ == '__main__': i = 10 a = A(5) a.something() I don't define global i but it w

Re: [Tutor] Strange IndexError

2005-06-14 Thread Willi Richert
Hi Danny, I've posted the bug at the pyro ML. However the old IndexError annoys me more and more. Although I have encapsulated it with try/except blocks and that works ok for what I want, I really want to understand how an exception like Traceback (most recent call last): File "NeedBrain.py",