Hacker News new | comments | show | ask | jobs | submit login
Pext: Python Extendable Tool (github.com)
91 points by O_H_E 65 days ago | hide | past | web | favorite | 19 comments



This is pretty cool. I've been looking for an example code base for creating a simple GUI tool.

This seems a bit too specific to lists though. Would it be possible to write module for manipulating tree data, e.g. something like a filesystem? (drag and drop files to move them between folders)

Do windows users need to have Python installed or does the installer come with Python build-in?

Also, what does the installation story become if the modules require python libraries that are not in stdlib?


Hey, Pext dev here :)

It is indeed very specific to lists now, but theoretically more things could be added. The standard deal though: full-time job and no other contributors.

Windows users don't need to have Python installed. Python (with pip) ships with the installers, so you can also use any module in pip by specifying it in requirements.txt file, with standard pip syntax. Check the pass module for example to see how that goes.


Hey, OP here, I am the one who submitted the readme patch yesterday. May I ask a "non of my business question"? I realized that you created this account just for this reply, but I wounder how do you reach this post? Did it popup in somekind of rss filter or something.

assuming that you are not a regular HN reader


Oh, hey, well, now I know who posted this :)

I have Google Alerts set up for the word Pext, "just in case something interesting pops up". There's nothing more awesome than seeing people talk about your code, so when that happens, I don't want to miss it.

I check Hacker News about once a week in general I'd estimate, so I wouldn't really consider myself a regular no :)


Hmmmm, interesting that google picked up the post before it even reached ~10 votes.


Leo is far from simple but it's in Python, easily scriptable, and built around trees.


TBH right now the functionality looks very close to Alfred (not sure about Quicksilver or anything else that's open-source). Except, dunno if it's possible here but afaik in Alfred plugins can generate the results on the fly in response to what's entered. That opens surprisingly many possibilities, and specifically Alfred serves as a keyboard-driven tool that replaces GUIs to some tasks: e.g. weather is shown right in the result list; you can search in apps like Evernote via their APIs, or you can add content to them, etc.

From the usability standpoint, one thing to note is that such an app needs only one global hotkey while providing functionality via more easily remembered commands, akin to the command line, with completion on the fly. It's often quicker for me to summon an app with a few letters from its name than to look for it in the cmd-tab list.


On Windows, check out Keypirinha [1]. It's powerful and has fantastic Python plugin support. For example, I've written a plugin that loads all your Steam games [2] into the database and allows you to launch them quickly, and another to port your Launchy config over [3] (for those like me who used Launchy before). It has many other plugins [4] too.

[1] http://keypirinha.com/

[2] https://github.com/EhsanKia/keypirinha-plugins/tree/master/k...

[3] https://github.com/EhsanKia/keypirinha-plugins/tree/master/k...

[4] http://keypirinha.com/contributions.html


Pretty much, yeah. Currently Pext doesn't support letting modules react on-the-fly (I ran into some performance issues and race conditions), but it definitely should be possible.

Global hotkey support, you're completely right. It's always been in the back of my mind, but I never got to it (because I didn't figure out a solution for macOS) and forgot to make a ticket, made one now: https://github.com/Pext/Pext/issues/124.

Completion is already implemented, but is not always perfect behaviour-wise. Patches and bug reports welcome, of course :)


I wrote something similar in the past. It's tailored for my need but the idea behind it is very similar. It brings up window with hotkey allows to write simple command and params and run it.

http://netrix.org.pl/index.php/2016/01/09/nassist/

I'm using it up to this day but I think I'll give a tray to Pext because it seems more mature.


Oh cool, you even went for Python 3 + PyQt5 and a module idea. Interesting! Seeing how your post was from January 2016, we may have started our projects around a similar time, even though mine started as a simple front-end for https://www.passwordstore.org/, back in December 2015, starting to support other functionality in, interestingly enough, also January 2016.


So if I understand this tool correctly, the idea is to allow the user to search an item from a list, and then execute an action on it.

Is this correct?

For example, I could use this to open common text files, maybe open different notes, run scripts, play video files, etc?

Edit: Now that I think of it, this would be similar to the search bar in Windows or the Unity thingie in Ubuntu (at least 16.04), except that you would have specific modules instead of a general "search", correct?


Pretty much, yeah :)


Why don't all this projects have a singular protocol for writing plugins, this way evreyone can benefit from something. just like all the IDEs are starting to support microsoft's language server protocol: https://microsoft.github.io/language-server-protocol/specifi...

https://github.com/Microsoft/language-server-protocol


I still sometimes write a few line tcl tools to guify a specific task. Not sure if i would like to dig into a bigger python code base.

For re-using existing modules I doubt pext would scratch my itch in the way I like it. I.e. the password module in the realms is not appealing.


Do you know that Python has native Tcl/Tk bindigs? If you are familiar with it and it works for you, just keep using it.


Looks interesting, thx!

p.s. u may want to scrub the code for api keys.


I'm aware of the API key included in one of the modules. The reason for this is that having people get their own API key just to try it is a bit of a hassle. The account isn't coupled to a credit card or anything, the worst someone can do is push it up to the rate limit, at which time, well, people will have to get their own API key. Thanks for the heads up though!


I'm a simple man. I see something promoting QML, I upvote.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: