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
9 views
Storing lists and objects in a dictionary in python
I'm currently writing a python program where I'm storing different data in a dictionary.
With most things I store I have no problem, but there are a few specific things where I ran into problems. ...
0
votes
0answers
8 views
python config file error
I have a program that updates information to an ini file but when I try to do this I get this error:
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Program ...
1
vote
2answers
20 views
Finding key with minimum value in OrderedDict
I need to find the key whose value is the lowest in the ordered dictionary but only when it is True for the position in my_list.
from collections import OrderedDict
my_list = ...
0
votes
0answers
7 views
QStyledItemDelegate with QComboBox: Shows Index and not Text
I have a QStyledItemDelegate for a table. In one cell I have a QComboBox created through the delegate's createEditor. I add some items to the combobox listing via self.addItem("an item"); however, ...
0
votes
0answers
7 views
Django 1.4.5: templatetag render doesn't get called
The following templatetag worked defore, but stopped now for some reason,
Django version 1.4.5. Tried to debug and saw that render method is not being called.
What might cause this?
# -*- ...
0
votes
1answer
5 views
rauth 5.5.0 failed installation in python 3
generating error as this
C:\sankar\rauth-0.5.5.tar\rauth-0.5.5>python setup.py install
Traceback (most recent call last):
File "setup.py", line 4, in <module>
from rauth import ...
0
votes
0answers
14 views
Curve Fitting to a time series in the formate 'datetime'?
Here is my problem: polyfit does not take datetime values, so that I converted datetime with mktime producing the polynomial fit works
z4 = polyfit(d, y, 3)
p4 = poly1d(z4)
For the plot however, I ...
1
vote
2answers
29 views
Behaviour of raw_input()
I wanted to understand the behaviour of raw_input in the below code.
I know num will be string.
Irrespective of whatever number i enter it always enter the elif part i.e. if num is 5, which should go ...
0
votes
3answers
21 views
How can i create in incremental backups of mysql databases
I have linux centos 6.4 server with mysql5.6
I have the cron job for making hourly mysql database backups like this
Its in python
os.popen("mysqldump -u %s --password=%s -h %s -e --opt ...
0
votes
0answers
10 views
Issue iplimage to numpy array conversion
I am trying to detect circle in a image using opencv python using the follwoing code:
circles = cv2.HoughCircles(frame, cv2.cv.CV_HOUGH_GRADIENT, 2, 10, np.array([]), 20, 60, width/10)[0]
The ...
1
vote
1answer
46 views
What is happening in this Python code to get the terminal window size?
This code returns the size of the terminal window.
def gettermsize():
s = struct.pack("HHHH", 0, 0, 0, 0)
a = struct.unpack('hhhh', fcntl.ioctl(sys.stdout.fileno(), termios.TIOCGWINSZ , s))
...
0
votes
0answers
13 views
Duplicate Images with Django Model
In a django application, I will have a database of images all classified under the image class in my models.py. Unfortunately there is a possibility that some of these images are duplicates of each ...
1
vote
1answer
12 views
isin check against a list-Pandas Dataframe
I want to select some data from a dataframe based on a list. I have refered meany questions including this one. My 'df2' is like following:
col1 col2 session_number col3 col4 session
0 1.1 ...
0
votes
0answers
16 views
python serial send latest data
Hello I'm new in python programming language.My project is send packet data through TCP connection on Raspberry Pi then received by android phone. I just wondering how to get the latest packet ...
0
votes
0answers
12 views
IDA Pro List of Functions with Instruction
I have a DLL with a large number of functions in IDA Pro. I would like to make a script that can scan the instructions within each of the functions looking for a specific instruction. For my ...