Python application launcher (for Python code)

Deborah Swanson python at deborahswanson.net
Mon Feb 20 23:16:50 EST 2017


Simon Ward wroe, on February 20, 2017 4:36 PM
> 
> 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). 

That "main niggle" is a doozie on Windows XP with Anaconda Python 3.4.3
(see my previous post for a more detailed explanation. Getting Linux up
and running seems my best hope at this point.

> >×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/

Thanks Simon, this may be what I was looking for, though I wasn't
enirely sure what form it would take or my commitment to a solution
workable in Windows. 

I am quite familiar with Windows' Start Menu, but beyond changing the
order of program shortcuts and maybe putting groups of them in folders
to further collapse the size of the menu, there isn't much else you can
do with it.
> 
> > 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.

That's more along the lines of what I was looking for.

> 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.

I've looked at Jupyter, and it might be very useful, but it will also
have to wait til I'm on Linux again, where I can get complete installs
of Anaconda.

Thanks for your comments, the freedesktop.org menu definitely sounds
worth checking out.

Deborah




More information about the Python-list mailing list