Making GUI applications on Linux/Windows. What languages/tools to use? [closed] - python

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 7 years ago.
Improve this question
My student group and I are trying to continue working on a project we worked on this semester over the summer to become a professional, deployable app. We originally did it in Adobe AIR but it seems now that the computers this program will be running on will be very slow, maybe 600mhz and 128-256mb ram so flash just isn't going to cut it. It is basically a health diagnosis application that we will be shipping out to impoverished countries.
Now comes the real question. We are wondering what language to rebuild our application in. It has to have a good gui builder associated with it, like adobe flex/air gui builder or visual studio's gui builder but the application should run on linux primarily, and if it can run on windows thats just a plus. We are all students too without really any outside help so whatever we decide to do this in there must be ample documentation available when we hit problems.
Some things we have considered so far are using python and glade or c# and monodevelop, but again we really are not experts on any of this which is why I am asking for help as I would rather spend the time now choosing the right tools instead of wasting time down the line when we hit a roadblock.
Thanks in advance!

I see answers pushing wx and gtk, so I can't avoid pushing Qt, my favorite!-) With a major corporation standing behind it (Nokia), two excellent sets of Python bindings (PyQt and PySide), support for Python 3, the superb Qt Designer, great Mac and mobile support too... it's seriously hard to beat...!-)

The closest thing is probably going to be gtk# with monodevelop. It has a slick, Visual Studio-like ide, and the resulting programs will run on Linux and Windows. The language would be C#. I think this would be the best balance of performance and ease of use.
Alternatively, PyGtk is nice, and you can use Glade for the GUI designer, but it isn't quite as integrated as Monodevelop.

For such low-end hardware I suggest wxWidgets or wxPython, using wxFormBuilder to create dialogs. You can use MS Visual Studio, Eclipse or CodeBlocks as development IDE. The latter two work on Linux well. Alternatively, you can use some simpler programmer's editor like Geany or Kate.

To access really low end computers, and if you have no real graphics requirements, you could consider a text mode interface - curses/ncurses for one.

Related

How to quit Jupyter and become a better programmer? [closed]

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 2 years ago.
Improve this question
I am a self-taught programmer coming from a scientific (non-programming) background. I discovered Jupyter early after I started using Python. And although I greatly enjoy using it (Jupyter), I feel that it somewhat hindered my ability to think ahead and write code that will be easy to maintain and interact with in the future.
I inevitably end up with these endless notebooks that are impossible to navigate and mostly consist of redundant code. I then tuck away some of the functions into text files. Make a copy of the notebook, delete a bunch of cells, and start over. Until the notebook becomes unmanageable again, then semi-refactor, make a copy, prune cells, and so on.
I feel that at this point I should learn some basic software design principles and practices (like version control and code organization). Is there a course or a lecture series you can recommend that might help me with that? I feel that any advice from you will be helpful. Thanks!
This will help in learning version control from official Git Documentation
This will also help in Software development philosophies from wikipedia
Try sublime text editor. It is not an IDE but it is really good for coding and has a bunch of useful coding plugins. It is not free but has an unlimited free trial, in which you get all the features, and an occasional popup asking you to buy it. If you download it, you should also use some plugins to help you code python
I personally use these plugins:
Origami, Terminus, Kite & Anaconda
I f you don't like sublime or using a plain text editor, check out visual studio code, idle or thonny.
They are full IDEs (not code editors), and will thus have more features.
IDLE & thonny are beginner's IDEs and Visual Studio Code is a lot more powerful & complex
Now you have your Jupyter notebook replacement on to the version control
Instead of using git, use github. It is built on top of git, and is a lot easier.
If you don't already have a github account then create one. Now you have a version control system going. I am not going to go any deeper because i am not very good at github version control so check out this site

A Real Talk About Python Software Distribution [closed]

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 2 years ago.
Improve this question
I know this is a hot topic and many people ask this question but I have the feeling I am missing something. What is the proper way to make a python application for end-users? Like, old-school offline .exe and so on. Many users won't touch the terminal/shell and to be honest most software these days is incredibly easy to install. What I know so far:
There are packages out there that can make your software ready for redistribution like
pyinstaller, cx_freeze, py2exe
I wrote my fairly complex software in like 2 weeks and going crazy for days over making pyinstaller work with my external packages. Is this pain normal? Have I made a mistake by relying on an interpreted language? Because compiling this stuff is mean business. In many other languages you just build the stuff within the IDE and there you go, built.
I am not concerned that my code might be decompiled, so what I have tried is to just create a .bat file with commands to execute my script with my virtual environment(!) python. Can I just manage to have the Python venv in place with my scripts without the user having to install it himself?
Or what is the "usual" way to do this? Use Cython? Or pyinstaller? Praying to the lord of code?
FYI: I am using Python 3.6.8, Windows 8 (don't you dare making fun of me :D) and Pycharm 2019.2
However thank you in advance for your time, regards,
Arjaan
There is no correct or established way of how to create an executable file for your Python project. It's opinion-based.
And how you want to distribute your software is entirely up to you. It can be source code, compiled, as a docker image, through Heroku One-Click deployment, debian package, all of the above, ???.
Having choices is nice. Some people need a really simple solution then Heroku or an exe file is nice. Some people are Docker power users, then a multi-arch docker image is nice. Some people want to modify the source code than having the source code is nice. Some people like debian packages and want your project with a systemd service file automatically enabled and started.
You might also not put into the work of getting docker/debian/heroku to work and just tell them a step by step guide on how to get it to run.
Debian and Heroku route might require some periodic maintenance due to the Linux distros updating to newer versions.
There is so much to it and it is an endless discussion where noone is right or wrong.

Graphical Front-end for Python script [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I wrote a python script here Github
It is just something I wrote to practice. The script asks for a input directory and output directory and the method of compression and then compress the files from input directory and stores the compressed archive to the output directory.
I want to make a graphical frontend for this script. I am using Ubuntu 10.10 (GNOME).
Is it possible to do so?
If yes, then where should I start?
I want to do this just for learning purposes.
Thanks
It's certainly possible. There are a ton of GUI frameworks available so you'll have more then enough choices. Given your OS is Ubuntu I would look into PyGTK first. I personally found PyGTK fit my brain pretty well and I really liked the documentation. The fact that it's the native toolkit for your Window Manager is a nice plus in that your app will hopefully look like the other Gnome apps you're already running.
Of course you could use Tkinter which is bundled with Python and cross platform. Or you could look into using PyQT or wxPython.
To be a little crazy, since this is a learning exercise, you might want to use something lower level so you might look into something like Pyglet or Pygame and spend some time learning how to build your UI widgets.
If you're looking for touch interface or iOS / Android support then checkout Kivy
Good luck.
Kivy also looks like a good alternative.
Kivy - Open source Python library for rapid development of applications
that make use of innovative user interfaces, such as multi-touch apps.
I found PyQt pretty easy to get up and running with. Check out the wiki docs here.
I find MVC a very good design pattern to use in this case, so, you might try to salvage your code (it seems very simple).
For a GUI framework, I suggest Mike Steder's response, and this list and a large list found here.

Android Python Programming [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Can I program for Android using Python? I seem to have stumbled upon many links while searching... however neither of them is concrete.
Any suggestions? I want to write apps for Android but really don't want to get into Java for all this.
PS: My question is whether I can write proper, full fledged apps for Android.
Checkout Kivy. They have done a really great job so far, and I am a big fan of their work. It is still lacking some providers, but they keep adding new stuff to it everyday. First thing you need to do is to check your requirement against what they can offer based on their documentation. They have create an amazing framework for input such as multi-touch or pen handling. They use OpenGL ES internally, as a result complex graphics and visualizations can run very fast when interacting with the the application. Their process for creating an apk is also very straight forward.
Check the new Python for Android project.
Edit: This is not Kivy, this is a seperate project, intended to be a toolchain usable for other toolkit. The architecture is modular, and you can include new recipe for including new python extensions (as brew, macports, cygwin etc.).
Edit: This is not Py4A, but python-for-android.
This is great for starters:
Embed Python 2.7 interpreter and your scripts into an Android APK
No, not currently. ASE (Android Scripting Environment) allows you to do simple script apps, but you can only write proper Android apps in Java.
Yep, you can.
Check ASE
Edit:
Ok, after comments:
I haven't read the question properly. No you can't write write proper, full fledged apps for Android, but anyway check ASE. It is really cool project.

Looking for a bare-bones open-source editor written in python [closed]

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 9 years ago.
Improve this question
I'm looking for a bare bones cross platform editor written in python that I can pick up and customize. The fewer dependencies the better.
Please note: I'm not looking for a python editor or python IDE. Just a no-frills editor, that
I can use as a base for an app that I'm starting on.
Must be open source and free to modify for commercial use since I intend to use this for work.
There is a complete editor written in wxPython here:
http://wiki.wxpython.org/WxHowtoSmallEditor
Only 104 lines, should be easy to customize.
EDIT:
To address some of your requirements, here is a copy and paste from the wxPython wiki:
A GUI Toolkit
wxPython is a GUI toolkit for the Python programming language. It allows Python programmers to create programs with a robust, highly functional graphical user interface, simply and easily. It is implemented as a Python extension module (native code) that wraps the popular wxWindows cross platform GUI library, which is written in C++.
Open Source
Like Python and wxWindows, wxPython is Open Source which means that it is free for anyone to use and the source code is available for anyone to look at and modify. Anyone can contribute fixes or enhancements to the project.
Cross Platform
wxPython is a cross-platform toolkit. This means that with a little care that the same program will run on multiple platforms without modification. Currently supported platforms are Microsoft Windows, and most Unix or unix-like systems with GTK available, and OS X 10.3.9 or above.
How about IDLE? IDLE is included in the standard Python distro. From the docs:
"
IDLE has the following features:
coded in 100% pure Python, using the tkinter GUI toolkit
cross-platform: works on Windows and Unix
multi-window text editor with multiple undo, Python colorizing and many other features, e.g. smart indent and call tips
Python shell window (a.k.a. interactive interpreter)
debugger (not complete, but you can set breakpoints, view and step)
"
With some work, you could probably rip out the editor component from IDLE.
Have a look in the idlelib directory of your Python standard library.
check out:
Scitilla/SciTE
http://www.scintilla.org/SciTE.html
Editra
http://editra.org/
both are cross platform and written in Python. They are full featured editors, but barebones compared to an IDE or such.
Here's a complete editor written in wxPython. It has more functionality than the editor suggested by Andre. It does not yet have a stable release though. https://github.com/0b0bby0/wxEditor.git
It depends on how much functionality you want.

Categories

Resources