Python and twisted on an embedded device? Have you considered size of python as well as twisted, have you compiled those on the firmware, because as per my experience, it was difficult to install twisted on firmware, so I wrote a small c program which does the job. As per your question, twisted has a tcpserver, so you can have web interface using twisted.web and file upload using tcpserver, I have never done this but you can try. Sent from my iPhone On Jul 16, 2010, at 7:45 AM, Julian Pietron <julian@whisper-net.de> wrote:
Hallo,
I'm currently realizing a web server for my company which allows control of some of our embedded devices. After some research, I decided on python and twisted as the way to go using genshi as templating engine, which works very well. The problem I encountered is as follows: The user of the web panel should also be able to upgrade the firmware on our device. To make this possible, a file upload has to take place. The firmware file can have a size of up to 150MB, so it will not fit in the RAM of our device. It either won't fit on the NAND flash chip twice, so it should be written to NAND with its final name and not as a temporary file. To tell the server where to store the file upload, I could add a hidden input to the upload form indicating the type of the file being uploaded, so that the web server can save it to the right location. Where's the place to hook in twisted to implement such a behaviour? Do I really have to write a completely independent implementation of the HTTP handler or could I also reuse some parts of twisted.web? Does some code exist already which implements the wanted behaviour or could be modified to implement it?
Thanks for your reply, J. Pietron
_______________________________________________ Twisted-web mailing list Twisted-web@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web