QUOTE(uiron @ 09/16/08, 05:01 PM) [snapback]291750[/snapback]
is it possible to reload my own Python files, much like there's an option for MEL files through rehash() function?
Rehash does not re-read the files, so i wonder if that would work out for you at all
(but source does!). It just updates the lookup accelerator. A loaded function in mel would still be loaded. In sense it works just like pythons import, you would need to re source it again in maya. Python does not need to rehash because its not using the load accelerator like maya does. It will know if a new file is inserted even if it wasnt put to library at start of maya, much akin to how maya used to work piror to rehash. (this said rehash isnt needed or even help in loading the file anew unless its there with a new name or place on them. This applies only for mel python manages them directly form disk)
In python a already imported module is loaded. You can ensure python releoads it use the python finction reload() Theres a catch to reloading tough. Read:
http://pyunit.sourceforge.net/notes/reloading.html
Problem is that you need to reload modules in right order if they import into one anouther.