Tagged Questions
Python is a dynamically and strongly typed programming language whose design philosophy emphasizes code readability. Two significantly different versions of Python (2 and 3) are in use. Please mention the version that you are using when asking a question about Python.
0
votes
0answers
2 views
python multiprocessing Pipe/Queue not terminating
I have two questions related to pipe/queue in python.
1) Pipe is not terminating (i.e. EOFError is never thrown). I know the solution of this problem is to pass in_p to the process() function as well ...
1
vote
0answers
11 views
Why does Liza Daly's fast_iter use a while loop instead of an if statement?
I'm working on a project that requires processing large XML files. Using Python, I inevitably came across Liza Daly's article, http://www.ibm.com/developerworks/library/x-hiperfparse/. However, I ...
0
votes
0answers
7 views
Writing into sqlite3 db in Python
I am trying to create a simple phone book in python with sqlite3.
ben.displayPerson returns 4 values (name, age, phone, faceboolink). I'm trying to get these to write into the sqlite3 database. ...
0
votes
1answer
19 views
How to make Python Decorator NOT run when imported
I've decorated a method in Python. And when I import the module that contains the method, the decorator autoruns.
I realize that this is how decorators were made however Is there a way to have ...
0
votes
1answer
7 views
Whats the correct way to add easy_install-2.7 bin after successful install of 3.3?
Python's Easy Install ain't that easy. The instructions from python.org offer a command which pipes in the python version into the installer. Only after installing did I learn about easy_install and ...
0
votes
0answers
5 views
Jump not working and weird screen blitting issue - pygame/python
Hi there I have two issues with my game at the moment my jump isn't working when there should be a collision detection between player and platform, I have tried to do this many ways e.g. line 179. ...
-1
votes
2answers
15 views
Sorting my list by hours and printing a table,
I feel like I'm so close to the answer but after trying various methods suggested on similar problem on this site, I'm not closer to the answer.
I've tagged in the actual assignment what I borrowed ...
0
votes
1answer
38 views
Why can't I split this python list?
I have some code to parse an apache log file(start_search, and end_search are date strings of the format found in an apache log):
with open("/var/log/apache2/access.log",'r') as log:
from ...
0
votes
2answers
17 views
Python - Library to Import Libraries
I am developing a project which has about a dozen different files. At the top of each file I have almost the identical lines which import the same libraries and initializes a connection to my DB:
...
0
votes
0answers
10 views
error: Could not find suitable distribution for Requirement.parse('bdist-egg')
I am trying to install matplotlib using the following command and running into below error,can anyone provide inputs what is wrong here and how to overcome this?
easy_install matplotlib
ERROR:-
...
2
votes
1answer
24 views
array slicing in numpy
today I used the numpy array for some calculation and found a strange problem, for example, assume i already imported numpy.arange in Ipython, and I run some scripts as follows:
In [5]: foo = ...
0
votes
1answer
7 views
Click a href button with selenium and python?
I have one button from one linkedin page with this code:
<div class="primary-action-button"><a class="primary-action label" ...
0
votes
1answer
7 views
python cffi crashes after callback
I have a proprietary dll which interfaces with usb device, ctypes interface for it is working fine, but cffi one is crashing after calling a callback.
function SwitchOn(6) should return pointer to a ...
1
vote
3answers
24 views
word separator for python coding
So the question reads:
Write a program that accepts as input a sentence in which all of the words are run together but the first character of each word is uppercase. Convert the sentence to a ...
0
votes
0answers
8 views
CANNOT Install external modules in Canopy
I have set Canopy as my default python compiler.
I want to install scikits modules, currently not available in Canopy Package manager. I have installed setup tools and easy_install, pip which points ...