Modulo question


(Ricardo) #1

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?


#2

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

reload (modulo)

_
c.


(Ricardo) #3

Thank you,

Reload dont work, give a sintax error.


#4

@ricardo.eira,

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.


#5

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


(Ricardo) #6

Thank you,

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