dzham Hey just wanted to thank you for writing this code. I was about to go into Linux and start it up but I saw elsewhere on this forum that another MUCH easier method should work. Just thought I'd pay it forward since I nearly panicked from not being able to send my XLM with Stargazer anymore.
I made my own edits because this is what gave me the private key that I could import into Solar Wallet:
To access this secret key you should open Stargazer and click on this button in the upper right corner. Then select "Advanced" -> "Export Account". If there is no secret key shown, you will need to first REMOVE THE PASSWORD from your Stargazer account." Go to "Password" and click on the green button to turn it off. It should prompt you to type in your password. Now go back to "Advanced" -> "Export Account" and you should be able to see the long key starting with an S right below the QR code.
Hope this helps!