Quick to learn is pretty important, but I need just some basic GUI tools, for Ubuntu OS but would be nice to have multi-OS compatibility. Any suggestions?
The basic dynamics of the intended game just include a text input and some set reaction
frames.
Thanks in advance.
You can give the game a little more flavor if you use Ren'Py rather than doing it all yourself.
Do you mean with text-based menus and graphics as well?
curses is included in the standard Python distribution.
http://en.wikipedia.org/wiki/Ncurses
http://docs.python.org/library/curses.html
But perhaps that is too text-based?
For basic toolkit, I think tkinter which comes with python is okay. If you want to have graphical toolkit with more functionality, I would suggest you to take a look at wxpython which is cross-platform compatible.
Related
So, I have been wanting to make my own GUI library for Python 3. And I couldn't find anything anywhere on where to start. So I decided to ask the question here.
Goal:
Be able to make Python Libraries without using other libraries.
Edit:
So, If I was to make a Library in C for Python. How would I go about doing that.
Tkinter is a python wrapper around tcl/tk's GUI toolkit , similar to how PySide/PyQt and wxPython are wrappers around the Qt and Wx C++ GUI toolkits.
If you wanted to build your own from scratch you would have to make use of existing operating system APIs and/or use something cross platform like OpenGL. For a good example of the latter you can look into Kivy, which is built on OpenGL
Different operating systems have different API's for doing GUI's. So how you have to do it very much depends on the operating system. I think one of the reasons that Python uses Tkinter is because it was already ported to different operating systems.
GUI API's are typically provided as shared libraries, often written in or compatible with C.
If you want to use those from Python, you will have to write a Python wrapper for them. For example using ctypes. Doing that requires a significant understanding of (1) Python, (2) ctypes and (3) the GUI API in question. If more than one of these technologies is new to you, I would not recommend taking on such a project.
Hello I am planning on creating a program in Python 2.7 using a tkinter GUI. I am looking for some guidance on the best method to play text as audio in order to aid people with visual difficulties.
The text that will need to be played would be text on buttons and text within textboxes. are there any libraries I can import that can help me achieve this?
Thanks.
The answer appears to be 'no'. According to tcl/tk developer Kevin Walzer "Tk doesn't support [screen readers]. I've looked into it a bit and it seems like a huge project to implement on a cross-platform basis." See link for a bit more.
If you really want to develop an accessible GUI application in Python, you shouldn't use Tkinter since it is not accessible at all.
Consider using some framework that has bindings to native APIs/controls, for example, WxPython which is a Python port of WxWidgets.
I googled and search stackoverflow before asking this question
Answers that I don't expect:
wxWidgets is the best Python GUIUse TkInter (BIM) for GUI development.
Q. How to make a GUI without using any module/library? i.e make a GUI from scratch. Modules like tkinter not allowed.
I've made several GUIs from scratch using SDL which is a low level drawing library. The advantage of doing that is that it will look exactly the same on any platform down to the pixel and you can get it to work on embedded systems. Full screen GUIs are really easy too. Disadvantages are that it is a lot of work.
In python the pygame library wraps SDL so you would use that, and in fact that is how I made the GUI for a lab instrument which had a large colour LCD screen. The controller ran linux, but not X-windows.
pygame is an extra library, yes, but I can't think of a way of making a GUI with only what python provides.
The easiest GUI to make without "module/library" is a web-based one. I.e. generate HTML with Javascript from your Python code, and let the Javascript interact via AJAX with your Python app. This can be implemented without too much effort with just the standard Python library (and some JS code, of course), or with modules that don't require "heavy" installation of platform-specific extensions.
I have a two years of experience in programming of enterprise application's with Java and Visual Studio, and I'm new in Python and wxPython. So my question is: Can wxPython provide me enough rich GUI to create those same app's? My reason if using Python is in it's diversity, simplicity and fast development of app's. Thank you!
I think it depends on your definition of "rich." I use it and like to think it can make some fairly useful GUIs. Here's a screenshot of a wxPython app to work with sensor data I'm writing right now - not the most elaborate or complicated in the world, but so far it seems fairly intuitive for users:
I find the wxPython docs to be a little sparse at times, but as long as you've got the demo installed and the wxWidgets docs open it's a good toolkit to use.
wxGlade will give you the GUI skeleton. You will still need a separate text editor (I recommend Geany) to fill in the handlers.
I would certainly suggest using Python and its GUI libraries, but only you can really make the decision as to wether you think its better than visual studio or Java. The syntax of Python is very basic and I think many people can agree its a plesure to use when you get your head around it (no curly brackets etc). Python Tkinter is quite a simple GUI library and its ideal for making a basic application. WxPython on the other hand is far more advanced than Tkinter hence a richer user experience. The only problem I have had while using Wx is not being able to find suitable examples on the web to demonstarte how some things are done. Good luck, hope you find what your looking for. Karl
The wxPython demo shows most of the widgets that are available. I suggest that you take a look at this and see whether it will do what you need.
I am developing a python program (my native platform is Ubuntu) for which I would like to build a simple gui. I would like the GUI to be cross platform.I came across python-gtk/wxpython/qt. What is the best tool to use?
Thanks
suresh
Your best bet would be either wxPython or Qt, although I'd lean strongly towards wxPython based on my previous use. Both of these have fairly good fidelity on both Windows and OSX and feel and look like native applications.
GTK has marginal Windows support and pretty bad support on OSX. I would recommend against it.
I'm going to suggest tkinter. It's part of python, ridiculously easy to use, and of course is very cross platform.
Many people dismiss tkinter based on years-old knowledge, but tkinter has evolved a lot. Some say it looks ugly, but more often than not functionality and ease of use is more important. Tkinter is definitely the best pragmatic choice in my opinion.
That being said, however, there is no "best". Qt, Wx and Tk are all fine, all do pretty much the same, and are all more-or-less equally cross-platform. Pick any one of them and don't look back. Once you get experience with one of tnem you'll be in a position to decide for yourself which one is "best"
As Matt already suggested, wxPython should be the most portable choice. On Windows it uses the native GUI toolkit, on Linux it will use Qt as backend (I dunno what it does on OSX though, but you can probably find out all of that on their website).