Re: [Python] import module in current path?

Date : Thu, 12 Apr 2007 06:11:59 -0500
To : XSI(at)Softimage.COM
From : "Bernard Lebel" <3dbernard(at)gmail.com>
Subject : Re: [Python] import module in current path?
Nothing prevents you from modifying the Python paths at runtime.

In the running script, import the sys module. Then do

sys.path.path( "the path" )

Then you can perform the import.


Cheers Bernard



On 4/11/07, Agedito <mislistas(at)agedito.com> wrote:




Hello



How can I import a module that is in the same path of the running-script?

I try it but if the path isn't in the sys.path I can't import it. Is
possible in anyway?



Thanks in advanced
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.