Sometimes I open python scripts in the editor and change a few lines for my particular use. These scripts are shared over a network connection with other users, so I don’t necessarily want to save my changes yet. In Rhino 7, this is not an issue, it runs the script, but leaves it unsaved. In Rhino 8 Beta, it is saving over the python script when I run it. I don’t like this behavior as much as the previous, makes development a little bit harder.
Could a solution be to use the RED floppydisk to SaveAs before you run the script? It makes a lot a sense what you are saying, but it is also understandable if a script needs to be saved before running it.
As far as I know Rhino has always saved Python scripts when running them, even in V6 and V7. A quick test here in V7, I made a script that just printed “Hello Rhino” to the command line and saved it under a name. Ran it once, then added a comment line to the script and ran it again. Then closed the script editor and then Rhino. No “Do you want to save…” messages appeared. I then re-opened Rhino and the script editor with the script. The comment line was there, even though I had not specifically saved the script after it was added.
Note also that if you make changes to a script (still V7), and they are not saved, the editor puts an asterisk after the name. If you run the script (without saving), the asterisk disappears - indicating the the script has been saved.
When I recently used the script editor in V8, I thought the same as jcparks - that this was new. My recollection was that this didn’t happen in V7, and I was about to write a message but thought I should check V7 first and saw that it works the same in V7. But…did that change in a V7 update, or am I also forgetting how it has worked all along?
I think way back in V5 I posted a message on the old now defunct Rhino Python forum asking why scripts had to be automatically saved when running them. I don’t recall the answer anymore, but I think it’s been this way since the beginning.
Thanks for the responses, yes it does behave the same in V7, so I must have just assumed it was different in V8 for some reason. I need to go back and fix a lot of my coworkers’ shared python files now…
Maybe my memory is going bad, but more likely this is another Mandela Effect.
It would seem this is the solution I will have to use, thanks.
It’s been this way since the beginning.