8000 Open With "IDLE (Python GUI).exe" doesn't open the py script and only opens the shell · Issue #1576 · winpython/winpython · GitHub
[go: up one dir, main page]

Skip to content

Open With "IDLE (Python GUI).exe" doesn't open the py script and only opens the shell #1576

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

Closed
lilpetamoix opened this issue Apr 27, 2025 · 37 comments · Fixed by #1577
Closed

Comments

@lilpetamoix
Copy link

Hello, I've recently downloaded 31320 and previously had 31090.

I've registered via command wppm --register.

I've tried opening a script file as usual, and selected open with "IDLE (Python GUI).exe".

However, doing so only opens the shell and not the script itself.

I made sure to unregister the prior version 31090, deleted the 31090 folder, and ran a registry cleaner to ensure there was no conflict with the prior version.

So I'm pretty sure I'm trying to open my scripts with version 31320 only, but open the script file with "IDLE (Python GUI).exe" doesn't open it and only opens the shell.

Is there a way to fix this issue?

stonebig added a commit to stonebig/winpython that referenced this issue Apr 27, 2025
shall fix winpython#1576
(for this rc at least)
@stonebig stonebig mentioned this issue Apr 27, 2025
@stonebig
Copy link
Contributor
stonebig commented Apr 27, 2025

hummm:

  • checking on just released rc of this night:
    • the direct call to .\scripts\register_python.bat and .\scripts\unregister.bat do work
    • but not wppm --register because I missed for explicit Path() conversion...

Image

@stonebig
Copy link
Contributor
stonebig commented Apr 27, 2025

on your version, try:

.\scripts\unregister_python.bat

then

.\scripts\register_python.bat

@stonebig
Copy link
Contributor

the new version is more explicit on what it does in "-v" verbose mode, yet --register as a bug in rc

but, I don't see what miss you in the old one.

new version in verbose mode:

Creating WinPython registry entries for C:\WinP\bd312\budot\WPy64-312100\python
HKEY_CURRENT_USER\Software\Classes\.py\:Python.File
HKEY_CURRENT_USER\Software\Classes\.py\Content Type:text/plain
HKEY_CURRENT_USER\Software\Classes\.pyw\:Python.NoConFile
HKEY_CURRENT_USER\Software\Classes\.pyw\Content Type:text/plain
HKEY_CURRENT_USER\Software\Classes\.pyc\:Python.CompiledFile
HKEY_CURRENT_USER\Software\Classes\Python.File\:Python File
HKEY_CURRENT_USER\Software\Classes\Python.File\DefaultIcon\:C:\WinP\bd312\budot\WPy64-312100\python\DLLs\py.ico
HKEY_CURRENT_USER\Software\Classes\Python.File\shellex\DropHandler\:{60254CA5-953B-11CF-8C96-00AA00B8708C}
HKEY_CURRENT_USER\Software\Classes\Python.NoConFile\:Python File (no console)
HKEY_CURRENT_USER\Software\Classes\Python.NoConFile\DefaultIcon\:C:\WinP\bd312\budot\WPy64-312100\python\DLLs\py.ico
HKEY_CURRENT_USER\Software\Classes\Python.NoConFile\shellex\DropHandler\:{60254CA5-953B-11CF-8C96-00AA00B8708C}
HKEY_CURRENT_USER\Software\Classes\Python.CompiledFile\:Compiled Python File
HKEY_CURRENT_USER\Software\Classes\Python.CompiledFile\DefaultIcon\:C:\WinP\bd312\budot\WPy64-312100\python\DLLs\pyc.ico
HKEY_CURRENT_USER\Software\Classes\Python.CompiledFile\shellex\DropHandler\:{60254CA5-953B-11CF-8C96-00AA00B8708C}
HKEY_CURRENT_USER\Software\Classes\Python.File\shell\open\command\:"C:\WinP\bd312\budot\WPy64-312100\python\python.exe" "%1" %*
HKEY_CURRENT_USER\Software\Classes\Python.NoConFile\shell\open\command\:"C:\WinP\bd312\budot\WPy64-312100\python\pythonw.exe" "%1" %*
HKEY_CURRENT_USER\Software\Classes\Python.CompiledFile\shell\open\command\:"C:\WinP\bd312\budot\WPy64-312100\python\python.exe" "%1" %*
HKEY_CURRENT_USER\Software\Classes\Python.File\shell\Edit with IDLE\command\:"C:\WinP\bd312\budot\WPy64-312100\python\pythonw.exe" "C:\WinP\bd312\budot\WPy64-312100\python\Lib\idlelib\idle.pyw" -n -e "%1"
HKEY_CURRENT_USER\Software\Classes\Python.NoConFile\shell\Edit with IDLE\command\:"C:\WinP\bd312\budot\WPy64-312100\python\pythonw.exe" "C:\WinP\bd312\budot\WPy64-312100\python\Lib\idlelib\idle.pyw" -n -e "%1"
HKEY_CURRENT_USER\Software\Classes\Python.File\shell\Edit with Spyder\command\:"C:\WinP\bd312\budot\WPy64-312100\Spyder.exe" "%1"
HKEY_CURRENT_USER\Software\Classes\Python.NoConFile\shell\Edit with Spyder\command\:"C:\WinP\bd312\budot\WPy64-312100\Spyder.exe" "%1"
HKEY_CURRENT_USER\Software\Python\WinPython\3.12\DisplayName:Python 3.12.10 (64bit)
HKEY_CURRENT_USER\Software\Python\WinPython\3.12\SupportUrl:https://winpython.github.io
HKEY_CURRENT_USER\Software\Python\WinPython\3.12\SysVersion:3.12
HKEY_CURRENT_USER\Software\Python\WinPython\3.12\SysArchitecture:64bit
HKEY_CURRENT_USER\Software\Python\WinPython\3.12\Version:3.12.10
HKEY_CURRENT_USER\Software\Python\WinPython\3.12\InstallPath\:C:\WinP\bd312\budot\WPy64-312100\python
HKEY_CURRENT_USER\Software\Python\WinPython\3.12\InstallPath\ExecutablePath:C:\WinP\bd312\budot\WPy64-312100\python\python.exe
HKEY_CURRENT_USER\Software\Python\WinPython\3.12\InstallPath\WindowedExecutablePath:C:\WinP\bd312\budot\WPy64-312100\python\pythonw.exe
HKEY_CURRENT_USER\Software\Python\WinPython\3.12\InstallPath\InstallGroup\:Python 3.12
HKEY_CURRENT_USER\Software\Python\WinPython\3.12\Modules\:
HKEY_CURRENT_USER\Software\Python\WinPython\3.12\PythonPath\:C:\WinP\bd312\budot\WPy64-312100\python\Lib;C:\WinP\bd312\budot\WPy64-312100\python\DLLs
HKEY_CURRENT_USER\Software\Python\WinPython\3.12\Help\Main Python Documentation\:C:\WinP\bd312\budot\WPy64-312100\python\Doc\html\index.html

@stonebig stonebig reopened this Apr 27, 2025
@stonebig
Copy link
Contributor
stonebig commented Apr 27, 2025

Will do a rc2 to fix "current" one bug found inquiring on your problem.
Your problem itself is a bit un-certain... as this part was not touched recently.... until this rc

the new release shall be more easy to read in its "registering" and is verbose

@firai
Copy link
Contributor
firai commented Apr 27, 2025

Did this ever work with "IDLE (Python GUI).exe"? Are you saying that it worked with the previous version and stopped working with the new version, or this never worked in the first place?

The title and description seem to suggest that this is a duplicate of #1564. The launchers, including "IDLE (Python GUI).exe", were rewritten between the WinPython 3.10.9 and WinPython 3.13.2 releases in a way that doesn't pass the file name to the respective invoked programs, IDLE in this case. There are PRs to fix the issue, but they haven't been merged yet due to the reason discussed in #1564 (also the same reason why the launcher was rewritten in the first place).

@stonebig
Copy link
Contributor
stonebig commented Apr 27, 2025

rc 2 released, which fix the wppm --register of the rc1 of last night

but normally, previous releases should have their "wppm --register" working ... unless subtelty with <spaces>, non-ascii pathes, ... or I dont know what.

advantage of the re-engineer effort of this cycle: wppm --register -v is actually verbose, so easier to debug/improve by everybody

@firai
Copy link
Contributor
firai commented Apr 27, 2025

@stonebig, my understanding about the issue being reported is that if the reporter tries to open a Python source file with "Open with" → "IDLE (Python GUI).exe", the Python shell is shown, rather than the specific source file. That, as you're aware, is caused by #1564, not by whether registering or deregistering is working properly.

The fact that the reporter even deleted the previous WinPython folder and the shell is still being shown suggests that the batch file is working correctly.

@stonebig
Copy link
Contributor
stonebig commented Apr 27, 2025

haaaaaaaaaaa, I didn't figure that ""IDLE (Python GUI).exe" really meant using the launcher that way.

So @firai is right: that feature was lost in the battle to get Anti-Virus happy.

There is a chance we can bring back that feature on some launchers in next cycle, without affecting WinPython Anti-Virus social score, if we advance carefully (not like last year)

Today Social score is : all anti-virus happy of all forms of build, .zip .7z, .exe , at the exception of "Bkav Pro" on the .exe builds.

@stonebig stonebig added this to the 2025-03 PEP 751 / AI local milestone Apr 27, 2025
@stonebig
Copy link
Contributor
stonebig commented May 8, 2025

the "Drag & Drop" enabled launcher for IDLE is now in the repository
... pausing before submitting to the antivirus wall.
... like a tea ceremony.

@stonebig
Copy link
Contributor
stonebig commented May 8, 2025

humm start not super great on the icon alone... but 72 antivirus is a larger number than usual

Image

@stonebig
Copy link
Contributor
stonebig commented May 8, 2025

checking on previous icon... was ok

Image

humm, let's wait the dust settle

@stonebig
Copy link
Contributor
stonebig commented May 8, 2025

the "good" news is that Deep Instinct is happy, while it was not happy on pre-test of april

Image

@stonebig
Copy link
Contributor
stonebig commented May 8, 2025

but pre-test was not handling well spaces in the path... so there is no way.

@stonebig
Copy link
Contributor
stonebig commented May 8, 2025

Image

@stonebig
Copy link
Contributor
stonebig commented May 8, 2025

it's more digestible for ikarus in .7z form...

Image

@stonebig
Copy link
Contributor
stonebig commented May 8, 2025

ikarus loves it too in .exe form. bkav pro still not happy when .exe only, as usual

Image

@firai
Copy link
Contributor
firai commented May 8, 2025

Some of these virus scanners are like random number generators. The launchers that I compiled using msvc in Visual Studio Community 2022 still only consistently trigger "Rising", except that Command Prompt also triggers MaxSecure and Interpreter also triggers Microsoft and MaxSecure.

@stonebig
Copy link
Contributor
stonebig commented May 8, 2025

No doubt, yet the number of reds must stay low.
What is your most wanted launcher with drag&drop back ?

@firai
8000 Copy link
Contributor
firai commented May 8, 2025

This doesn't affect me personally since I now know how to compile (and have compiled) the launchers. I assume @lilpetamoix would want the IDLE launcher. I speculate that the IDLE, Jupyter Lab, Jupyter Notebook, Spyder and VS Code launchers are probably the most likely to be used with arguments by the wider community. The 4 WinPython prompt and interpreter launchers are probably less critical, and they also happen to give the most number of false positives from the files that I compiled.

@stonebig
Copy link
Contributor
stonebig commented May 9, 2025

today, the same IDLE launcher raises 4 alarms, ... a downgrade vs an improvement.... for same hash256
all WINDOWS ones are red
all CONSOLE ones are all green...
looks like weather ...

@firai
Copy link
Contributor
firai commented May 9, 2025

Funnily enough, the IDLE launcher on my end doesn't trigger anything today. Microsoft also doesn't trigger on any of the launchers anymore, but Trellix now triggers on some launchers. 3 total on the interpreter, 2 and 1 for others.

@stonebig
Copy link
Contributor
stonebig commented May 9, 2025

it can be that virustotal uses different servers, and they are not in synchronization.

@stonebig
Copy link
Contributor
stonebig commented May 9, 2025

score of the day , for [same] idle

Image

@firai
Copy link
Contributor
firai commented May 9, 2025

it can be that virustotal uses different servers, and they are not in synchronization.

Sorry, just to be clear, the files I submitted are the files that I compiled, using a slightly later version of MSVC and probably a different version of the Windows SDK.

@stonebig
Copy link
Contributor
stonebig commented May 9, 2025

what's your version ? I'm

Image

@firai
Copy link
Contributor
firai commented May 9, 2025

I'm using the latest version on current channel, version 17.13.6.

@stonebig
Copy link
Contributor
stonebig commented May 9, 2025

ok, updated... retrying

@stonebig
Copy link
Contributor
stonebig commented May 9, 2025

and 10k bigger again.... what Microsoft does put in this ?
but indeed, down to 2 alerts

Image

@stonebig
Copy link
Contributor
stonebig commented May 9, 2025

so will try a b1 Drag&Drop for:

  • this morning CONSOLE launchers for: Jupyterlab, Jupyter Notebook,
  • this evening WINDOWS launchers for: IDLE.

@firai
Copy link
Contributor
firai commented May 10, 2025

Which Windows SDK are you building against?

@stonebig
Copy link
Contributor

It upgraded to 17.13.6 like you.

@firai
Copy link
Contributor
firai commented May 10, 2025

If you go to Modify in the installation screen, what versions are shown for these two components? The antivirus engines that your binaries are triggering are different than mine, so I'm just curious.

Image

@stonebig
Copy link
Contributor

Image

@stonebig
Copy link
Contributor
stonebig commented May 10, 2025

adding windows 11 SDK

Image

@stonebig
Copy link
Contributor

reverted to non Drag&Drop for the IDLE launcher for now, to not degrade the social score

@stonebig
Copy link
Contributor
stonebig commented May 17, 2025

trying to get Drag &Drop on Spyder, as it's need for "edi with" in fact, raising the CONSOLE or WINDOW variant and update VS:

  • CONSOLE variant gives 2 red / 72: Rising and SecureAge
  • WINDOW variant gives 1 red / 72: Rising

@stonebig
Copy link
Contributor

with updated compiler chain, IDLE launcher is way more loved too:

  • WINDOW variant gives 1 red / 72: Rising

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
0