Academic Question

Victor Subervi victorsubervi at gmail.com
Mon Jan 11 14:55:21 CET 2010


On Sun, Jan 10, 2010 at 3:09 PM, MRAB <python at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100111/266e4518/attachment.html>


More information about the Python-list mailing list