Re: [Tutor] using -i flag with '''if __name__ == "__main__":'''

2005-05-20 Thread Kent Johnson
Alan G wrote: >>>I think this approach to debugging won't scale well and you are > > just > >>>seeing the tip of the iceberg [and more helpful stuff, > > snipped.] > >>Thanks to you both. I think I may need to step up my "development >>environment" beyond emacs and a command line. > > >

Re: [Tutor] using -i flag with '''if __name__ == "__main__":'''

2005-05-20 Thread Alan G
> > I think this approach to debugging won't scale well and you are just > > seeing the tip of the iceberg [and more helpful stuff, snipped.] > > Thanks to you both. I think I may need to step up my "development > environment" beyond emacs and a command line. I don't see why. The very biggest

Re: [Tutor] using -i flag with '''if __name__ == "__main__":'''

2005-05-19 Thread Terry Carroll
On Thu, 19 May 2005, Max Noel wrote: > On May 19, 2005, at 23:05, Terry Carroll wrote: > > > Thanks to you both. I think I may need to step up my "development > > environment" beyond emacs and a command line. > > Actually, if you're having problems with debugging your problem, > what you

Re: [Tutor] using -i flag with '''if __name__ == "__main__":'''

2005-05-19 Thread Max Noel
On May 19, 2005, at 23:05, Terry Carroll wrote: > Thanks to you both. I think I may need to step up my "development > environment" beyond emacs and a command line. Actually, if you're having problems with debugging your problem, what you should step up is your approach to debugging/testi

Re: [Tutor] using -i flag with '''if __name__ == "__main__":'''

2005-05-19 Thread Terry Carroll
On Wed, 18 May 2005 [EMAIL PROTECTED] wrote: > Another possibility is to look at this recipe: > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65287 On Tue, 17 May 2005, Kent Johnson wrote: > I think this approach to debugging won't scale well and you are just > seeing the tip of the ic

Re: [Tutor] using -i flag with '''if __name__ == "__main__":'''

2005-05-17 Thread Kent Johnson
Terry Carroll wrote: > I've often found it convenient to run a Python program I'm developing with > the -i flag. I find it convenient to use as a post-mortem as it hits bugs, > or to explore data structures. > > I've recently started using the construct > > if __name__ == "__main__": >

Re: [Tutor] using -i flag with '''if __name__ == "__main__":'''

2005-05-17 Thread Terry Carroll
On Wed, 18 May 2005 [EMAIL PROTECTED] wrote: > If main is a class, you could change to 'm = main()'; that would at > least give you access to the class attributes. Interesting approach; I'm refering to where main() is a method, the usual python idiom. __

Re: [Tutor] using -i flag with '''if __name__ == "__main__":'''

2005-05-17 Thread jfouhy
Quoting Terry Carroll <[EMAIL PROTECTED]>: > I've recently started using the construct > > if __name__ == "__main__": > main() > > And found I can't do the -i thing effectively any more. What's a good > equivalent approach? If main is a class, you could change to 'm = main()'; that would at

[Tutor] using -i flag with '''if __name__ == "__main__":'''

2005-05-17 Thread Terry Carroll
I've often found it convenient to run a Python program I'm developing with the -i flag. I find it convenient to use as a post-mortem as it hits bugs, or to explore data structures. I've recently started using the construct if __name__ == "__main__": main() And found I can't do the -i