I’m trying to find a shortcut to the following loop. When developing a mathematica’s package one is implementing changes to the .m file’s code and then want to test the changes in another notebook. This is an infinite loop…
So, we have a package package.m and a notebook test_package.nb where testing is done. Currently, when ever I change something in the .m file, I then have to:
Quit[]
Needs["package`"]
in the notebook for the changes to become available, so I can test them. It seems like without the Quit[] it doesn’t work.
Is there a shorter way to iterate this development loop? In particular avoid the quitting?
Aftermath
If I could, I’d accept both ruebenko and Leonid’s answers as both are helpful and solve my problem. However, as only one answer can be chosen, I picked ruebenko’s due to is simplicity and easiness – by simply changing the Needs to Get I overcame my problem. Nevertheless, Leonid’s package is for sure more sophisticated and probably at the end of the day yields better results, but it has to be installed, loaded etc.
Use Get; Need only loads the package if is not loaded at all. Sometimes you need to be careful and use ClearAll on the variables in the package.