for instance, say I have my cherrypy index module set up like this
>>> import cherrypy
>>> class test:
def index(self, var = None):
if var:
print var
else:
print "nothing"
index.exposed = True
>>> cherrypy.quickstart(test())
If I send more than one GET parameter ...
import cherrypy
import os
PORT = 8080
class intelServ:
def index(self, botkey = None, userkey = None, network = None, user = None, channel = None, msg = None, step = None, **args):
# If any necessary parameters are missing, the bot should fail silently.
#if not botkey or not userkey or not network or not user or no...
Well, I want cherrypy to kill all child threads on auto-reload instead of "Waiting for child threads to terminate" because my program has threads of its own and I don't know how to get past this. CherryPy keeps hanging on that one line and I don't know what to do to get the 'child threads' to terminate...
`
[05/Jan/2010:01:14:24] ENGI...
I'm currently trying to remove a legacy python framework (webware 0.8.1) and layer cherrypy 3.1.2 on top of it. Instead of converting all the webware pages to cherrypy pages, I'm merely processing it through webware and passing it to cherrypy like so.
def default(self, url, *suburl, **kwarg):
...snip...
strmout = DispatcherIO()
...
I have a list of folders in the htdocs that I want to include in my Apache configuration file, but I don't want to include every directory that's there manually, as more may be added later.
I have 5 or so folders redirecting correctly, another redirect that does to the old index.htm in the htdoc's folder and another that does to the che...
Hello,
I'm using cherrypy to implement a web server and I use nose to run my unit tests. However, there is a lot of debug noise that nose catches and prints to stdout, even when I use the --nologcapture, particularly cherrypy's logging messages. That makes the testing output quite difficult to read.
I've thought that:
def setUp(self):...
I'm using cherrypy's standalone server (cherrypy.quickstart()) and sqlite3 for a database.
I was wondering how one would do ajax/jquery asynchronous calls to the database while using cherrypy?
...
So I have in index.py:
class Test:
@cherrypy.expose
def index(self):
return mylookup.get_template('test.html').render(item="<div id='blah'>test</div>")
And in test.html:
<script>
window.addEvent('domready', function() {
$('blah').addEvent('click', function() {
alert('success');
});
});
</script>
When click...
I'm trying to make a cherrypy application with a wxpython ui. The problem is both libraries use closed loop event handlers. Is there a way for this to work? If I have the wx ui start cherrypy is that going to lock up the ui?
...
Hello,
I'm using cherrypy server to receive requests over a pyAMF channel from a python client. I started with the mock up below and it works fine:
Server:
import cherrypy
from pyamf.remoting.gateway.wsgi import WSGIGateway
def echo(*args, **kwargs):
return (args, kwargs)
class Root(object):
def index(self):
return "...
I have a web server that has all of the configurations set in the code, but I want to be able to handle all page 404 errors. How would I go about doing this in Python?
...
Hi I'm planning on building a site with social networking features. Which Python framework do you think is more appropriate or you would suggest over the other, CherryPy or Pylons?
...
This question is related to an older question: http://stackoverflow.com/questions/2019096/mysql-tracking-system. In short: I have to implement a tracking system that will have high loads using Python. For the database part I've settled on mongoDB (which sounds like the right tool for this job). The development language will be Python.
...
Okay, I have an application written with cherrypy, and I want to build a wxpython gui for it. The problem is that both modules use a close loop for event handling, which (I assume) means while one is running the other will be locked.
I asked for some advice and it was suggested that I merge the two event loops rather than using the stoc...
I have a cherrypy application that I want to control over http with a simple gui. The problem is I don't want both the cherrypy window and the gui running at the same time. Is there a way I can make the cherrypy applications window visible?
Its being written for windows, which probably makes a difference
...
Hello,
I've set up a server listening on an SSL port. I am able to connect to it and with proper credentials I am able to access the services (echo service in the example below)
The code below works fine, but I don't understand at which point the client accepts the certificate
Server:
import os.path
import logging
import cherrypy
fro...
I am trying to develop a Facebook application using PyFacebook (hosted on Google App Engine). It's an FBML application (runs in a Facebook canvas instead of an iframe). I'm having problems getting any API calls to function. The sequence looks like this:
fb = facebook.Faceboook(api_key, secret_key)
fb.session_key = cherrypy.request.pa...
In my python application using mod_wsgi and cherrypy ontop of Apache my response code get changed to a 500 from a 403. I am explicitly setting this to 403.
i.e.
cherrypy.response.status = 403
I do not understand where and why the response code that the client receives is 500. Does anyone have any experience with this problem>
...
I have a cherrypy app that I've made an exe with pyinstaller.
now when I run the exe it loads itself twice into memory. Watching the taskmanager shows the first instance load into about 1k, then a second later a second instance of hte exe loads into about 3k ram. If I close the bigger one both processes die. If I close hte smaller one o...
I have a cherrypy app that I'm controlling over http with a wxpython ui. I want to kill the server when the ui closes, but I don't know how to do that. Right now I'm just doing a sys.exit() on the window close event but thats resulting in
Traceback (most recent call last):
File "ui.py", line 67, in exitevent
urllib.urlopen("http:...