Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop-Handler for Python files #44569

Closed
leonidasxiv mannequin opened this issue Feb 10, 2007 · 5 comments
Closed

Drop-Handler for Python files #44569

leonidasxiv mannequin opened this issue Feb 10, 2007 · 5 comments
Assignees
Labels
OS-windows topic-installation type-feature A feature request or enhancement

Comments

@leonidasxiv
Copy link
Mannequin

leonidasxiv mannequin commented Feb 10, 2007

BPO 1656675
Nosy @loewis

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/loewis'
closed_at = <Date 2008-11-07.18:57:29.328>
created_at = <Date 2007-02-10.11:36:45.000>
labels = ['type-feature', 'expert-installation', 'OS-windows']
title = 'Drop-Handler for Python files'
updated_at = <Date 2008-11-07.18:57:29.327>
user = 'https://bugs.python.org/leonidasxiv'

bugs.python.org fields:

activity = <Date 2008-11-07.18:57:29.327>
actor = 'loewis'
assignee = 'loewis'
closed = True
closed_date = <Date 2008-11-07.18:57:29.328>
closer = 'loewis'
components = ['Installation', 'Windows']
creation = <Date 2007-02-10.11:36:45.000>
creator = 'leonidasxiv'
dependencies = []
files = []
hgrepos = []
issue_num = 1656675
keywords = []
message_count = 5.0
messages = ['55012', '55013', '55014', '55015', '75610']
nosy_count = 3.0
nosy_names = ['loewis', 'jimjjewett', 'leonidasxiv']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue1656675'
versions = ['Python 2.6']

@leonidasxiv
Copy link
Mannequin Author

leonidasxiv mannequin commented Feb 10, 2007

Hi!

We had a dscussion about what happens when one drops a file on a python sourcecode-file in the python-forum [1]. It turned out, that nothing happens at all. So someone brought up a solution. It is not really a problem with Python but it would be nice to add this to the Windows Installer.

The proposed solution was to add the following to the registry (this is the format of the registry editor):

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Python.File\shellex\DropHandler]
@="{86C86720-42A0-1069-A2E8-08002B30309D}"

[HKEY_CLASSES_ROOT\Python.NoConFile\shellex\DropHandler]
@="{86C86720-42A0-1069-A2E8-08002B30309D}"

[HKEY_CLASSES_ROOT\Python.CompiledFile\shellex\DropHandler]
@="{86C86720-42A0-1069-A2E8-08002B30309D}"

That should be simple thing to do using the MSI-Installer.

[1] only in german, sorry: http://www.python-forum.de/topic-7493.html

@leonidasxiv leonidasxiv mannequin assigned loewis Feb 10, 2007
@leonidasxiv leonidasxiv mannequin added topic-installation type-feature A feature request or enhancement labels Feb 10, 2007
@leonidasxiv leonidasxiv mannequin assigned loewis Feb 10, 2007
@leonidasxiv leonidasxiv mannequin added topic-installation type-feature A feature request or enhancement labels Feb 10, 2007
@jimjjewett
Copy link
Mannequin

jimjjewett mannequin commented Mar 6, 2007

What would happen then? For example, should it cause python to start up, running with that file, and the dropped file as stdin?

@jimjjewett
Copy link
Mannequin

jimjjewett mannequin commented Apr 16, 2007

Suggesting close, for insufficient documentation.

@loewis
Copy link
Mannequin

loewis mannequin commented Apr 16, 2007

I plan to implement this for 2.6; I think I can make sense out of it.

With this setting, dropping file foo.txt on file bar.py will run "python.exe bar.py foo.txt", through different levels of indirection. So the file (path) being dropped appears as sys.argv[1].

@loewis
Copy link
Mannequin

loewis mannequin commented Nov 7, 2008

I have now added a drop handler in r67149, r67150, and r67151. However,
I chose the wsh handler ({60254CA5-953B-11CF-8C96-00AA00B8708C}) instead
of the batch file one, as the wsh handler provides long file names,
whereas the batch file handler passes 8.3 names.

@loewis loewis mannequin closed this as completed Nov 7, 2008
@loewis loewis mannequin closed this as completed Nov 7, 2008
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS-windows topic-installation type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

1 participant