<div class="gmail_quote">On Sun, Jan 10, 2010 at 3:09 PM, MRAB <span dir="ltr"><<a href="mailto:python@mrabarnett.plus.com">python@mrabarnett.plus.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
browser = form.getfirst('browser', 'all')<br>
except:<br>
browser = headers()<br>
<br>
</blockquote>try:<br></div>
A bare except, and if an exception _does_ occur, they'll be a NameError<br>
because 'headers' isn't defined.<br>
<br>
<slap with large halibut/></blockquote><div><br>Oh, not the large halibut again! (I will be cleaning them up ;) <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
os.chdir('%s/..' % cwd)<br>
sys.path.append(os.getcwd())<br>
from templateFrame import top, bottom<br>
os.chdir(cwd)<br>
<br>
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.<br>
<br>
</blockquote></div>
I try to avoid changing the directory.<br></blockquote><div><br>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.<br>Thanks,<br>beno<br>
</div></div>