shoebot / shoebot

Easy vector graphics with Python
http://shoebot.net
GNU General Public License v3.0
129 stars 25 forks source link

Livecoding: improvements around code reloading #82

Open stuaxo opened 10 years ago

stuaxo commented 10 years ago

The code is just execed, at the moment when it changes.. this isn't nice because normal "dynamic" scripts don't expect the body code to re-execute, they just want the functions updated.

The LiveExecutor should remove the body code (but keep function and global definitions) then reload.

All functions, should have their co_code updated. This is the same approach as pyHotReload.

stuaxo commented 8 years ago

Lifecycle has been improved so vars work.

Still need to have reloading that can do the co_code trick.

stuaxo commented 5 years ago

The best improvement would be to use fork on Windows this isn't supported (need to check with Windows 10, as they are making a lot of improvments from other OSs) so would probably need the existing method.