Python Forum
Pyinstaller - I can't drag and drop into the CMD terminal anymore..
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pyinstaller - I can't drag and drop into the CMD terminal anymore..
#4
I can do a test.
# drop.py
import sys

drop_file = sys.argv[1]
print(f'You dropped {drop_file}')
with open(drop_file) as f:
    print(f.read())
input('Press <Enter> to exit')
Make a drop.bat file to drop to as it has all permission for drag drop,.py can be blocked in Registry.
"C:\python37\python.exe" drop.py %*
Build with Pyinstaller.
pyinstaller --onefile --add-data drop.bat;. drop.py
Now can drop files to drop.exe,eg it will work for txt,csv,html... ect.
Reply


Messages In This Thread
RE: Pyinstaller - I can't drag and drop into the CMD terminal anymore.. - by snippsat - Jan-11-2020, 10:08 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  My first script does not work anymore redfirebrooks 2 2,472 Jan-05-2021, 10:49 AM
Last Post: redfirebrooks
  Code used to work, not anymore for no apparent reason? chicagoxjl 1 1,939 Jan-08-2020, 05:05 PM
Last Post: jefsummers
  Python code suddenly not working anymore mike_b 5 5,874 Oct-02-2019, 03:38 PM
Last Post: ichabod801
  All of a sudden Pycharm doesn't run anymore (select valid interpreter) Luke_Drillbrain 1 5,338 May-04-2017, 07:30 PM
Last Post: buran
  Windows: Put File automatically under Cursor for Drag & Drop sym 1 3,539 Jan-13-2017, 04:55 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020