cherrypy vs django
cherrypy vs django, which would you use and why ...
cherrypy vs django, which would you use and why ...
I'm looking for something I can use within django to display preformatted code. Ideally this would include out-of-the-box syntax highlighting for various programming languages, although just starting with something that displayed html and xml well would be a good starting point. Does something like this exist? Basically I am looking...
I'm going to be implementing Comet in Python (even though I hear good things about erlycomet I'm not thrilled about supporting an Erlang-based web server in addition to everything else in our back end). I've found several possibilities: Diesel Tornado Twisted-comet (I'd give a link but this is my first post and I'm restricted to a sin...
Question source: SPOJ.. ORDERS def swap(ary,idx1,idx2): tmp = ary[idx1] ary[idx1] = ary[idx2] ary[idx2] = tmp def mkranks(size): tmp = [] for i in range(1, size + 1): tmp = tmp + [i] return tmp def permutations(ordered, movements): size = len(ordered) for i in range(1, size): # The leftmost one ...
So I have an app that if I'm honest doesn't really need transactional integrity (lots of updates, none of them critical). So I was planning on simply leaving entity groups by the wayside for now. But I'd still like to understand it (coming from a relational background). The way I see it, all queries for my app will be on a user by use...
Does anyone have a simple example using ast.NodeVisitor to walk the abstract syntax tree in Python 2.6? The difference between visit and generic_visit is unclear to me, and I cannot find any example using google codesearch or plain google. ...
I have a situation in Python(cough, homework) where I need to multiply EACH ELEMENT in a given list of objects a specified number of times and return the output of the elements. The problem is that the sample inputs given are of different types. For example, one case may input a list of strings whose elements I need to multiply while t...
I am trying to test how a view behaves when there is certain data stored in the session. To do so I have created the session in the test method and invoked an interactive shell at the very beginning of the view: Test Method: def test_user_with_unused_tests(self): "User is given a test and sent to test start" # todo: insure that...
I'm new to both Django and Cappuccino. I have a Django site setup and running through Apache via mod_wsgi. I want to use Django as the backend for a Cappuccino application, but a VirtualHost setup in Apache and mod_wsgi to serve a Django application serves static files out of a different location than the normal web root (e.g. http://exa...
How do you convert a string (for example, input from a textbox) into a proper function? ...
i have tried to install python for symbian uiq 3..i have tried signed and unsigned version,but both installation failed..anyone faced same problem?so,do you have any solution? i am using sony ericsson G900.. ...
It seems by default django's url solver perform case sensitive search for solving url and differentiate between '/Login' and 'login'. My url patterns are as follows. urlpatterns = patterns('', (r'^admin/(.*)', admin.site.root), (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_DOC_ROOT, 'show_...
Hi, Can someone please tell how to write a Non-Blocking server code using the socket library alone.Thanks ...
I'm writing a small utility in Python that does some pattern matching of text. Text that matches the pattern the user has entered gets highlighted yellow. I'm achieving this using a Tkinter Text widget, and setting up a tag on the textbox named "match" that gives any text with the tag name "match" a yellow background. This all looks n...
What kind of setup do people use to run both python 2.6 and python 3.0 on the same windows machine? ...
Just as the title asks, does C++ have the equivalent of Python's setitem and getitem for classes? Basically it allows you to do something like the following. MyClass anObject; anObject[0] = 1; anObject[1] = "foo"; ...
I have been trying to use an ajax-style file upload component (like the dojox file upload component) with google app engine, and have a progress bar. The javascript side of things is fine, but i am wondering how to organise things on the server side? Is is possible to access the data as it is being uploaded within google app engine, ...
I have a ncurses app that checks terminal size at startup and exits immediately if it doesn't fit. In Linux, the default size is 80x24, this app requires at least 25. The fix is easy, I'm just resizing the terminal emulation window (in X) before running the ncurses app. I would like to automate the ncurses app with pexpect, but I'm get...
I am looking for a Chess AI that can be run on Google App Engine. Most chess AI's seem to be written in C and so can not be run on the GAE. It needs to be strong enough to beat a casual player, but efficient enough that it can calculate a move within a single request (less than 10 secs). Ideally it would be written in Python for easier ...
Hi! I have to sort a python list, with multiple attributes. I can do that in ascending order for ALL attributes easily with L.sort(key=operator.attrgetter(attribute)).... but the problem is, that I have use mixed configurations for ascending/descending... I have to "imitate" a bit the SQL Order By where you can do something like "nam...