Modulo question

Hello Guys,

I have a question, I’m trying to make a custom module with some functions, I started by doing some testing.

modulo.py (287 Bytes)
test.py (1.3 KB)

So it is, I build a simple module with some simple functions (just pass some messages) modulo.py,

And I’ll call this module the test script, so far everything works fine, the problem is when I have to change the modulo.py, if I change some line this only takes effect when the rhino is restarted.

This wakes up a lot of trouble, is there any way to do an update to the module without rebooting?

Hi @MatrixRatrix, try to put below in test.py, but you must still import it:

reload (modulo)

_
c.

Thank you,

Reload dont work, give a sintax error.

@MatrixRatrix,

what error do you get ? You might post some simple example so the error can be replacated. Your two scripts above do not have the imports we’re talking about, reload is a standart function.

_
c.

In the Rhino Python Editor, go Tools > Reset Script Engine every time you’ve made changes to the module you’re importing.

Thank you,

I already find this Reset script engine, thank you anyway.