Here tis the error I get while trying to install MySQL-python-1.2.3. any idea's?
Traceback (most recent call last):
File "C:\Documents and Settings\Desktop\MySQL-python-1.2.3\setup.py", line 15, in <module>
metadata, options = get_config()
File "C:\Documents and Settings\Desktop\MySQL-python-1.2.3\setup_windows.py", line 7, in get_c...
Hi,
I have data (numbers) saved in the following format (example):
234 127 34 23 45567
23 12 4 4 45
23456 2 1 444 567
...
Is there any python-way method to line up the numbers and get them as
234 127 34 23 45567
23 12 4 4 45
23456 2 1 444 567
(I cannot predict the column size).
...
In another question, other users offered some help if I could supply the array I was having trouble with. However, I even fail at a basic I/O task, such as writing an array to a file.
Can anyone explain what kind of loop I would need to write a 4x11x14 numpy array to file?
This array consist of four 11 x 14 arrays, so I should format i...
I feel like I am missing something really obvious. I'm trying to use the WTForms template extensions with Django. I have a project on my development server which is working great (IE the extensions are working properly) but when I put it out on a test server, suddenly they are broken. Both servers have the same versions of Python, Dja...
I have a Python application that is running as a console application. I did not like Python GUI libraries. That's why I want to use Java for GUI and python for application core. There are lots of details to read in the Jython documentation. I need a simple way to connect the GUI programmed in Java, and the core programmed in Python. What...
I'm trying to create XML Schema using lxml. For the begining something like this:
<xs:schema xmlns="http://www.goo.com" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.goo.com">
<xs:element type="xs:string" name="name"/>
<xs:element type="xs:positiveInteger" name="age...
Have you used MongoEngine or MongoKit with Django? Which one do you prefer?
Background:
I'm developing a new site and have experience with normal Django development but for the kind of data I'll be using the MongoDB will be better suited than a SQL database.
I'm using Python 2.7 and can compile/install anything on my host so that's no...
What is the best way performance wise to take a list of words and turn them into phrases in python.
words = ["hey","there","stack","overflow"]
print magicFunction(words)
>>> ["hey","there","stack","overflow", "hey there stack","hey there", "there stack overflow","there stack", "stack overflow", "hey there stack overflow" ]
Order does...
Hello...
I was wondering if it is possible to perform a certain number of operations without storing the loop iteration number anywhere.
For instance, let's say I want to print two "hello" messages on the console. Right now I know I can do:
for i in range(2):
print "hello"
but then the "i" variable is going to take the values 0 ...
I'm trying to get Apache Solr running inside my zc.buildout environment.
I've defined a simple model:
class NewsItem(models.Model):
title = models.CharField(blank=False, max_length=255, help_text=u"Title of this news item")
slug = models.SlugField(blank=False, help_text=u"Slug will be automatically generated from the title")
...
hi
can anyone give me some document and tutorial about using python api in ntop, Except luca deris present pdf.
in web interface there is "about>online documention> python engine" but this link have error. can someone send me that document.
excuse me for my bad english.
...
Given the following:
def foo():
x = a_method_returning_a_long_list()
y = a_method_which_filters_a_list(x)
return y
will Python's bytecode compiler keep x & y in memory, or is it clever enough to reduce it to the following?
def foo():
return a_method_which_filters_a_list(a_method_returning_a_long_list())
...
Hello,
I'm try to embed a IExplorerBrowser (Windows Explorer) in a wxpython application but I cannot seem to get the IExplorerBrowser module opened in python
I have the CLSID of IExplorerBrowser from the registry but when I try and open it with:
from win32com import client
client.gencache.GetModuleForCLSID(id)
Nothing is returned.....
Hi,
I make no claims to know anything at all about writing Python scripts or programming in general, but I've been tasked with writing one anyway that will have to operate on a wide variety of Python versions. I wrote, and did my testing on versions 2.3, 2.4 and all went well. Version 2.2 though is giving me fits and my google-fu must...
I have a django aplication with an admin panel. When i add some item (it takes about 10 seconds to add it), i can't load any other page. The page is waiting for the first page to load, and then it load itself.
...
I wrote a line of code using lambda to close a list of file objects in python2.6:
map(lambda f: f.close(), files)
It works, but doesn't in python3.1. Why?
Here is my test code:
import sys
files = [sys.stdin, sys.stderr]
for f in files: print(f.closed) # False in 2.6 & 3.1
map(lambda o : o.close(), files)
for f in files: print(...
Is there some way to import an extension from an .egg file? For example hggit installs itself as hg_git-0.2.4-py2.5.egg, which cannot be listed under [extensions] directly, or it's interpreted as a standard .py file.
Is there some way to include that file as an extension?
Alternatively, is there some way to install hg-git manually in a...
I followed what they said at pyside.org but somehow i can't get it to work.
I downloaded the two files that they are linking from their site (qt libraries and pyside for python 2.6)
When I try one of their examples I get the following message:
Traceback (most recent call last):
File "2dpainting.py", line 28, in <module>
from PySi...
I've written a very rudimentary attempt to integrate Arecibo reporting with Pylons, but the sad fact of the matter is that it basically doesn't work.
I've conceived of this as middleware, but I'm not sure A) where to put it in the middleware stack without interfering with other aspects of the middleware, B) how to get at various bits of...
Hi,
I am using the Flask micro-framework which is based on Werkzeug, which uses Python.
Before each restricted page there is a decorator to ensure the user is logged in, currently returning them to the login page if they are not logged in, like so:
# Decorator
def logged_in(f):
@wraps(f)
def decorated_function(*args, **kwargs)...