Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix https://github.com/winpython/winpython/issues/1675#1676

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
stonebig merged 1 commit intowinpython:masterfromstonebig:master
Jul 12, 2025
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletionswppm/associate.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,6 +12,7 @@
import winreg
from . import utils
from argparse import ArgumentParser
import shutil

def get_special_folder_path(path_name):
"""Return special folder path."""
Expand All@@ -37,7 +38,7 @@ def remove_winpython_start_menu_folder(current=True):
path = get_winpython_start_menu_folder(current=current)
if Path(path).is_dir():
try:
shutil.rmtree(path, onexc=onerror)
shutil.rmtree(path)
except WindowsError:
print(f"Directory {path} could not be removed", file=sys.stderr)

Expand All@@ -46,7 +47,7 @@ def create_winpython_start_menu_folder(current=True):
path = get_winpython_start_menu_folder(current=current)
if Path(path).is_dir():
try:
shutil.rmtree(path, onexc=onerror)
shutil.rmtree(path)
except WindowsError:
print(f"Directory {path} could not be removed", file=sys.stderr)
Path(path).mkdir(parents=True, exist_ok=True)
Expand DownExpand Up@@ -239,7 +240,7 @@ def register(target, current=True, reg_type=winreg.REG_SZ, verbose=True):
# Create start menu entries
if has_pywin32:
if verbose:
print(f'Creating WinPython menu for all icons in {target.parent}')
print(f'Creating WinPython menu for all icons in {Path(target).parent}')
for path, desc, fname in _get_shortcut_data(target, current=current, has_pywin32=True):
try:
create_shortcut(path, desc, fname, verbose=verbose)
Expand DownExpand Up@@ -268,7 +269,7 @@ def unregister(target, current=True, verbose=True):
# Remove start menu shortcuts
if has_pywin32:
if verbose:
print(f'Removing WinPython menu for all icons in {target.parent}')
print(f'Removing WinPython menu for all icons in {Path(target).parent}')
_remove_start_menu_folder(target, current=current, has_pywin32=True)
# The original code had commented out code to delete .lnk files individually.
else:
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp