On Sun, Jan 10, 2010 at 3:09 PM, MRAB <pyt...@mrabarnett.plus.com> wrote:
> browser = form.getfirst('browser', 'all') >> except: >> browser = headers() >> >> try: > A bare except, and if an exception _does_ occur, they'll be a NameError > because 'headers' isn't defined. > > <slap with large halibut/> Oh, not the large halibut again! (I will be cleaning them up ;) > > > os.chdir('%s/..' % cwd) >> sys.path.append(os.getcwd()) >> from templateFrame import top, bottom >> os.chdir(cwd) >> >> Why doesn't it work if I move the bottom imports to the top? The form >> values get lost, even though I chdir to cwd. >> >> I try to avoid changing the directory. > It's either that or copying them all over to the other dir, which is even worse, since I don't want to maintain identical scripts. Thanks, beno
-- http://mail.python.org/mailman/listinfo/python-list