Re: simply python modules question

Date : Wed, 20 Jul 2005 18:11:21 -0400
To : XSI(at)Softimage.COM
From : Patrick Boucher <patrickb(at)buzzimage.com>
Subject : Re: simply python modules question
xsibrad(at)fie.us wrote:
Hi,

I've got a command that's importing a custom python module.

I've added the package to the PYTHONPATH variable and it runs.

However, if I open the module, make a change, and save it, I have to restart XSI
in order for the change to make it into the XSI execution environment.

Is there a well known and accepted way to have the XSI python execution
evironment flush the module from memory and reload it from the new source
without having to restart XSI?

Before I spend hours trying to work around this myself, I thought I'd check with
the minds on the list.  I'm fairly new to Python.

Thanks.

-brad


You probably have to reload the module

when in development write:
import myModule
reload(myModule)

once you are ready to deploy you can remove the reload line.

--
Patrick Boucher
TD - Coder - Resident geek
Buzz Image Group
Tel 514.848.0579
Fax 514.848.6371

www.buzzimage.com
www.xsi-blog.com
---
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.