[issue41196] APPDATA directory is different in store installed python

2020-07-03 Thread Steve Dower
Steve Dower added the comment: > A crude workaround is to script PowerShell or CMD in a child process. I mean, that's not a *terrible* workaround: >>> import os >>> p1 = os.path.expandvars("%APPDATA%\\test.txt") >>> p1 'C:\\Users\\steve\\AppData\\Roaming\\test.txt' >>> open(p1, "w").close()

[issue41196] APPDATA directory is different in store installed python

2020-07-02 Thread Eryk Sun
Eryk Sun added the comment: > What it really means for apps that are trying to share state across > different Python runtimes is that they're not going to have such a > great time. I tried impersonating the token of Explorer in the current thread (i.e. GetShellWindow,

[issue41196] APPDATA directory is different in store installed python

2020-07-02 Thread Steve Dower
Steve Dower added the comment: As an aside, virtual environments will have the same redirection as the base interpreter, so this is really only an issue between a 3.7 install and a 3.8 install, or a Store install and a traditional install. -- ___

[issue41196] APPDATA directory is different in store installed python

2020-07-02 Thread Steve Dower
Steve Dower added the comment: This is by (Windows's) design - separate apps are treated as separate by the Windows app model. In the latest and N-1 updates to Windows, the AppData redirection only applies to newly created files, not those that already exist. [1] Before then, it used

[issue41196] APPDATA directory is different in store installed python

2020-07-02 Thread aku911
aku911 added the comment: This is causing this issue here: https://github.com/microsoft/vscode-python/issues/11412 -- ___ Python tracker ___

[issue41196] APPDATA directory is different in store installed python

2020-07-02 Thread aku911
New submission from aku911 : Install the windows store python then run this code: import os os.listdir(os.environ['APPDATA']) Install another version of python and run the same code. You'll get different results. This can cause issues when trying to share data in a user's APPDATA folder.

[issue41196] APPDATA directory is different in store installed python

2020-07-02 Thread aku911
Change by aku911 : -- components: Windows nosy: aku911, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: APPDATA directory is different in store installed python type: behavior versions: Python 3.8