Hi,
I am using pythons win32com module to automate Adobe Photoshop. This works fine on some machines (have had issues with it not working on users with limited windows account permissions, but thats another issue).
But on machines with both the 32bit and 64bit versions of Photoshop installed, I am getting errors when trying to access c...
I'm trying to get buildbot running on centos5, and getting the following error:
File "/usr/lib/python2.4/site-packages/buildbot/status/mail.py", line 14, in ?
from twisted.mail.smtp import sendmail, ESMTPSenderFactory
ImportError: No module named mail.smtp
I have the following twisted packages installed (and don't see anything e...
I'm just wondering what the differences and advantages are for the different CGI's out there. Which one would be best for python scripts, and how would I tell the script what to use?
Thanks!
...
I am trying to loop through a bunch of documents I have to put each word in a list for that document. I am doing it like this. stoplist is just a list of words that I want to ignore by default.
texts = [[word for word in document.lower().split() if word not in stoplist]
for document in documents]
I am returned with a list of...
Can someone give me a solution to this
dosomething()
def dosomething():
print 'do something'
I don't want my method defines up at the top of the file, is there a way around this?
...
Hi so this is what I understand how Openid works:-
the user enters his openid url on the site say"hii.com"
The app does a redirect to the openid provider and either does the login or denies it and sends the response back to the site i.e"hii.com"
If authentication was succesful then the response object provided by the openid provider ca...
I'm following the outline of the hudson/python/virtualenv CI solution described at heisel.org but one step of this is really chafing, and that's the part where the virtualenv, created just for the CI run, is configured:
pip install -q -E ./ve -r requirements.pip
pip install -q -E ./ve -r requirements-test.pip
This takes an inordinate ...
So here are my classes and when I run I dont get any error at all just exits:
User class in user.py
from models.WO_list import WOList
from models.WO_list_user import WOListUser
WOList class in WO_list.py
from models.user import User
from models.WO_list_WO import WOListWO
WOListWO class in WO_list_WO.py
from models.WO_list import ...
Possible Duplicate:
Does a exception with just a raise have any use?
Is there any value to re-raising an exception with no other code in between?
try:
#code
except Exception:
raise
I was recently looking through some code and saw a few blocks like these with nothing extra in the except block but another raise. I assume ...
I have developed many desktop applications in Delphi / Pascal -
Here I have used modal forms.
//Mainform
Form1:= TForm1.Create(Self);
If Form1.Showmodal =mrOK then ….
In Form1 you cal call vars in Mainform like mainform.X := 1
(I know – I normaly use try,except, finally)
I will now switch to Python and my problem is the follo...
I have the following code:
import operator
def stagger(l, w):
if len(l)>=w:
return [tuple(l[0:w])]+stagger(l[1:], w)
return []
def pleat(f, l, w=2):
return map(lambda p: f(*p), stagger(l, w))
if __name__=="__main__":
print pleat(operator.add, range(10))
print pleat(lambda x, y, z: x*y/z, range(3, 13), 3)
...
I'm looking for a tool that will allow me to display visualizations of social networks dynamically online. There are a lot of great visualization examples out there already:
http://www.readwriteweb.com/archives/the_best_tools_for_visualization.php
http://socialmediatrader.com/10-amazing-visualizations-of-social-networks/
I know lots ...
So I'm struggling with this for a second day in a row and still nothing. Found few solutions on the internet but still I'm getting "Internal Server Error" when trying to send files with POST. The idea is as follows : I'm sending a file opened in python's shell to a django function on my server that will read and store the file there. I'v...
I need to be able to decode and encode PER-encoded octet strings using Python. I found PyASN1, but it doesn't include a PER codec. Is there another solution out there? How difficult would it be to write a PER codec?
...
sorry if this is addressed, but i'm running
apache2
SQLAlchemy 0.5.8
Pylons 1.0
Python 2.5.2
and on a simple page (just retrieve data from DB), I get:
Error - : (OperationalError) (2006,
'MySQL server has gone away')
every few other requests, not after a long time as other posts I've searched
for. I still added
sqlalchemy....
Hi,
I´m having trouble in creating a file and export to .yaml.
I´m using Google App Engine with Python 2.5.
Don´t understand the Yaml doc´s, it makes me confused.
What i want is to create a file and save it. It´s necessary to get entities from Models.
class SaveYAML(webapp.RequestHandler):
def post(self):
user = db.Query(m...
Does anyone know a scipy/numpy module which will allow to fit exponential decay to data?
Google search returned a few blog posts, for example - http://exnumerus.blogspot.com/2010/04/how-to-fit-exponential-decay-example-in.html , but that solution requires y-offset to be pre-specified, which is not always possible
EDIT:
curve_fit wor...
I'm reviewing a python exercise which does the following :
reads list of numbers til "done" gets
entered.
When "done" is inputted, print
largest and smallest of the
numbers.
And it should be without directly
using the built-in functions, max()
and min().
Here is my source.
Traceback says, "'float' object is not iterable"
I think my...
e.g. if you have code that does something like this somewhere in your codebase:
>>> import logging
>>> logging.basicConfig()
>>> logger = logging.getLogger(__name__)
>>> logger.critical("foo: %s", 1, 2)
Traceback (most recent call last):
File "/pluto/local/lib/python2.6/logging/__init__.py", line 768, in emit
msg = self.format(rec...
I have an argument in Python that is screwing up my subprocess() command. The argument is:
--server-args="-screen 0, 1280x800x24"
args = [
'xvfb-run',
'--server-args="-screen 0, 1280x800x24"',
'/usr/bin/python',
'/root/AdamN-python-webkit2png-3ae4322/webkit2png.py',
'-o',
filename,
url,
]
I think it's escaping the doubl...