I'm working to create a simple Python script that will ultimately tell you how many blog entries were posted in a given month, and the pyblog app is proving very helpful.
However, when I create the blog object, I don't know how to access it's various attributes. I can print them all out by printing one item from the dictionary, as shown...
I'm using suds for the first time and trying to communicate with a server hosted by an external company. When I call a method on the server I get this XML back.
< ?xml version="1.0" encoding="UTF-8"?>
< soap:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xml...
I have the following query that I'm executing using a Python script (by using the MySQLdb module).
conn=MySQLdb.connect (host = "localhost", user = "root",passwd = "<password>",db = "test")
cursor = conn.cursor ()
preamble='set @radius=%s; set @o_lat=%s; set @o_lon=%s; '%(radius,latitude,longitude)
query='SELECT *, (6371*1000 * acos(co...
i want to find a webapp framework for validation user , store user,
and has ajax Effect of jquery ,
so ,did you know this simply framework ?
thanks
like this page : http: //digu.com/reg
...
I'm looking for the same effect as alert() in JavaScript.
I wrote a simple web-based interpreter this afternoon using Twisted.web. You basically submit a block of Python code through a form, and the client comes and grabs it and executes it. I want to be able to make a simple popup message, without having to re-write a whole bunch of bo...
After installing the BitTorrent-bencode package, either via easy_install BitTorrent-bencode or pip install BitTorrent-bencode, or by downloading the tarball and installing that via easy_install $tarball, I discover that /usr/local/lib/python2.6/dist-packages/BitTorrent_bencode-5.0.8-py2.6.egg/ contains EGG-INFO/ and test/ directories. A...
Sometimes when I change my environment variables in Windows, and then use software the depends on those variables, they are not properly updated.
And good example is to change a variable, then open up Windows Command Line and echo the variable and see that it hasn't been changed, even though you properly changed it in the Environment Va...
I have an interface created with Glade. It contains a DrawingArea and buttons.
I tried to create a Thread to refresh every X time my Canva. After a few seconds, I get error messages like:
"X Window Server 0.0", "Fatal Error IO 11"
Here is my code :
import pygtk
pygtk.require("2.0")
import gtk
import Canvas
import threading as T
impor...
I'm having trouble unpickling objects from Google App Engine. I am running Windows 7. Here is the procedure:
Create a CSV with one of the fields being pickle.dumps([[('CS', 2110), ('CS', 3300), ('CS', 3140)]]), or some similar argument.
The CSV looks something like this:
INFO,2210,"CS 2110, 3300, 3140","(lp0
(lp1
(S'CS'
p2
I2110
tp3...
i wonder if the multi threading in python/ruby is equivalent to the one in java?
by that i mean, is it as efficient?
cause if you want to create a chat application that use comet technology i know that you have to use multi threading.
does this mean that i can use python or ruby for that or is it better with java?
thanks
...
I must be doing something stupid. I'm running this in Google App Engine:
class MainHandler(webapp.RequestHandler):
def render(self, template_name, template_data):
path = os.path.join(os.path.dirname(__file__), 'static/templates/%s.html' % template_name)
self.response.out.write(template.render(path, template_data)) #...
i need a CAPTCHA framework on google-app-engine
what a CAPTCHA framework you are using .
thanks
like this :http://recaptcha.net/learnmore.html
...
I have a hashmap like so:
results[tweet_id] = {"score" : float(dot(query,doc) / (norm(query) * norm(doc))), "tweet" : tweet}
What I'd like to do is to sort results by the innser "score" key. I don't know how possible this is, I saw many sorting tutorials but they were for simple (not nested) data structures.
...
Hi,
I have a small script we're using to read in a CSV file containing employees, and perform some basic manipulations on that data.
We read in the data (import_gd_dump), and create an Employees object, containing a list of Employee objects (maybe I should think of a better naming convention...lol). We then call clean_all_phone_numbers...
I am creating some graphs using matplotlib, and I want to be able to write a copyright message and my website address at the bottom of the image.
Something like:
© ACME Corp www.example.com
Does anyone know how I may do this?
...
Let's say I've got a window for which I want to simulate a mouse click
at a specific x, y coordinate. I already have the hwnd but I'm not sure
how to construct the lParam. I've used SendMessage in the past to click
on buttons, etc., but I knew their hwnds.
Any help would be greatly appreciated. I also can't help but wonder if
I'm going a...
Hello,
I'm making a toolbar using wxpython and I want to put the Quit button on the right side of it, I don't want to put them sequencially.
Is it possible to define this position?
Thanks in advance!
...
Suppose I have:
class myclass:
def __init__(self):
self.foo = "bar"
where the value of foo needs to be available to users of myclass. Is it OK to just read the value of foo directly from an instance of myclass? Should I add a get_foo method to myclass or perhaps add a foo property? What's the best practice here?
...
I've seen a few examples defining choice fields like so:
COUNTRIES = (
('fr', _('France')),
('de', _('Germany')),
...
)
(source: http://code.djangoproject.com/ticket/5446
Also see: http://djangosnippets.org/snippets/494/)
What is the meaning of the leading underscores? And why is the second value in the tuple even parent...
I love webpy, it's really quite Pythonic but I don't like having to add the url mappings and create a class, typically with just 1 function inside it.
I'm interested in minimising code typing and prototyping fast.
Does anyone have any up and coming suggestions such as Bobo, Nagare, Bottle, Flask, Denied, cherrypy for a lover of webpy's ...