Re: Re: Load and save commands for interpeter
"Mark Hahn" <[email protected]>
| Newsgroups | gmane.comp.lang.prothon.user |
|---|---|
| Message-ID | <[email protected]> |
Michael Geary wrote: >> From: Mark Hahn >> The history of what has happened in your session is already >> in a file you can open and edit to turn into a script. The >> file **is in the same folder as prothon.exe** and is called >> ".prothon_history". Have you ever noticed that the command >> history was remembered between sessions? [emphasis added] > > Short term, that file location is no problem. Longer term, it won't > fly. You may not be able to write *anything* to the directory > containing prothon.exe, except at install time. This file and any > others like it should go in the user's profile, either in the > Application Data or Local Settings\Application Data folder, depending > on whether it should be uploaded and downloaded as part of a roaming > profile. > > I only have a minute right now, but later on I can get you the APIs > to use if you're not already familiar with them. (For Windows; I > don't know the ins and outs for Linux and other OSes--but in general > there should be both the concept of the application install directory > and a user-specific data directory.) As Paul pointed out, there is a lame attempt at home support right now with a HOME environment variable. I'll add a to-do item to add full support for a sys.userHome path that parallels the sys.prothonHome path we already have.