[Zope] add LocalFS in python
Dennis Allison
allison at sumeru.stanford.EDU
Fri Oct 17 12:02:21 EDT 2003
Tom, I don't think the backslashes need to be escaped here.
Michael, without the backtrace it's difficult to identify what the problem
is. The message tends to arrive when you try to index None. I suspect a
default parameter is the culprit. Check the code for LocalFS--shouldn't
you should be calling the constructor with keyword parameters (
name=value, name=value, etc.) rather than positional parameters.
On Fri, 17 Oct 2003, Passin, Tom wrote:
> [ From: Michael]
> > When I try the following python script the message 'TypeError:
> > unsubscriptable object' appears.
> >
> > Python script
> >
> > container.manage_addProduct['LocalFS'].manage_addLocalFS('test
> > ','test','c:\temp\test3')
>
> Before anything else, you need to escape the backslashes -
>
> manage_addLocalFS('test','test','c:\\temp\\test3')
>
> Remember, you are writing a Python expression, and backslashes in
> strings need to be escaped.
>
> Cheers,
>
> Tom P
>
> _______________________________________________
> Zope maillist - Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
>
More information about the Zope
mailing list