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 8 years ago.
Improve this question
The following website from the official python tutorial seems to imply that a graphics package is automatically included with an install of Python 3. Beyond being highly skeptical of that, my python 2 does not have the package in question.
http://anh.cs.luc.edu/python/hands-on/3.1/handsonHtml/graphics.html
Does anyone have any ideas or substitutions for performing simple windowed graphics in python, 2 or 3?
The default python "graphics" package is Tkinter
https://wiki.python.org/moin/TkInter
In Python 3, it's called "tkinter" - in python 2 it's called "Tkinter". It sometimes includes (depending on your distribution) ttk or tix, which are extensions. It makes direct calls to Tcl, so it's pretty fast at basic operations.
PIL/Pillow is a very standard dependency for any kind of image manipulation. Tkinter basically will only let you work with gif and postscript files
https://pypi.python.org/pypi/Pillow
Zelle graphics a beginners graphics program built on tkinter. It is not a serious graphics suite (it's super duper slow), though it can be extremely good for educational purposes. It's meant to accompany his Python book or for self-teaching. Try Turtle as an alternative for teaching purposes, there are a lt of tutorials out there. I don't know which distributions include it, but you can easily download it by googling for it
From your linked page:
You will just be a user of the graphics.py code, so you do not need to
understand the inner workings! It uses all sorts of features of Python
that are way beyond these tutorials.
Those features are called Tkinter. I like tk, and this it's pretty easy to use, but that's subjective - take a look and decide for yourself.
If you're looking for more advanced suites or any kind of 3D (tkinter is strictly 2D) (my guess is you aren't for now, but that's okay), try OpenGl for python, or pygame.
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 recently learned python for scripting for Maya and other applications. As someone who sees big potential within scripting I use my self-written script pretty often to speed things up. But there is kinda missing the easy-to-use aspect. I always have to copy them from Sublime(Text Editor) into Maya. Thats when I asked my technical director how to implement a window for my scripts. He suggested QT for it, but even though I already created some simple window, I cannot get it to work in Maya with python.
I did not find any very useful tutorial for that :/
Is there maybe a full tutorial for that? Or can somebody help me?
Importing your windows as a module, attaching functions to buttons and so on.
I think it would be interesting for many people who wants to learn python for some applications.
Thanks ahead!
Okay I found the answer myself after looking even more.
Here is a youtube link for a video from the "Maya Learning Channel" who shows it pretty well.
He is neither using PyQt nor PySide. Did not even know it works without these.
Good luck other people! ^^
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
I want to write a visualization for some complex scientific data in Python. I have done a similar thing a few years ago in Objective-C/Cocoa/OpenGL. The visualization will contain some fancy shader programs, so at least OpenGL 3.0 is required. Also, I need to draw a window and do some mouse/keyboard handling. Some GUI widgets would be nice, but not required. Python 3 support is highly desirable.
I looked into:
PyOpenGL, which has no window/mouse/keyboard handling.
PyGlet, which only supports Python 2.7.
PyQt, which only supports OpenGL 2.0.
PySide, which is pretty much dead, and stuck in Qt 4.7.
wxPython, which only supports Python 2.7.
PyGame, which is pretty much dead.
Do you know any library that can do modern OpenGL and some windowing in Python 3?
My recommendation is PyOpenGL plus PyQt. Python plus either Pyglet or wxPython are possible alternatives.
PyOpenGL (the Mike Fletcher version, right?) is the best Python OpenGL API I know of. It has support for OpenGL 3 and 4 and is just very nice and Pythonic.
PyQt itself only supports OpenGL 2, but PyOpenGL will run inside a PyQt context. Since PyQt does have a Python 3 version, this combination should meet your needs.
For the GUI stuff I prefer wxPython, but as you note that hasn't been updated for Python 3 yet. You could take a look at the wxPython Phoenix project, but that's very much a work in progress.
Pyglet is also quite nice but has less GUI functionality that wxPython or PyQt. Think of it as the equivalent of GLUT. The Python 3 version is currently in alpha, but given that it's not a complete rewrite I'd expect it to be stable very soon.
Hope this helps.
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 am a beginner programmer and have learned most of what I know thus far from using delphi for the past couple of months. A month or so back I decided to give python a try as I was told it may be easier to learn and I really like the language. I guess I just seem to pick things up easier using it.
The only problem is that I can't seem to find a good IDE for it that works in the way that Delphi does. I want to create desktop apps with nice GUIs so it would be nice to have something similar to Delphi/Visual studio to work with.
I have searched around and could find anything. Was wondering if anyone could lend a hand.
Also, from what I have gathered Ironpython seems to be the same as python coding wise. I don't mind my apps only being able to work on windows. Is Python Tools a good option. I mean is it basically like using visual studio but with python code instead?
Any help is much appreciated.
Thanks.
Boa Constructor is a classic RAD IDE for GUI applications (wxpython, both linux and windows). People is still using it but seems that development stopped some years ago. PythonCard is another RAD IDE I used in the past but also unmaintained right now
Although they are not IDEs, some tools are very helpful for GUI design like:
- wxglade (wxpython, included as a pluging in Stani Python Editor, only python2.x)
- qtdesigner (qt-pyqt or pyside, included in pyqt. Spyder IDE, build on pyqt, has a dedicated link to it. Works also for python 3.x)
I use PyGTK to interact with GTK.
http://www.pygtk.org/docs/pygtk/gtk-class-reference.html
http://www.pygtk.org/pygtk2tutorial/
But there is also QT, and WXpython, that are worthy.
http://thekompany.com/products/blackadder/
I always liked BoaConstructor which is a wxPython GUI Builder.
Doesn't seems to be actively maintained any longer though...
wxpython is very active though...
Python Tools is basically just like using VS but with Python. It's got intellisense, debugging, profiling, etc... When working w/ IronPython the .NET debugger is a little rough (you'll see internal implementation details) but you can still use the pure Python debugger which gives you a Pythonic view.
The intellisense engine is aware of the GUI designer so you'll get completions against the controls defined in XAML. And you'll get auto-definition of handler methods when you do things like double click on buttons in the GUI designer or select to define an event handler in the properties pane. Probably the biggest missing thing is that there's no support for user controls and there's also no designer support for WinForms.
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 already know some Python and got interested in extending Blender using Python scripts. Can anyone suggest me some good tutorials or books to learn this subject further? I'm already looking at Blender documentation, but I would like to learn some more because I'm a newbie when it comes to 3D modeling.
The Blender 2.5 Python 3.1 manual has some good links to both basic internal tutorials for using Python scripts and some tutorials on other sites.
Bear in mind that this is Python 3.1, not 2.x, so you'd have to adjust accordingly.
You'll be using the Blender Python API (not so sure how well it's documented, but you should be fine). I'd familiarize myself with Blender and Python first (if you haven't already), then do some basic tutorials, and finally dive into the API.
Blender 2.65 docs now have a tutorial on how to write an addon, This covers a lot of stuff related to general scripting too - not just addons.
http://www.blender.org/documentation/blender_python_api_current/info_tutorial_addon.html
I found the Blender Wiki very helpful in finding specific functions and procedures built in to Blender. To improve my Blender Python skills, I first decided to program a first person shooter. My first code for Blender was a mouselook script. This gave me most of the basics, and if I needed to, I could probably write a similar script in a matter of minutes now.
Also, a good idea is to look at other people's scripts and follow the logic.
There are many good tutorials for Blender and Python, but not too many for the crossover between them. Really the only way to get round that fact is to surf example scripts and websites. I found the Blender community is very supportive, so if you really get stuck on a small part, just ask.
I'm still a probable noob in the programming matter, but (with the exclusion of the node editor), I know my way around Blender pretty well, so if the worst comes to the worst, email/message me.
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
There're tons of apps/widgets for PHP function reference and even for Ruby but I'm shocked to find there is nothing available for a popular language like Python (besides the official online documentation ofcourse).
Is there really not a single handy reference widget/app available for Python? I have 'Pocket Reference' book, but a dashboard widget would be so handy!
Python libraries have (or should have) built in documentation through docstrings. Also, python code is (mostly) very readable, and reading the source (.py or even .c) is actually the preferred way for many developers to get the information they're looking for, especially since some corner cases may not even be documented.
I've caught myself looking through the source now and then, as if it's a natural step in looking up functionality, either because I'm curious how they solve the problem, or because I reckon it's faster than googling obscure problems and reading SO questions.
So it's (often) not very pretty at all, but it's possible that the pydoc command line tool, or pydoc in webserver mode, could help you here. Here's an article on pydoc to help you get started
The interactive interpreter is a fantastic reference tool. dir(<identifier) lists all the attributes of a module, class, or function help(<identifier>) gives you help about same.
pydoc at the command line is another great tool. It does for Python what man gives you for commands, plus it even includes a web server you can start up to see the documentation in your browser.
I develop on Mac OS.
I have all the Python documentation directly available through a desktop app.
The app is called Safari. I bookmark http://docs.python.org/index.html
It's available as a desktop app.