pyserial icon indicating copy to clipboard operation
pyserial copied to clipboard

miniterm.py: Adds execute permissions.

Open fhgwright opened this issue 5 years ago • 4 comments

This has a suitable shebang line to be run directly as a program, but needs execute permissions to make that actually work.

The same change could be made to list_ports*, but it's less important there where command-line invocation is only for test purposes.

TESTED: ./miniterm.py now launches on macOS. Other POSIX systems should behave the same. No idea what effect this has on Windows.

fhgwright avatar Jan 28 '19 03:01 fhgwright

I don't think that there is a reason to do this. My recommendation is to start these tools using python -m serial.tools.miniterm and python -m serial.tools.list_ports.

And in case the script is installed via setup.py it takes care of making it executable.

(re windows: the execute flag is ignored as not supported by file system)

zsquareplusc avatar Aug 12 '19 12:08 zsquareplusc

Why is requiring extra typing considered a benefit?

Why is there a suitable shebang line if it's not intended to be run directly as a program?

Why is it OK to have it made executable via setup.py but not otherwise?

What possible downside is there to making it executable in the repo, as is normal practice in other projects with Python programs?

fhgwright avatar Aug 13 '19 19:08 fhgwright

It seems reasonable to make this change- note also that the miniterm.py script is installed to the sys.prefix/bin directory when installing pyserial as a package (i.e., pip install pyserial etc), and the executable flag is properly set there:

https://github.com/pyserial/pyserial/blob/master/setup.py#L99

noahp avatar Apr 28 '20 14:04 noahp

Ping.

fhgwright avatar Sep 27 '20 00:09 fhgwright