Python application launcher (for Python code)

Simon Ward simon+python at bleah.co.uk
Mon Feb 20 19:36:06 EST 2017



On 20 February 2017 22:56:31 GMT+00:00, Deborah Swanson <python at deborahswanson.net> wrote:
> Basically, I now have quite a few Python programs I use frequently,
> and
> as time goes on my collection and uses of it will grow. Right now I
> just
> want a way to select which one I'd like to run and run it

A Python application should be treated as any other application and be runnable by whatever mechanisms the operating system provides, there's your application launcher. The main niggle is that a Python file is not a "native" executable, so the OS or shell running under the OS needs to be told to use the Python interpreter to run it. For many shells on Linux (or the kernel itself) this can be done with the "shebang" on the first line. For Windows you generally associate the Python file type with the Python interpreter (done when Python is installed), or create shortcuts specifying the Python interpreter as the executable (or make executable files using some other tool). 

>×I'd like it to be a standalone application and some sort of system of categories
> would be nice. 

The freedesktop.org menu specification[1] provides a common format for defining application menus including organisation such as categories and hierarchies. The Windows start menu can be arranged how you wish, but I'm not aware of an implementation of the menu specification on Windows.

[1]: https://www.freedesktop.org/wiki/Specifications/menu-spec/

> I'm migrating tasks I've always done in Excel to Python, and I have a
> sketchy idea of features I'd like to open Excel with, but I hate Excel
> VBA so much that I haven't written an on_Open macro for Excel yet.
> What
> I'd like to open with is mostly a menu of macros I'd like to have
> available for any code I'm running, possibly opening different
> environments for different kinds of tasks, that sort of thing. I also
> plan to use sqlite3 for permanent data storage, matplotlib for charts,
> and tkinter for interfaces. That's all in the planning stages, but one
> thing that seems like an obvious need is a way to keep related code
> and
> its associated data, charts, etc, easily accessible to each other,
> like
> they are when they're all bundled together in an Excel workbook. I
> have
> a few ideas about how to do that, but I'm also interested in what
> other
> people have done.

Possibly what you actually want is a development environment. Mine is made up of a shell with convenience functions, a text editor and a few other independent things. Some prefer to use an IDE, such as IDLE[2], where this is all integrated into one convenient application.

>From some of what you said above I suggest taking a look at Jupyter Notebook[3] and/or the underlying iPython[4] shell.

[2]: https://docs.python.org/3/library/idle.html
[3]: http://jupyter.org/
[4]: https://ipython.org/

Simon
-- 
Sent from Kaiten Mail. Please excuse my brevity.



More information about the Python-list mailing list