Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Cpython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sip
Cpython
Commits
b1924b10
Unverified
Commit
b1924b10
authored
2 years ago
by
Anthony Shaw
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
GH-95029: Describe Windows Store package isolation and redirection in more detail (GH-95030)
parent
6e2fbdab
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Doc/using/windows.rst
+31
-3
31 additions, 3 deletions
Doc/using/windows.rst
with
31 additions
and
3 deletions
Doc/using/windows.rst
+
31
−
3
View file @
b1924b10
...
...
@@ -34,7 +34,7 @@ developers using Python for any kind of project.
:ref:`windows-store` is a simple installation of Python that is suitable for
running scripts and packages, and using IDLE or other development environments.
It requires Windows 10, but can be safely installed without corrupting other
It requires Windows 10
and above
, but can be safely installed without corrupting other
programs. It also provides many convenient commands for launching Python and
its tools.
...
...
@@ -348,14 +348,42 @@ Python in Start and right-click to select Uninstall. Uninstalling will
remove all packages you installed directly into this Python installation, but
will not remove any virtual environments
Known
I
ssues
Known
i
ssues
------------
Redirection of local data, registry, and temporary paths
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Because of restrictions on Microsoft Store apps, Python scripts may not have
full write access to shared locations such as
`
`TEMP`
`
and the registry.
full write access to shared locations such as
:envvar:
`TEMP` and the registry.
Instead, it will write to a private copy. If your scripts must modify the
shared locations, you will need to install the full installer.
At runtime, Python will use a private copy of well-known Windows folders and the registry.
For example, if the environment variable :envvar:`%APPDATA%` is :file:`c:\\Users\\<user>\\AppData\\`,
then when writing to :file:`C:\\Users\\<user>\\AppData\\Local` will write to
:file:`C:\\Users\\<user>\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\\LocalCache\\Local\\`.
When reading files, Windows will return the file from the private folder, or if that does not exist, the
real Windows directory. For example reading :file:`C:\\Windows\\System32` returns the contents of :file:`C:\\Windows\\System32`
plus the contents of :file:`C:\\Program Files\\WindowsApps\\package_name\\VFS\\SystemX86`.
You can find the real path of any existing file using :func:`os.path.realpath`:
.. code-block:: python
>>> import os
>>> test_file = 'C:\\Users\\example\\AppData\\Local\\test.txt'
>>> os.path.realpath(test_file)
'C:\\Users\\example\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\\LocalCache\\Local\\test.txt'
When writing to the Windows Registry, the following behaviors exist:
* Reading from ``HKLM\\Software`` is allowed and results are merged with the :file:`registry.dat` file in the package.
* Writing to ``HKLM\\Software`` is not allowed if the corresponding key/value exists, i.e. modifying existing keys.
* Writing to ``HKLM\\Software`` is allowed as long as a corresponding key/value does not exist in the package
and the user has the correct access permissions.
For more detail on the technical basis for these limitations, please consult
Microsoft's documentation on packaged full-trust apps, currently available at
`docs.microsoft.com/en-us/windows/msix/desktop/desktop-to-uwp-behind-the-scenes
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment