Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
This question is more about methodology.
I want to create a Python desktop application, but I don't want its GUI to be like tkinter or like PyQt. I prefer to have a beautiful and modern client GUI like Bootstrap.
Is there any existing API for creating such applications in Python?
If not: does it sound a sane workround to use some Python server (like Django or like web2py), and to start a new server each time the application is launched by a user, just for enabling the application core to be in Python and the client to be in HTML?
Does anyone work this way?
Use PyQt or PySide 2, Qt WebEngine and Qt's builtin support for hosting HTML applications:
http://doc.qt.io/qt-5/qtwebchannel-index.html
The general architecture is a SPA (Single Page Application) running from local HTML and Javascript content bundled with your app – no need for bundling in a web server.
For anything complicated (like bypassing cross origin issues), use the Qt WebChannel to message to functionality built on the Python side.
This is basically the same architecture that Cordova uses.
Now, whether you should build an application this way (cough QML cough) is a completely different topic.
There is value in having a local server that does your GUI work, whether this applies in your case depends very much on the requirements of the app.
Most apps I write tend to have a habit of ending up to be multi-user and hosted, so for me it makes absolute sense starting of like this.
If you are going down this route also have a look at http://brython.info/, having the same like languages across everything makes brain context switching less of an 'overhead' (pardon the pun).
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I currently have a bash script that installs a web server with many options and features.
Currently I download the script on the remote linux server and execute it via ssh.
This script uses Dialog so that the end user can enter information such as user name, password to create. Path to use, domain name etc....
I would like to rewrite this script which has become huge in python, keeping an interactivity of the same type (dialog). Is there a solution / module with python? Knowing that the remote server on which the script run is a server without a graphical system like Qt, Gtk just console. I think it is necessary to use curses
bash dialog definition :
Dialog is a utility to create nice user interfaces to shell scripts,
or other scripting languages, such as perl. It is non-graphical (it
uses curses) so it can be run in the console or an xterm.
exemple:
I'm looking for an equivalent on python
Thanks
There are several different ways to create dialog box type UIs for python. PyQt is one of the more powerful ones. Tkinter is also handy for simple tasks. Or at least I like to use it for simple stuff. Either one should get what you need. There's probably more I missed as well.
EDIT
If it's a CLI you want, there are plenty of tool. Here's a neat looking one.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I am developing a program to use as a pedagogical tool in my classroom. I'm writing currently writing it in Python, but I'm also open to solutions that would use C. I want to create a standalone application for Mac (.app file) for my program, but I only need text-based interaction with the users (i.e. just STDIN/STDOUT, and not a GUI). The majority of my students do not have python installed and have no experience with Terminal/shell scripting.
I tried using Platypus to create this application, but I get an error, as shown below.
I later realized that Platypus does not support prompts for user-input. Is there anything like Platypus that would also allow me to prompt users for input?
As I say, I'm also open to solutions to my problem which would involve transposing my Python code into C and going from there.
I don't know if you have thinking about make a web app, in Google App Engine for example is very simple to deploy a Python based web app really fast, using webapp2 for example. And all your students could use your app online, this is a good getting started. But if you want maybe you could to build a command line app deployed in some server and your students could connect with ssh to use it.
It depends what kind of systems your students have and it is highly unlikely that they will have similar kind of system. For least dependency i think you can use java to write your application. For java they just need to install jdk and can run your shared jar.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I have a Python code for a scientific research that solves complicated differential equations and produces a few GBs of data, but in the end produces a series of plots using matplotlib. And the goal is to provide the result to as many users as possible, who use multiple platforms.
So far I've been developing a TkInter frontend so that the program can be run locally for Windows, Linux, and Mac, but I found it quite difficult to make it work on every platform without a problem.
One cheap alternative would be making a simple CGI so that it provides users PNG files of the plots, but instead of that I want to build a web frontend so that the program runs on a server and users can run it and get the plots via a web interface. Is there any API of matplotlib, or a web server script for such a purpose?
I would like the web frontend to have some of the functionality of matplotlib, especially zooming in/out, panning, and using third-party plugins like mpldatacursor.
Check out MPLD3; it brings Matplotlib to the browser through the popular d3.js javascript library.
Here's an example of a scatter plot with tooltips and zoom capability.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
I am pretty familiar with building web based apps using python django on my linux machine. But when I decided to try my hand at building desktop applications that can run on windows/linux I didn't know where to begin.
I know I can surely build windows desktop application on windows machine. But I am pretty comfortable with linux and don't want to get out of that comfort zone. Can anyone guide me as to what tools can I begin with to develop a simple windows desktop application. I would target windows 7 for starters.
Any guidance is hugely appreciated.
What you are looking for is a GUI tool-kit with bindings to python. Tkinter is the de facto standard for python GUI and is cross platform. Qt is also a popular choice but the license is more restrictive then Tkinter but will allow you to transition into C++ programming with Qt easier if that is something you may want to do down the road. The choice up to you.
With python, I think your main options are:
Tkinter, the GUI library included with Python.
wxPython, a wrapper for the cross-platform GUI API wxWidget.
Kivy, another cross-platform GUI library.
If you only need a simple application, any of these libraries would be a good choice.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
So I was wondering if there is any Python package that can allow a pure Python application with a graphic interface to be embedded in a website. I have an application with a Tkinter interface that I want to make available on a website. Any way to do this without converting too much code?
Thanks!
In fact, it's possible: GTK3 has a html5 backend named Broadway.
This backend enable to access to an application through a web browser.
$ GDK_BACKEND=broadway your-application
You can see an exemple with python in this video
Of course, it needs a GTK application...
It's impossible.
Python/Tkinter app is a desktop application, which requires desktop manager, has access to file system etc.
Web application is a different stack of technologies (HTTP, HTML, javascript etc), it is not possible to mix them
Yes, this is possible, but not in way you expect.
There is python - to js translation kit, which supports many, but not all, python operations, functions and types.
So you can write back-end and front-end in python.
But using pure js for front-end will give you more performance.