Ubuntu – How to create Unity dash integration for the Python script

application-developmentpythonscriptsunityunity-dash

I have written an awesome script in Python and I seriously think it should help many rookie Ubuntu users out there — especially for a quick solution/tip. My script searches through AskUbuntu.com and finds you the best answer for your question. Yup, it does work, and it works pretty well.

How it works video: Ask – Find the best answer to your questions related to Ubuntu in just 1 second !!! – YouTube

GitHub Repo: github: drpaneas/ask

Now, all I need is to implement my Python script for the Dash instead of the terminal. For example, type a question in the Dash and then my script will print you the outcome. Can you help me to do that or could you please provide me some kind of tutorial or guide?

Best Answer

What you want to do is writing a Unity Scope, and probably also a Unity Lens. What Unity Lenses and Scopes are is explained (with helpful screenshots) in an article on howtogeek.com.

The Ubuntu Developer Portal provides an overview and also a helpful tutorial on writing Scopes in C. You said your application is written in Python and whilst this is a supported language, it is recommended to write scopes in C.

If you still want to write your Scope in Python, the web provides you with a tutorial that makes use of GObject Introspection.

Related Question