RE: [Zope] Change current path in External Method
by Passin, Tom other posts by this author
Dec 30 2002 3:56PM messages near this date
Re: [Zope] Creating Page Templates using XML-RPC
|
[Zope] Are Lookups via DTML methods efficient?
[ Jo Meder]
> Am 28.12.2002, 14:25 Uhr
> schräb Klimovich Alexander <klima@[...].by>:
>
> > Can anyone tell me how to change system current folder using python
> > methods?
>
> Actually the best source for questions like this is <gasp> the python
> documentation: http://www.python.org/doc/
>
However, I strongly suggest that you not actually change the current directory, since other
modules will not know that you changed it. If any of them depend on the actual value of the
current working directory (shame on them!) they will be in trouble.
If you know the absolute path, just use that. If you need a path relative to your module,
you can get the module to tell you where it (or its owing package) is located and construct
paths relative to that - that too is in the Python docs.
The os library module has good functions for working with paths. See the docs.
Cheers,
Tom P
_______________________________________________
Zope maillist - Zope@[...].org
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
|