Forum Archive

Hydrogen - A lightweight GUI framework for Pythonista

bashedcrab

Hydrogen - https://gist.github.com/BashedCrab/5924965

HydrogenLayouts - https://gist.github.com/BashedCrab/6103019

HydrogenDemo - https://gist.github.com/BashedCrab/5953776

I know a few of you are already using this, but I thought I'd put a post here to help keep track of the project, and let people know when new features are added.

Wishlist:

  • Better default look&feel
  • More layouts
  • Multiline text components.
  • Tutorial
  • HKeyboard and key events (!)

Feel free to suggest changes and optimisations to the existing code. I've been programming for a while but only just learning python. Likewise, if you would like to contribute a component or request one, drop something here.

bashedcrab

Changelog 29-07-13
- Moved layout managers into separate module
- Demo code cleaned up and optimised.

Firstly, big thankyou to CCC who cleaned up HydrogenDemo.py, and replaced all my lazy cut-and-paste GUI code with much more elegant list processing.

Hydrogen.py was starting to get a bit large and cumbersome to deal with on an iPad so I broke layouts into their own module. Now, if you are laying out your GUI manually, you aren't importing hundreds of lines of unneccessary layout management code. Also the next layout I'm about to add is quite large, and this way Hydrogen.py won't get cluttered up.

sanit230

Great UI. Thank you for sharing the code. I will keep seeing your code updated.

chris_aloi245

Wow - That's pretty awesome - great work

basemaly

How do I use and install Hydrogen.py? I was able to get it from github using the "add from github" method, but now Hydrogen.py and HydrogenLayouts.py are both sitting in my file list. When I try running Hydrogen with the play button, nothing happens. Is there a way to set Hydrogen as a library that can then be imported by other scripts? I've got an empty folder at the top of my file list saying pypi-modules. Is that where Hydrogen.py should go? How do I install or move libraries like these into a library folder?

ccc

Get HydrogenDemo.py and run that.

basemaly

Woah. Thanks! I see they all have to be together.

Hassito

Guys,

Some help here, it still doesnot work for me?
I get the error: ImportError: No Module named Hydrogen

ccc

Is Hydrogen.py in the same directory as HydrogenDemo.py ?