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

0
votes
0answers
2 views

Lost (I'm new) - Having trouble writing a crawler that will scrape a directory of folders of websites and write that info to a .csv

Every time I look up an error, I think I find something that will work better. I need some guidance on if I'm moving in the right direction or not. I have a directory of offline websites that I need ...
0
votes
0answers
9 views

Python Django “ImportError: No module named hashcompat”

I'm learning python + Django by reading 《beginning django e-commerce》, after I have installed django-db-log, when running $python manage.py runserver, there is a problem. Unhandled exception in ...
0
votes
0answers
18 views

Python class variable not updating

I have a class that is taking in an Id and trying to update the variable current_account but when I print out the details of the current_account it hasn't updated. Anyone got any ideas for this? New ...
0
votes
0answers
6 views

python3.3 IMAP4 error on windows

class CheckEmail(object): def __init__(self, host, port, username, password, constructor=IMAP4): self.conn = constructor(host, port) self.conn.login(username, password) self.conn.select() ...
0
votes
1answer
18 views

memoize to disk - python - persistent memoization

Is there a way to memoize the output of a function to disk? I have a function def getHtmlOfUrl(url): ... # expensive computation and would like to do something like: def getHtmlMemoized(url) ...
0
votes
0answers
17 views

Django and NoSql - use or not

Is a good idea to use a NoSQL(couch db/mongo) database with django? The project will operate on multiple files, upload, ocr integration etc. Is this a good reason to use NoSQL databases? Are there ...
2
votes
0answers
25 views

Generate all possible replacements

Given a replacement map like {search: replace, search: replace, ...} and a string, how to generate a list of all possible replacements of that string (first substring replaced, second substring ...
0
votes
1answer
24 views

regular expression with Lao?

in python i would like to display only Lao Characters in this HTML code (just only in "textarea" tag) <font color="Red">ພິມຄໍາສັບລາວ ຫຼື ອັງກິດແລ້ວກົດປຸ່ມຄົ້ນຫາ - Enter English or Lao Then Hit ...
0
votes
1answer
14 views

Storing frames in list

I'm trying to store frames in a list so i can get my widgets 3 by 3 on top of each other whit a small space in between them But i can't seem to make it work. Code: self.cboCombo = [] ...
0
votes
0answers
4 views

End of pcap file gives error while reading in pcapy

I am reading multiple files using pcapy and dpkt in python. Following is my code: def ReadFile(path): reader = pcapy.open_offline(path) (header,payload) = reader.next() while header: ...
0
votes
1answer
21 views

It is possible to show list/dictionary generator progress in python?

I build very big dictionary (2^20 elements) in python using dictionary generator expression (i'm using IDLE for this). The process is very long because of every element needs hard computing. It is ...
0
votes
1answer
16 views

“argument must be a callable function” when using scipy.integrate.quad

I've written some code that enables me to take data from DICOM files and separate the data into the individual FID signals. from pylab import * import dicom import numpy as np import scipy as sp ...
1
vote
0answers
13 views

Python, SymPy, integration of big trigonometric functions

In SymPy, what is the recommended way to integrate a big trigonometric functions like this oney shown below? The numerical integration gives -27151.225. from sympy import pi, sin, cos from sympy.abc ...
0
votes
0answers
12 views

Matplotlib fails to load in spyder after updating with port

I'm using spyder 2.1.13.1 on OSX 10.6 and recently ran update on macports. Now matplotlib won't load inside the spyder console. The traceback is: Traceback (most recent call last): File ...
0
votes
1answer
31 views

simplify this python generation

I am new to python. Is there a way to simplify this: def getDivs(): divs = soup.findAll(name = "div", attrs = {"class" : "resultCell"}, recursive = True) for div in divs: h2 = ...

1 2 3 4 5 12420
15 30 50 per page