Displaying pyqtgraph and pyqt widgets on web - python

Is there a way to take existing python pyqtgraph and pyqt application and have it display on a web page to implement software as a service? I suspect that there has to be a supporting web framework like Django in between, but I am not sure how this is done.
Any hints links examples welcome.

If all you need are static plots, then it should be straightforward to draw and export to an SVG file, then display the SVG in a webpage (or export to image, as svg rendering is not reliable in all browsers). If you need interactivity, then you're going to need a different solution and probably pyqtgraph is not the tool for this job. VisPy does have some early browser support but this has only been demonstrated with ipython notebook.

Here is what I have sort of put together by pulling several threads online:
Ruby On Rails seems to be more popular than python at this moment.
If you go python, Flask and Django are good templates.
bokeh seems to be a good way of plotting to a browser.
AFAIK, there is no way to take an existing PyQt or pyqtgraph application and have it run on the web.
I am not sure how Twisted (Tornado, Node.js and Friends) fits in to the web SaaS, but I see it referred to occasionally since it is asynchronous event-driven.
People often suggest using Rest, but that seems slow to me. Not sure why...

Related

Python: How to create a simple frame in Kivy?

How can I create a simple frame in Kivy (Python for mobile), which will include a simple TextBox ?
Thanks guys
The biggest name I know of that uses (or used) wxPython is probably Dropbox:
How does Dropbox use Python on Windows and OS X?
This web page implies that NASA also uses wxPython:
https://modelingguru.nasa.gov/docs/DOC-2424/diff?secondVersionNumber=4
Google uses Python itself for all kinds of things and has been a big supporter of Python. They provide Python bindings to many of their product's APIs for example.
You might also check out the following for less well-known projects:
http://freecode.com/tags/wxpython
Whyteboard was getting popular for a while too.
There is significant movement away from desktop development to web and mobile development. For mobile, one of the best Python projects out there is Kivy. For the web, you have a lot of choices:
django
flask
pyramid
Plone / Zope
web2py
I have seen some pretty impressive desktop GUIs created using PyQt and IronPython, so I can't say that desktop GUI development is totally dead.

Backend for embedded matplotlib in cocoa

Sorry for the novice question but I was wondering if anyone knows about embedding matplotlib plotting functions into a cocoa app? I have been able to open a plot within the app using the cocoa backend but every time I close the plot window the entire app closes (I assume its stopping the run loop). I have done some investigating a realise that the cocoa backend was originally designed for implementation into apps but it appears it is still taking over the run loop. I would like to avoid using bitmaps and NSImage if possible as this removes the interaction capabilities of matplotlib, which are very useful to me.
Many thanks!

How to use Python and HTML to build a desktop software?

Maybe my question is stupid but I still want to ask. I am always wondering whether I can use Python, HTML and Css to develop a desktop software. I know there are alrealy several good GUI frameworks like Qt, Tk and etc. But the various sources of HTML and JS frameworks are still attractive to me. I don't mean a software which is just like a web application where there is a frontend and Python acts as a server side language either. I mean use Python like other GUI frameworks. I can create widgets built by HTML and Css.
Dose there any framework have this function? I know there is app.js for Javascript. Or what I think is wrong.
Look at pyjs.
What is pyjs?
pyjs is a Rich Internet Application (RIA) Development Platform for both Web and Desktop. With pyjs you can write your JavaScript-powered web applications entirely in Python.
CEFPython allows this by embedding the Chromium browser and providing python bindings to it:
https://code.google.com/p/cefpython/
~: python example.py
brings up:

Using Matplotlib Output Client-Side in Browser With Skulpt

I am writing a Python application to be run client-side within the browser. The Skulpt project looks great for this, and I am pretty excited to begin working with it.
The one issue I can foresee, however, is that I will need graphical output using Matplotlib. Does Skulpt support Matplotlib? If not, what other options do I have?

Building a tree in a web app using Python

I'm new to Python and web development (although I have development experience with Client/Server apps .. a little rusty), and I need to build a Python web application that populates an interactive tree from a database (for my PG degree).
I've tried PyQT4 which contains a QTreeView/QTreeWidget but couldn't run this form as a web application. I've used QT Designer to build such form but couldn't make it run as a web app.
From Google search (over two weeks) I know that Django is the best framework to build a web app for Python, but it doesn't have an interactive tree viewer (am I right?).
I'm very confused at the moment and don't actually know where to go from here.
I'd appreciate your help in answering the following critical questions:
Can Django help in building such application? i.e. Does it support web tree view?
Can I use QTreeView from PyQt with Django? or even can I build a web application directly using PyQT and QT Designer?
If neither are suitable; Your suggestions are very much appreciated.
This isn't really a python or django issue: presentation on the web is done using (X)HTML, other types of XML (such as SVG), and javascript to automate the client side.
Go ahead and use django for your project, but understand that to do this, you will need to also get the hang of (at least) a javascript library for this task.
google django treeview for a few implementations. Alternativly use JavaScript. Django and Javascript play nicely and there are loads of JavaScript Treeview implementations.

Categories