Reloading Python code without restarting the FreeCAD

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
User avatar
Kunda1
Posts: 8799
Joined: Thu Jan 05, 2017 9:03 pm

Re: Reloading Python code without restarting the FreeCAD

Post by Kunda1 » Thu Feb 06, 2020 4:45 pm

Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
microelly2
Posts: 4690
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Reloading Python code without restarting the FreeCAD

Post by microelly2 » Fri Feb 07, 2020 7:52 am

steve123 wrote:
Thu Feb 06, 2020 4:18 pm
It would be handy for debugging if there was a button somewhere (or maybe just a "developer" menu item) that would allow you to force FreeCAD to reload a module(s).
You can hack your own reolad where you want.
But there cannot be a general solution.
If you have created python objects and you reload the class definitons you will get unexpected results or in worst case crashes.
So you should know what you do when you force a reload.
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests