Windows env var %LOCALAPPDATA% should always be set.
On my windows machine that points exactly to what you are after:
>>> os.getenv("LOCALAPPDATA")
'C:\\Users\\Ben\\AppData\\Local'

Unfortunately I couldn't find any official documentation corroborating this
but if Microsoft is very careful about backwards compatibility - it should
be safe to rely on this key.

On Sat, Feb 13, 2021 at 1:35 PM Daniele Nicolodi <[email protected]> wrote:

> Hello,
>
> as part of the work on benagulp I wrote a small decorator to cache the
> return value of functions to disk
> https://github.com/beancount/beangulp/pull/33  The idea is that often
> importer code needs to convert input files from PDF or other formats to
> something more easily parsed.  These conversions can take a sizeable
> time.  Currently beangulp has a facility to cache the conversions within
> the same execution of the ingest mechanism, but not between runs.
> Especially when developing the importer, it would be nice to speed up
> the invocations.  Thus this work.
>
> This long introduction is just to ask: where should the disk cache be
> located on Windows? On Unix-like platforms I think ~/.cache/benagulp/ is
> the right location, but I don't know what is the equivalent of this on
> Windows. I think C:\Users\<user>\AppData\Local\Beangulp could be a good
> candidate, but I don't know how to get to it.
>
> Thank you.
>
> Cheer,
> Dan
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/8ad06c3e-ada5-c37c-a5b5-89a19baa6073%40grinta.net
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CACGEkZvMZ5i4%2B-%2BSKG2vsHQ0K%3DFRAE3LpVufwTuCuZeKNwSJWw%40mail.gmail.com.

Reply via email to