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.

learn more… | top users | synonyms (2) | python jobs

-1
votes
0answers
5 views

Google Search site filtered for Python

I'm new using Python and I need to do a basic search of some keywords using google but filtering websites. I mean, something like when you put "site:www.thesite.domain keywords" in google, so that ...
0
votes
1answer
8 views

Urllib2 gets different html source

I want the HTML of http://fiverr.com/logo_business/design-a-killer-high-quality-effective-and-custom-made-logo-for-your-company-business-website-or-personal-use using urllib2. But it doesn't give me ...
0
votes
0answers
18 views

My python code does not return a page? Concerns HTML Forms

for a school project, I am required to build a page using forms. However, my code does not return a page. Instead, it only returns my code in .txt form. I'm not sure why this is the problem. Is this ...
0
votes
1answer
27 views

csv writer is adding delimiters in each words..

I wrote some throw away code which takes a list of ids checks for duplicates and writes a list of ids. Nothing fancy just a small part of what I am working on.. I get this weird output. It looks to ...
0
votes
1answer
25 views

With statement in python is returning None object even though __init__ method works

For a DB class with the following init method: class DB: def __init__(self, dbprops): self.dbprops = dbprops self.conn = self.get_connection(self.dbprops) debug("self.conn ...
0
votes
0answers
19 views

Why do I get these errors “Data truncated for column”?

I use this string to upload my CSV file into a MySQL table. Query = """ LOAD DATA LOCAL INFILE 'Data to file_name.csv' INTO TABLE table_name FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY ...
-3
votes
2answers
44 views

Regex for Python

I wanted to pull in data using Regex: This is the data I need to pull in: <td colspan="5"> Some line here <br> Another line here <br> One more line here </td> I was pulling ...
0
votes
1answer
37 views

Iterate through a list

Very simple problem. Sorry I am new. I have this code below: list = ['edward', 'jason', 'john'] for i in list: print list and it produces: john Why do I only get the last name? I want all of ...
0
votes
1answer
49 views

possible to set variable with multiple if statments?

I can do this: x ='dog' testvar = 1 if x == 'dog' else 0 My x in this case can be one of three things. 'dog', 'cat, or '' (empty) I would like to set testvar equal to 1 if x == 'dog', equal to ...
-1
votes
2answers
23 views

Cousera Data Science python/twitter: analyzing tweets with sentiment file returns error for non-english words

I'm in a data science course module in coursera and I'm a horrible novice at coding. This assignment is to write a script that uses a sentiment file and a printout of the twitter API. The sentiment ...
0
votes
0answers
5 views

Override WSDL port (i.e., bound URL) in spyne

It appears that Spyne sets the port in the WSDL definition according to how the service is accessed. For example, if I first (i.e., after a restart) access the service at http://domain.com/soap-api/, ...
0
votes
0answers
15 views

make install fails when trying to install Python Audio Tools

I am trying to install Python Audio Tools, but when I run make install I get the following output: python setup.py build running build running build_py running build_ext building 'audiotools.cdio' ...
0
votes
1answer
17 views

Is there a good shortcut convention for ugettext_noop in python/django?

When doing i18n support for django apps it sometimes comes up to have to use ugettext and ugettext_noop in the same file. It's a common convention to import ugettext as _ which is a nice convention in ...
-1
votes
1answer
14 views

Soundcloud: Getting all users who contributed a song to a group

Whats the best way to get ALL users who contributed a song to a group? I'm working with Python, is there any curl url which can do this? Thanks!
2
votes
3answers
53 views

How can i write to a txt file with multiple lines?

I made an online survey and I keep track of all the inputs in a txt file. Below are two questions, and everytime someone answers a question, I want to append the answer to the coresponding question. ...

1 2 3 4 5 12622
15 30 50 per page