cherrypy

cherrypy vs django

cherrypy vs django, which would you use and why ...

Cherrypy server unavailable from anything but localhost.

I am having an issue with cherrypy that looks solved, but doesn't work. I can only bind on localhost or 127.0.0.1. Windows XP Home and Mac OS X (linux untested), cherrypy 3.1.2, python 2.5.4. This is the end of my app: global_conf = { 'global': { 'server.environment= "production"' 'engine.autoreload_on :...

Dynamic URL with CherryPY MethodDispatcher

I need to configure a RESTful style URL that support the following URL scheme: /parent/ /parent/1 /parent/1/children /parent/1/chidren/1 I want to use the MethodDispatcher so that each of the above can have GET/POST/PUT/DELETE functions. I have it working for the first and second, but can't figure out how to configure the dispat...

Python Cherrypy Access Log Rotation

If I want the access log for Cherrypy to only get to a fixed size, how would I go about using rotating log files? I've already tried http://www.cherrypy.org/wiki/Logging, which seems out of date, or has information missing. ...

CherryPy, load image from matplotlib, or in general

I am not sure what I am doing wrong, It would be great if you could point me toward what to read. I have taken the first CherryPy tutorial "hello world" added a little matplotlib plot. Question 1: how do I know where the file will be saved? It happens to be where I am running the file. Question 2: I don't seem to be get the image to open...

CherryPy variables in html

I have a cherryPy program that returns a page that has an image (plot) in a table. I would also like to have variables in the table that describe the plot. I am not using any templating just trying to keep it really simple. In the example below I have the variable numberofapplicants where I want it but it does not output the value of the...

CherryPy (or other Python framework) with FastCGI on shared host

I am trying to configure the Python mini-framework CherryPy with FastCGI (actually fcgid) on Apache. I am on a shared host, so I don't have access to httpd.conf, just htaccess. I have followed these tutorials to no avail: http://tools.cherrypy.org/wiki/FastCGIWSGI http://tools.cherrypy.org/wiki/BluehostDeployment I keep getting 500 e...

Error while exiting cherrypy server

Guys, I am getting following error while exiting cherrypy server. What is this error about? 2009-11-04 09:32:35,015 WARNING Error in atexit._run_exitfuncs: 2009-11-04 09:32:35,015 WARNING 2009-11-04 09:32:35,015 WARNING Traceback (most recent call last): 2009-11-04 09:32:35,015 WARNING File "atexit.pyc", line 24, in _run_exitfu...

CherryPy3 and IIS 6.0

I have a small Python web application using the Cherrypy framework. I am by no means an expert in web servers. I got Cherrypy working with Apache using mod_python on our Ubuntu server. This time, however, I have to use Windows 2003 and IIS 6.0 to host my site. The site runs perfectly as a stand alone server - I am just so lost when it...

How to generate a graphic on the fly with cherrypy

I am developing a small web application using cherrypy and I would like to generate some graphs from the data stored in a database. The web pages with tables are easy and I plan to use matplotlib for the graphs themselves, but how do I set the content-type for the method so they return images instead of plain text? Will cherrypy "snif...

Creating portable Django apps - help needed.

I'm building a Django app, which I comfortably run (test :)) on a Ubuntu Linux host. I would like to package the app without source code and distribute it to another production machine. Ideally the app could be run by ./runapp command which starts a CherryPy server that runs the python/django code. I've discovered several ways of doing ...

Py2exe: Are manifest files and w9xpopen.exe required when compiling a web server without GUI interface?

I'm using Py2exe to compile a CherryPy (3.1) server using Python 2.6 (32-bit) on Windows 7 Pro (64-bit). This server will run without a GUI. Questions: Do I need to be concerned about adding a manifest file for this application if it runs without a GUI? Do I need to include w9xpopen.exe with my exe? So far, my limited testing has i...

XML/SWF charts example not working with cherryPy

I am trying to use use the XML/SWF Charts library with cherrypy. I want to generate html reports with nice looking charts. I am trying to expose one of the default examples of XML/SWF charts with cherryPy, but for some reason the javascript is not working properly with cherryPy. I created the following python script: import os.path i...

fastcgi, cherrypy, and python

So I'm trying to do more web development in python, and I've picked cherrypy, hosted by lighttpd w/ fastcgi. But my question is a very basic one: why do I need to restart lighttpd (or apache) every time I change my application code, or the code for an underlying library? I realize this question extends from a basic mis(i.e. poor)underst...

Can a standalone web application built with cherrypy be compiled?

I want to build a web application that stands completely by itself, apache not required. Is cherrypy a good solution, and can this be compiled with something like py2exe? ...

DBus-Cherrypy merge issue

I'm using python-dbus and cherrypy to monitor USB devices and provide a REST service that will maintain status on the inserted USB devices. I have written and debugged these services independently, and they work as expected. Now, I'm merging the services into a single application. My problem is: I cannot seem to get both services ( cher...

Python web server ?

I want to develop a tool for my project using python. The requirements are: Embed a web server to let the user get some static files, but the traffic is not very high. User can configure the tool using http, I don't want a GUI page, I just need a RPC interface, like XML-RPC? or others? Besides the web server, the tool need some backgr...

Having trouble understanding CherryPy

I read through the tutorial on the cherrypy website, and I'm still having some trouble understanding how it can be implemented in a modular, scalable way. Could someone show me an example of how to have cherrypy receive a simple http post to its root, process the variable in some way, and respond dynamically using that data in the resp...

cherrypy: accessing the URI/route parameters inside a tool hook?

I have a tool hook setup for 'before_finalize' like so: def before_finalize(): d = cherrypy.response.body location = '%s/views' % cherrypy.request.app.config['/']['application_path'] cherrypy.response.body = Template(file='%s/index.tmpl' % location).respond() What I need to do is find out inside that hook what route (I'm u...

Possible to send variables to the index page in CherryPy?

For instance I want to visit http://localhost:8080/?var=val or similar with POST, but I get a 500 server error: 500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request. Traceback (most recent call last): File "c:\python26\lib\site-packages\cherrypy\_cprequest.py"...