Hello,
how can I get text description for column types with MySQLdb?
I know that cursor.description contains number which represents type of column
and also there is module FIELD_TYPE.* with int constants like FIELD_TYPE.ENUM=247
For example how can I get name of column type if I know that it is '3'?
...
I'm curious, how come I get 404 error running this line:
urllib2.urlopen("http://localhost/new-post#comment-29")
While everything works fine surfing http://localhost/new-post#comment-29 in any browser...
urlopen method does not parse urls with "#" in it?
Anybody knows?
...
Hi, I'm looking for a library/component/class to create synamic cross-tab reports that must be shown on a web page.
One important requirement is that it must run on Linux and written in PHP, Python, FreePascal, Ruby, C or C++. I can't use Java or Mono here.
...
Hello All
im making some script with mechanize.browser module.
one of problem is all other thing is ok, but when submit() form,it not working,
so i was found some suspicion source part.
in the html source i was found such like following.
im thinking, loginCheck(this) making problem when submit form.
but how to handle this kind of...
I'm using web2py for an intranet site and need to get current login windows user id in my controller. Whether any function is available?
...
I was reading "Growing Object-Oriented Software, Guided by Tests" lately.
Authors of this book sugested to always start developing a feature with an end-to-end acceptance test (before starting TDD cycle) to not loose a track of progress and to make sure that you're still on the same page while unit-testing.
Ok, so I've start writing a v...
Howdie stackoverflow people!
So I've been doing some digging regarding these NoSQL databases, MongoDB, CouchDB etc. Though I am still not sure about real time-ish stuff therefore I thought i'd ask around to see if someone have any practical experience.
Let's think about web stuff, let's say we've got a very dynamic super ajaxified weba...
I am trying to understand what Python's descriptors are and what they can useful for. However, I am failing at it. I understand how they work, but here are my doubts. Consider the following code:
>>> class Celsius(object):
def __init__(self, value=0.0):
self.value = float(value)
def __get__(self, instance, owner):
...
I´m using Reportlab to generate a PDF.
Can´t retrieve a photo from a model.
#Personal Info
p.drawImage('myPhoto.jpg', 40, 730)
p.drawString(50, 670, 'Your name:' + '%s' % user.name)
p.drawImage (50, 640, 'Photo: %s' % (user.photo))
When i create on generate PDF, i got this error:
Traceback (most recent call last)...
Hi there
I'm scraping a website in Flash, writing in Python. I can see in Firebug that the page loads its Flash file and then some background data in an .asmx file.
The background data is what I'm interested in - so how can I get hold of the .asmx file? I already know what it's called.
I can't get at the .asmx file directly, but can ...
Im looking to learn more about your testing flows with Django.
Background information
http://docs.djangoproject.com/en/dev/topics/testing/
Im encountering difficulties when using test driven development.
The test runner of Django constantly creates all db models in a test db when starting.
For our current projects (between 40 and 240 m...
I used the pseudocode from wikipedia for wu's antialiasing algorithm, but when i run this code with draw function. i can draw a point when i click on next point everything disappears. It seems there is problem with color issue. Can you please tell what is going on, also this homework requires me to do manual antialiasing without using op...
Hi to all
I'm need to create a Python shell script that refresh output every n seconds like top unix command.
what 's the best way to do this?
...
I am very new to python and beautifulsoup.
In the for statement, what is incident? Is it a class, type, variable?
The line following the for.. totally lost.
Can someone please explain this code to me?
for incident in soup('td', width="90%"):
where, linebreak, what = incident.contents[:3]
print where.strip()
print what.str...
Hi all,
I'm dealing with two files, both of which have lines that look like the following:
This is || an example || line .
In one of the files, the above line would appear, whereas the corresponding line in the other file would be identical BUT might have the '||' items in a different position:
This || is an || example || line .
I ...
Im working in a Python plugin for XBMC (xbmc.org) and I want to execute a program (ffmpeg.exe) from my plugin without the cmd window appears.
If I use os.system() to call ffmpeg.exe works fine but the xbmc minimizes because os.system open a cmd window a few seconds.
So, I try to use os.spawnv() that I think its possible that allow me to ...
I have a trusted remote server that stores many custom Python modules. I can fetch them via HTTP (e.g. using urllib2.urlopen) as text/plain, but I cannot save the fetched module code to the local hard disk. How can I import the code as a fully operable Python module, including its global variables and imports?
I suppose I have to use som...
I am writing a Python program which should do some simulation. I have a working code example in C, which uses the FFTW library (version 2.1.5) to do Fourier transforms.
A simplified version of the C code is as follows:
#include <rfftw.h>
#include <stdio.h>
#include <math.h>
int main(int argc, char** argv)
{
size_t i, n = 2;
ff...
Please help! cannot figure this out for the life of me
Given the function f(x,n)= n**x(n-1)
5c. Using this function, calculate the rate of change of (((2^3 + 3^2)^4 -2^4)^2 + (3^4 – (6^2 + 3)^4)^3)^3
This is what I came up with in IDLE:
def function(x, n):
return (n*(x**(n-1)))
assertEqual (
function ((((
function ...
Hi,
I'm trying to use polymorphic_on on a python class with several inheritances:
engine = create_engine(
'mysql://xxx:yyy@localhost:3306/zzz?charset=utf8&use_unicode=0',
pool_recycle=3600, echo=True)
Base = declarative_base()
class AbstractPersistent(object):
version = Column('VERSION', Integer)
last_modified_by = Co...