Skip to content
Advertisement

Which Python user interface library can I use for 2D games? [closed]

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 2 years ago. Improve this question I want to create a 2D game on Python with heavy

Get .wav file length or duration

I’m looking for a way to find out the duration of a audio file (.wav) in python. So far i had a look at python wave library, mutagen, pymedia, pymad i was not able to get the duration of the wav file. Pymad gave me the duration but its not consistent. Answer The duration is equal to the number of

Is there a way to get a list of column names in sqlite?

I want to get a list of column names from a table in a database. Using pragma I get a list of tuples with a lot of unneeded information. Is there a way to get only the column names? So I might end up with something like this: [Column1, Column2, Column3, Column4] The reason why I absolutely need this list

How to properly escape single and double quotes

I have a lxml etree HTMLParser object that I’m trying to build xpaths with to assert xpaths, attributes of the xpath and text of that tag. I ran into a problem when the text of the tag has either single-quotes(‘) or double-quotes(“) and I’ve exhausted all my options. Here’s a sample object I created Here is the snippet of code

How do you install or activate PyUno in LibreOffice?

How do you make Python (any Python) know about PyUno in LibreOffice? When I do: python says that it knows no module “uno”. (This question came up re. this question.) Answer Here’s what I did: inside the LibreOffice directory, there is a “program” directory with a python.exe, if I use that python (which is at version 2.6.1), I can import

Elegantly changing the color of a plot frame in matplotlib

This is a kind of follow-up question to this post, where the coloring of axes, ticks and labels was discussed. I hope it is alright to open a new, extended question for this. Changing the color of a complete frame (ticks and axes) around a double-plot (via add_subplot) with axes [ax1, ax2] results in a lot of code. This snippet

Walking/iterating over a nested dictionary of arbitrary depth (the dictionary represents a directory tree)

Python newbie at time of writing. This came up because I want a user to be able to select a group of files from within a directory (and also any subdirectory), and unfortunately Tkinter’s default ability for selecting multiple files in a file dialog is broken on Windows 7 (http://bugs.python.org/issue8010). So I am attempting to represent a directory structure by

When do you use ‘self’ in Python? [duplicate]

This question already has answers here: What is the purpose of the `self` parameter? Why is it needed? (26 answers) Closed 6 months ago. Are you supposed to use self when referencing a member function in Python (within the same module)? More generally, I was wondering when it is required to use self, not just for methods but for variables

Advertisement