python (44,877)


XML Processing in Python

XML Processing in 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…


Generate list of all possible permutations of a string

How would I go about generating a list of all possible permutations of a string between x and y characters in length, containing a variable list of characters. Any language would work, but it should b…


python - Get a preview JPEG of a PDF on Windows?

I have a cross-platform(Python) application which needs to generate a JPEG preview of the first page of a PDF. On the Mac I am spawning sips. Is there something similarly simple I can do on Windows?…


python - cx_Oracle: How do I iterate over a result set?

There are several ways to iterate over a result set. What are the tradeoff of each?…


performance - Most efficient code for the first 10000 prime numbers?

I want to print the first 10000 prime numbers. Can anyone give me the most efficient code for this? Clarifications: It does not matter if your code is inefficient for n>10000. The size of the code doe…


Using 'in' to match an attribute of Python objects in an array

I don't remember whether I was dreaming or not but I seem to recall there being a function which allowed something like, foo in iter_attr(array of python objects, attribute name) I've looked over the…



python - How do I use itertools.groupby()?

I haven't been able to find an understandable explanation of how to actually use Python's itertools.groupby() function. What I'm trying to do is this: Take a list-in this case, the children of an obje…


python - Adding a Method to an Existing Object Instance

I've read that it is possible to add a method to an existing object(i.e., not in the class definition) in Python. I understand that it's not always good to do so. But how might one do this?…


Bayesian filtering for spam

I was wondering if there is any good and clean oo implementation of Bayesian filtering for spam and text classification? This is just for learning purposes.…


What is the most efficient graph data structure in Python?

Closed. This question is off-topic.It is not currently accepting answers. Want to improve this question? Update the question so it's…




example how from list java tutorial for string get file