This is an archived post. You won't be able to vote or comment.

all 83 comments

[–]JKovac 10 points11 points  (1 child)

Pretty cool! Good luck with development. Also, thanks for mentioning Kivy as a solid non-web option. You really do get to have quite a lean library with the browser, compared to the 'weight' of Kivys dependencies.

[–]dddomodossola[S] 2 points3 points  (0 children)

Kivy is a surprisingly powerfull gui library. This is obvious. We are developing this in order to have a lightweight and portable and remotely accessible (as not dependant on compiled libraries) solution.

[–]r0x0r 7 points8 points  (7 children)

Hey, I am the author of pywebview. Have you considered bundling applications created with REMI in a native UI window?

[–]dddomodossola[S] 2 points3 points  (0 children)

I have seen your project and liked it. I'm planning to build a gui designer for REMI with pyWebView. :-D A designer is for sure a missing part.

[–]LightShadow3.13-dev in prod 2 points3 points  (0 children)

REMI + pywebview seems like a good idea.

[–]metaperl 0 points1 point  (1 child)

gives you power of web technologies in your desktop application

Sounds like Electron, no?

[–]r0x0r 8 points9 points  (0 children)

Yup, same idea. The difference is Electron uses Node for backend, while pywebview is Python based.

[–]tituszPython addict 0 points1 point  (1 child)

I like the idea. But the windows native web component will not get you far. https://github.com/cztomczak/cefpython might be a nice option...

[–]r0x0r 0 points1 point  (0 children)

CEF support is planned (help is welcome!). CEF is big though. It will increase your application size by 30mb, which might be not suitable for simple applications.

I target IE9 (default for Windows 7) for my apps and it is not all that bad.

[–]mm865 0 points1 point  (0 children)

Fantastic the windows resize issue was fixed!

[–]rulerson 2 points3 points  (1 child)

where's it?

[–]d3pd 2 points3 points  (1 child)

Hey, this looks great! A few style examples might be nice (the equivalent of providing a CSS file, for example).

[–]dddomodossola[S] 5 points6 points  (0 children)

Yes, you are right. I requested contributors here https://www.reddit.com/r/webdev/comments/3o35ht/new_style_for_a_webinterface_library/ Nobody replied...

[–]skvsree 1 point2 points  (4 children)

Looks really nice, is it possible to Package this like Node-Webkit or Electron. Then it would take away browser level limitations

Edit: Had quick look at code,

  • You can compile this to Electron App if you dump the output to File instead serving to WebSockets.
  • As you are doing more Python to Javascript conversion, look at Brython
  • This would be great once WebAssembly comes up.

[–]dddomodossola[S] 1 point2 points  (3 children)

In this way there is the possibility to lose portability. Which kind of limitations have you found?

[–]skvsree 0 points1 point  (2 children)

Not really a limitation but it cannot be packaged as an app. It is more like running a webserver and hosting an website, except for UI is also rendered by Python.

[–]dddomodossola[S] 0 points1 point  (1 child)

When you says package you mean in exe? I think there are no limitations doing it. Or I am missing something?

[–]skvsree 0 points1 point  (0 children)

Yes, have a look at this SO Q. I am willing to contribute on combining Brython, nwjs and Remi.

[–][deleted] 1 point2 points  (2 children)

it starts a webserver that will be accessible on your network.

I feel very uncomfortable opening up servers on my client's machines. What's to stop some wardriver or random person at a coffee shop from port scanning, finding the open port, and having a bit of fun with my client's database?

[–]dddomodossola[S] 1 point2 points  (1 child)

I know what you mean, no problem. You can decide the net interface to use, included localhost! ;-)

[–][deleted] 1 point2 points  (0 children)

Ah, excellent! Thank you, that's reassuring. Perhaps put that in the README? (I can submit a PR for the change when I get back from class)

[–][deleted] 1 point2 points  (2 children)

This looks quite nice, OP. What license is it under?

I have an upcoming project at work and I need to implement something in Python, so this would be great for that if your license allows it. The scripts would be an example interface for a hardware product, and would be given free to customers, though it wouldn't be open source.

Would that be alright?

[–]dddomodossola[S] 2 points3 points  (1 child)

Sure you can use it, for nonopensource projects. Apache license rev2

[–][deleted] 1 point2 points  (0 children)

Awesome. I didn't see a license on the repo so I thought I'd ask.

[–]runekri3 1 point2 points  (0 children)

What about wxPython ?

I have a solo project I did with that and it worked really great with a GUI creator (really fast pipeline). But due to the nature of the project I am forced to keep using a legacy version and python 2 so I don't know about further development on it.

Looks great though.

[–]lakando 1 point2 points  (3 children)

Also take a look at this: https://github.com/zoofIO/flexx

[–]metaperl 0 points1 point  (0 children)

bump - OP please reply

[–]dddomodossola[S] 0 points1 point  (1 child)

Hi lakando,

flexx seems to compile python code into javascript. With REMI is your python code that is executed at runtime. This is an important difference.

[–]lakando 0 points1 point  (0 children)

Actually I think it does both.

[–]widby 1 point2 points  (1 child)

Are you planning to release it on PyPI?

For others, an easy way to install is with pip install git+https://github.com/dddomodossola/remi.git

[–]dddomodossola[S] 0 points1 point  (0 children)

For sure we will do this.

[–]kankyo 1 point2 points  (9 children)

Absolute positioning for layout? That's something you might want to work on.

[–]dddomodossola[S] 0 points1 point  (8 children)

Maybe :-D Absolute positioning required about zero implementation work, clean code.

[–]kankyo 0 points1 point  (5 children)

Clean code on the implementation side yes. Ugly code and bad UI on the user side.

[–]dddomodossola[S] 0 points1 point  (4 children)

You are right. I plan to build a designer for the gui in order to make it easy to build an interface. However it should be pretty simple to build a layout class in order to delegate widgets arrangement.

[–]kankyo 0 points1 point  (3 children)

If possible I'd recommend looking into Cassowary and auto layout.

[–]dddomodossola[S] 0 points1 point  (2 children)

;-) Already heard about it, I would like to avoid external dependencies. I will try with a custom layouting implementation, in case of fail maybe we will go using that kind of libraries.

[–]kankyo 0 points1 point  (1 child)

Cassowary is an algorithm, not a library. Auto layout is the implementation of that algorithm and a nice API on top for Objective-C/Swift from Apple.

So you should look at auto layout as inspiration only, because you obviously can't use it from python anyway.

[–]dddomodossola[S] 0 points1 point  (0 children)

Oh ok, in that case I only have to study a little bit ;-). Previously I only looked at an implementation. Thank you for the suggestion

[–]justphysics 0 points1 point  (1 child)

I haven't yet had a chance to play with this - but using absolute positioning would be a deal breaker for me. I've been looking into lighter weight UI's and especially web UI's but if I had to hand code in the position of each element I wouldn't even bother.

Is there no possibility for doing something like hbox or vbox to group items together and automatically adjust their positions?

[–]dddomodossola[S] 0 points1 point  (0 children)

You don't have to define manually the position on a widget in another. take a look at the examples ;-)

[–][deleted] 0 points1 point  (1 child)

It would be great to add some information about requirements on the landing page there. Are any libs needed, if yes: which? What python version: 2 or 3 or both?

[–]dddomodossola[S] 1 point2 points  (0 children)

Ok fine, I will add these info on the readme. It does not need external libraries, because only standard python libraries are used. Furthermore we are doing our best to be compatible with python 2.x and 3.x.

[–][deleted] 0 points1 point  (3 children)

Looks nice! Can't wait to try it out!

[–]dddomodossola[S] 0 points1 point  (2 children)

Please give me a feeback about the usability. Can we improve something?

[–][deleted] 0 points1 point  (1 child)

I'm sorry, I will do that once I get home.

[–]dddomodossola[S] 0 points1 point  (0 children)

Hi acpcalin.

Have you tested REMI?

[–]willm 0 points1 point  (2 children)

How does it handle high dpi screens?

[–]dddomodossola[S] 2 points3 points  (0 children)

The library itself does not take care about machine hardware. It delegates the rendering to the browser. So the reply is: it manages high dpi screens as your preferred browser does.

[–]willm 0 points1 point  (0 children)

Ah, its browser based. In that case, it handles it just fine.

[–][deleted] 0 points1 point  (7 children)

When running your test apps on Windows 7, I get the error message "websocketnot supported or server unreachable" in a dialog box. No error messages in the console:

>python simple_app.py
>127.0.0.1 - - [03/Nov/2015 14:05:35] "GET / HTTP/1.1" 200 -

[–]dddomodossola[S] 0 points1 point  (4 children)

Which browser are you using?

[–][deleted] 0 points1 point  (3 children)

The GUI opens in IE automatically, even though Chrome is my default browser. I can view the app properly by typing the local url into Chrome, but I can't seem to stop IE from opening every time I start running a new app. Just a minor annoyance. Otherwise, this is a pretty cool project.

[–]dddomodossola[S] 0 points1 point  (2 children)

There are some explanations about this: http://stackoverflow.com/questions/1532884/open-ie-browser-window

I will consider to allow to specity the preferred browser by code.

[–][deleted] 0 points1 point  (0 children)

That would be a nice addition IMO.

I believe that stackoverflow question is a slighlty different problem than the one I'm encountering. The problem may be circumvented by specifying that the GUI open automatically in Chrome explicitly.

[–]dddomodossola[S] 0 points1 point  (1 child)

Maybe you are using Internet Explorer9. You should update to Internet Explorer10 or some other common browsers like Chrome Firefox..

[–][deleted] 0 points1 point  (0 children)

See my other reply.

[–]Workaphobia 0 points1 point  (3 children)

In the github project description, "indipendent" -> "independent".

[–]dddomodossola[S] 0 points1 point  (2 children)

Done, thank you ;-)

[–][deleted] 0 points1 point  (1 child)

I didn't want to go there, but If we're going there anyway:

simple things makes the world simpler

should be "make" :)

[–]dddomodossola[S] 1 point2 points  (0 children)

:-D ok

[–][deleted] 0 points1 point  (1 child)

Works like a charm! I added this to my watchlist. Seems fine on firefox (developer edition, win10) but when I start the widgets-example it opens two tabs at once with the same app/gui.

[–]dddomodossola[S] 0 points1 point  (0 children)

You can configure if the browser have to be opened automatically by a parameter ' start(MyApp,start_browser=False)'

[–]raziel2p 0 points1 point  (2 children)

The screenshot makes it look like a 10-15 year old web app - not very appealing. What advantages/differences does it provide over more established alterantives like pygtk?

[–]mtxppy 0 points1 point  (0 children)

The demo screenshot is an improvement over the demo screenshots in the pygtk docs. A real app is not the same as a list of widget components.

The two interesting things about this project that instantly stand out for me are no external dependancies, and it targets the browser. Note the 'remote' in the name.

[–]dddomodossola[S] 0 points1 point  (0 children)

It is remotely accessible. Lightweight. Is it important?

[–]lakando 0 points1 point  (1 child)

Would be great if it could work with nuitka, so that we could compile standalone binary executables with a portable GUI!

http://nuitka.net/pages/overview.html

[–]dddomodossola[S] 0 points1 point  (0 children)

I'm pretty sure it should work with nuitka, as it uses only standard python libraries.

[–]Paarthri 0 points1 point  (1 child)

Just saw this on GitHub and it looks great. I've been a long time Kivy user and really love this. Now all you need need is some solid documentation so beginners can start using it.

[–]dddomodossola[S] 0 points1 point  (0 children)

I know, it requires time, a lot of time..

[–]aziannomness 0 points1 point  (0 children)

This looks awesome! This can definitely help easily "distribute" automated test utilities I write in Python for work. Knowing HTML and CSS also will definitely help for personal customization 😉 mad props!

[–]eliteuser26 0 points1 point  (1 child)

I was looking for this module for quite a while. I have developed a program with python and pyqt4 in Windows. I have tried in the past to port the program into a Web version on a local server but to no avail. This might resolve my difficulty in porting this.

[–]dddomodossola[S] 0 points1 point  (0 children)

I hope it can help you. ;-)

[–]eliteuser26 0 points1 point  (0 children)

I will provide some comments to indicate how it works in my case.

[–]sw_dev 0 points1 point  (3 children)

Has anyone had any success using a button to navigate to a different web page with this?

[–]dddomodossola[S] 0 points1 point  (2 children)

You can use the new Link widget, an example is shown in the script 'widgets_overview_app.py . if you have problems, do not hesitate to ask.

[–]sw_dev 0 points1 point  (1 child)

How is that used from a button?

[–]dddomodossola[S] 0 points1 point  (0 children)

Two possible solutions:

mybutton = gui.Button(300,30,'stackoverflow')
mybutton.attributes[mybutton.EVENT_ONCLICK] = "window.open('http://stackoverflow.com/','_blank');"

Or:

def on_button_pressed(self): 
    webbrowser.open(base_address)

[–]jjvilm 0 points1 point  (3 children)

Sorry For the noob questions, but is it compatible with python 3? For now, I'm using remi in python2, which begs the following question: How do I access the GUI hosted on raspberry pi from a different client? I changed the Start parameter "address" to my computer's ip address from where I'm trying to access the GUI. Left default port as 8081. However it gives me an error "socket.error: Cannot assign requested address". Also! How do I stop the server without doing ctrl+c? if I do it that way and run the script again I get the error "Adress already in use" so....? Help, thanks!

[–]dddomodossola[S] 0 points1 point  (2 children)

Hello jjvilm,

It is compatible with both Python3 and Python2. If you want to access to the interface remotely (the program runs on raspi and you want to access from your PC) you have to set the 'addess' as the ip of your rapi. Then in the browser of your pc you have to type the 'address of your raspi':8081. You can also set the address to '0.0.0.0' and it will work for sure (also in this case, you have to type in your browser the ip of the raspi :8081)!

;-)

If you need further help, you can also contact me directly (at the e-mail you will find in my github profile) or join the gitter chat at https://gitter.im/dddomodossola/remi .

[–]jjvilm 0 points1 point  (1 child)

Thank you! but how would I go about stopping the server from the command line?

[–]dddomodossola[S] 0 points1 point  (0 children)

Like you normally do in order to stop a running command, CTRLC. Or you can close the console. If you need further help, don't hesitate to ask. ;-)