MorseKOB / PyKOB

Python implementation of a library for Morse and MorseKOB functionality
https://sites.google.com/site/morsekob/morsekob40
MIT License
4 stars 2 forks source link

Create `shortcuts` for MorseKOB applicationsI #35

Open AESilky opened 4 years ago

AESilky commented 4 years ago

It would be nice to have Windows, Mac and Linux shortcuts for the typically used applications (sample.py, clock.py, etc.) so the user doesn't need the enter python3 <app.py> (py <app.py>).

pwdirks commented 4 years ago

Hi Ed - what do you mean by "shortcuts"? Application wrappers around the Python code that you can just double-click (that'll BEG for a GUI...)? Or just a shell script to invoke the application in question? A simple executable file (w/o a ".sh" extension)?

AESilky commented 4 years ago

I meant a .cmd and .sh file, set as 'executable', that packages the py|python3 cmd.py and passes any command line parameters. An example is configure. I would like the same for clock, sample, etc.

AESilky commented 4 years ago

Research the possibility of using a cross-platform compatible header in the .py file that allows the application/command to be executed directly by the shell such that a separate script doesn't need to be created and also that the user doesn't have to know to use python3 or py to run it.

pwdirks commented 4 years ago

Research the possibility of using a cross-platform compatible header in the .py file that allows the application/command to be executed directly by the shell

That's a good idea. As Les mentioned recently, changing the first line in Clock.py to read

+#!/usr/bin/env python3

and changing the file's mode with "chmod +x" to make it executable makes it possible to run high-level commands by themselves:

$ ./Clock.py -b 1000 -e 2030 -i 60 -s 20 -a OFF args.Begin = 1000; start_time = 36000 ^C

even command-line parameter passing seems to work as expected with that scheme.

AESilky commented 4 years ago

Yes - that would be great. That makes Les' question even more important. We need one that works in Win/Mac/Linux in order for that to be the solution.

If that is figured out, I think that is acceptable for all of the applications/utilities except (possibly) the main MorseKOB app. I would still like us to think about that one, because we want it to be dead-simple to install and run. A lot of people will want to run it that probably don't know a lot about computers.

I would also like to keep scripts for Configure.py to make it very simple and obvious.

leskerr commented 4 years ago

Launching the MorseKOB app in Windows is real easy. You just double-click on the MKOB.pyw file (or on any shortcut to it) and the program starts up automatically. This will be familiar to any Windows user.

The problem that has haunted me all along is making the whole thing easy to install in the first place. The way it is right now (having to install Python, PyKOB, pySerial, and PyAudio correctly) would be an obstacle for many users, I'm afraid.