python-2.7
python 2.7, using Counter on open('file.txt')
I got a good answer before for a similar problem b开发者_JAVA技巧ut I didnt consider the scalability of the question that I asked. I had trouble with the text editor I am using concerning pasting in l[详细]
2023-03-23 04:51 分类:问答What is the most efficient way of finding all the factors of a number in Python?
Can someone explain to me an efficient way of finding all the factors of a number in Python (2.7)? I can create an algorithm to do this, but I think it is poorly coded and takes too long to produce a[详细]
2023-03-22 15:38 分类:问答manage.py runserver Error: [Errno 10013]
I am having some problems running dja开发者_JS百科ngo. When I use the command manage.py runserver I receive an error that says: Error: [Errno 10013] An attempt was made to access a socket in a way for[详细]
2023-03-22 04:39 分类:问答Buffers and Memoryview Objects explained for the non-C programmer
Python 2.7 has introduced a new API f开发者_JS百科or buffers and memoryview objects. I read the documentation on them and I think I got the basic concept (accessing the internal data of an object in[详细]
2023-03-21 07:23 分类:问答board-drawing code to move an oval
I am working on a python checkers game for college. I have the board drawn, using tk, but I can\'t seem to implement a movement function for the pieces. If anyone see any errors in my code, or can off[详细]
2023-03-21 00:07 分类:问答Validating a zip file coming from stdin
After some frustration with unzip(1L), I\'ve been trying to create a script that will unzip and print out raw da开发者_运维知识库ta from all of the files inside a zip archive that is coming from stdin[详细]
2023-03-19 06:13 分类:问答I can't import igraph on mac 10.6
I installed igraph for python in my mac but I can\'t import it. First I installed C core library, then I proceeded with the instalation for python, by doing:[详细]
2023-03-18 08:54 分类:问答Writing UTF-8 friendly parsers in python
I wrote a simple file parser and writer, but then I came across an article talking about the importance of unicode and then it occurred to me that I\'m assuming the input file is ascii encoded, which[详细]
2023-03-17 06:13 分类:问答Undefined Symbols with Python.h
I\'m trying to embed a Python script into a C++ application. Before I do such a thing though, I\'m trying to run the example script.[详细]
2023-03-17 02:13 分类:问答Is it normal for python's io.BytesIO.getvalue() to return str instead of bytes?
Is it normal for python\'s io.BytesIO.getvalue() to return str instead of bytes? Python 2.7.1 (r271:86832, Jun 13 2011, 14:28:51)[详细]
2023-03-15 04:33 分类:问答