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
Building a hierarchically indexed DataFrame from existing DataFrames
I have two dataframes with the same columns and indices. I would like to combine them into a third dataframe with a hierarchical index, maintaining the current index and adding a second that ...
0
votes
0answers
14 views
Python, sum of positive odd numbers less than n
I have a question I'm working on now and I'm not too sure how to tackle it. I'm sure it's simple but I'm just making it complicated
Write a functions sum_odds(n) that returns the sum of all ...
0
votes
0answers
3 views
Convert KML to CSV in python?
I am trying to convert KML to CSV file using python, the obvious way is to use lxml to parse and generate the required CSV, but i am looking for a more generic solution which takes an input KML file ...
0
votes
0answers
26 views
extracting and concatenate parts of a string
I have a huge number of strings to process in the following manner.
For each string,the characters from position 3 through 15 need to be extracted ,except position 9.
So,for an input ...
0
votes
0answers
6 views
Displayed Date is different from data in Django
I am having trouble with displaying the correct date on my django app
For example
In my database, it is stored as "2013-05-03 22:20:01-07"
When I call it in the template by using {{ task.dateadded ...
-1
votes
0answers
18 views
Good beginner projects with python and tkinter [closed]
So, I'm beginning to learn GUI programming in python through the tkinter module and I've watched some tutorial videos and read some documentation, but I didn't really find a good project for ...
0
votes
1answer
15 views
Python property setter decoration of a list object
globalList = []
class MyList:
def __init__(self):
self.myList = [1, 2, 3]
@property
def myList(self):
return self.myList.extend(globalList)
@myList.setter
def ...
0
votes
0answers
10 views
Find all html elements whose contains a specific class
I want BeautifulSoup to find all element in html page whose have a certain class. But they can also have extra classes. For example:
soup.findAll('tr', {'class': 'super_class1'})
This code only ...
0
votes
1answer
22 views
pip issue installing almost any library
I'm having a difficult time using pip to install almost anything. I'm new to coding, so I thought maybe this is something I've been doing wrong and have opted out to easy_install to get most of what I ...
0
votes
0answers
27 views
construct an unknown url from know information in Python
I'm trying to create a python script... basically...
I have a url to some site
url = "http://www.somesite.com/foo/bar/"
Files on server:
1-123j.jpg
2-123.jpg
3-123d.jpg
4-1594ss.jpg
...
...
...
0
votes
1answer
14 views
multiprocessing in Maya pops up a window
I am writing a plugin for Maya 2011 using python. To utilize all the cores available in my machine (running Windows 7 32-bit) and speed up the performance of the plugin, I created multiple processes ...
0
votes
1answer
45 views
How to fix “int” is not subscriptable error?
def main():
size = 10
num = fillaray(size)
odd = totalOdds(num, size)
even = totalEvens(num,size)
compare(size,num,odd,even)
import random
def fillaray(size):
num = [0]
...
0
votes
1answer
14 views
Easiest way to render wikitext
Is there some easiest way to render wikitext to html file(python or C++ best)?
Can I use a part of moinmoin wiki engine or mediawiki html-dump? If so, how to use it?
I have try wikicreole, but it ...
0
votes
0answers
3 views
Python libmagic duplicate symbols error during install - OSX
I'm trying to build the Python libmagic library and install it, although when I make or make install I get duplicate symbols errors and it fails. Installing via homegrown is not an option.
$ make ...
0
votes
0answers
16 views
Flask permanently redirects to /index after raising RequestRedirect('index')
So I am using flask 0.9 with python 2.7. In an attempt to be sneaky without actually understanding what I'm doing, I messed up my url routing.
I am using flask-admin to whip up a quick interface. ...